Skip to content

[BUG] Fix Smoke Test, Complete .env.example, Clean Dependencies #13

Description

@oomokaro1

[BUG] Fix Smoke Test, Complete .env.example, Clean Dependencies

Priority: Medium

Difficulty: Medium
Estimated Effort: 1-2 days
Relevant Packages: OrbitStream_backend/
Labels: bug, cleanup, priority:medium

Requirements

1. Fix Smoke Test

Rewrite app.smoke.spec.ts using @nestjs/testing:

import { Test, TestingModule } from '@nestjs/testing';
import { AppModule } from '../app.module';

describe('App smoke test', () => {
  let app: any;

  beforeAll(async () => {
    const module: TestingModule = await Test.createTestingModule({
      imports: [AppModule],
    }).compile();
    app = module.createNestApplication();
    await app.init();
  });

  afterAll(async () => {
    await app.close();
  });

  it('should be defined', () => {
    expect(app).toBeDefined();
  });

  it('should have health endpoint', () => {
    // Test GET /health returns 200
  });
});

2. Complete .env.example

# Required — App
NODE_ENV=development
PORT=3001

# Required — Database
DATABASE_URL=postgresql://postgres:password@localhost:5432/orbitstream

# Required — Redis
REDIS_URL=redis://localhost:6379

# Required — Auth
JWT_SECRET=change-me-to-a-random-32-char-string-minimum
JWT_EXPIRES_IN=7d

# Required — Stellar
STELLAR_NETWORK=testnet
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
STELLAR_NETWORK_PASSPHRASE=Test SDF Network ; September 2015

# Required — Platform
PLATFORM_RECEIVING_ACCOUNT=G...  # Your Stellar public key for receiving payments
FRONTEND_URL=http://localhost:3000

# Optional
CHECKOUT_SESSION_TTL_MINUTES=30
CHALLENGE_TTL_SECONDS=300
CORS_ALLOWED_ORIGINS=http://localhost:3000

3. Clean Unused Dependencies

Run npm uninstall for each unused package. Verify no imports break. Run npm run build and npm test after cleanup.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions