Use this checklist before and after deployment to validate critical functionality consistently.
- Install dependencies:
npm install
- Build the app:
npm run build
- Start the server with safe local environment variables:
NODE_ENV=development JWT_SECRET=dev_jwt_secret_change_me ENABLE_MOCK_CHECKOUT=true DB_PATH=./spectra.db FRONTEND_URL=http://localhost:5173 PORT=3001 npm start
- Open the app in a browser:
http://localhost:3001
- Verify health endpoint:
GET http://localhost:3001/api/health- Expected: JSON response with HTTP
200.
Run these checks against your local server:
GET /api/health- Expected: JSON body, HTTP
200.
- Expected: JSON body, HTTP
GET /api/mewithout token- Expected: JSON error, HTTP
401.
- Expected: JSON error, HTTP
GET /api/nonexistent- Expected: JSON error, HTTP
404.
- Expected: JSON error, HTTP
- Unknown frontend route (example:
/some/random/page)- Expected: app shell/index HTML loads (SPA fallback).
- Confirm routing boundary
- Expected:
/api/*routes are not swallowed by SPA fallback.
- Expected:
- Register a new user.
- Log in with valid credentials.
- Refresh browser and confirm session restore works.
- Log out and confirm protected actions require login again.
- Attempt invalid login and verify user-facing error handling.
- With
ENABLE_MOCK_CHECKOUT=true, trigger upgrade/checkout locally.- Expected: mock checkout behavior (no real Stripe charge).
- Hit free-tier limit or simulate
402response.- Expected: upgrade modal opens.
- Complete local mock checkout path.
- Expected: checkout success banner appears.
- Trigger checkout cancel flow (if available in current UI).
- Expected: checkout cancel banner/message appears.
- Production readiness note:
- Real Stripe secret key, webhook secret, and price IDs must be configured.
- Upload a supported MP3 file.
- Upload another supported format (for example WAV or MP4, if available).
- Try an unsupported file type.
- Expected: validation/rejection message.
- Test file size limits if documented.
- Expected: behavior matches documented constraints.
- Confirm uploaded item appears in the processing queue/list.
- After upload, confirm metadata analysis runs automatically.
- Verify displayed metadata includes title, artist, genre, and format (when present).
- Verify provenance risk display is visible.
- If file metadata includes known markers, verify detected markers list is shown.
- Use malformed/minimal metadata sample if available.
- Expected: parse failure is handled gracefully and app does not crash.
- Ensure file/context is present, then run SEO generation.
- Verify generated title, description, and tags populate UI fields.
- Test failure mode (missing
GEMINI_API_KEYor simulated API failure).- Expected: clear error handling/message.
- Confirm existing SEO fields are not destructively cleared on generation failure.
- On MP3 input, verify MP3-only quick cleanse action/button is enabled.
- On non-MP3 input, verify quick cleanse is disabled or unavailable.
- Run quick cleanse for supported MP3.
- Verify a manual download link appears.
- Confirm no auto-download is triggered.
- Download processed MP3.
- Re-upload or inspect resulting MP3 and confirm metadata fields changed as expected.
- Confirm system logs show cleanse success/failure path.
- Run server cleanse on a supported non-MP3 file.
- Verify
/api/processreturns downloadable file response. - Verify usage meter/counter updates only after successful delivered files.
- Verify forensic/report information appears when present.
- Upload MP3 to Full Server Cleanse and verify HTTP
422JSON:- Expected error:
MP3 server cleanse is not supported. - Expected detail:
Use Quick Cleanse (Browser) for MP3. Full Server Cleanse is best supported for MP4/M4A; WAV/FLAC may be rejected if ExifTool cannot safely rewrite them. - Expected usage counter does not increment on this rejection.
- Expected error:
- Force or simulate
401from protected endpoint.- Expected: user is logged out/reauth requested.
- Force or simulate
402.- Expected: upgrade modal opens.
- Process a file and copy/download the generated link.
- Replace with a newly processed file.
- Expected: old object URL/link is no longer used by current UI state.
- Remove queue item.
- Refresh page.
- Confirm no obvious stale/broken download UI remains.
Note: Docker was unavailable in Codex audits; run these steps manually in a Docker-capable environment.
- Build image:
docker build -t spectracleanseai:test . - Run container (example):
docker run --rm -p 3001:3001 \ -e NODE_ENV=production \ -e JWT_SECRET=replace_with_strong_secret \ -e STRIPE_SECRET_KEY=sk_live_or_test_xxx \ -e STRIPE_WEBHOOK_SECRET=whsec_xxx \ -e STRIPE_CREATOR_PRICE_ID=price_xxx \ -e STRIPE_STUDIO_PRICE_ID=price_xxx \ -e GEMINI_API_KEY=your_gemini_api_key \ -e FRONTEND_URL=https://your-frontend-domain.example \ -e DB_PATH=/data/spectra.db \ -v spectracleanse_data:/data \ spectracleanseai:test
- Verify app loads from container at
http://localhost:3001. - Verify
GET /api/healthreturns JSON200. - Verify unknown frontend route returns SPA fallback.
- Verify
GET /api/nonexistentreturns JSON404.
-
JWT_SECRETis strong and unique. - Stripe secret, webhook secret, and price IDs are configured.
-
GEMINI_API_KEYis configured. -
DB_PATHpoints to persistent storage. -
FRONTEND_URLis correct for deployed frontend. -
NODE_ENV=production. - No real secrets are committed to source control.
-
.envis gitignored. - Backup/persistence plan exists for database.
- Upload/data volume mount is configured for expected data volume.
npm auditcurrently reports vulnerabilities and should be triaged.- Browser-side metadata analysis now uses maintained
music-metadatawith lazy loading, size bounds, and timeout fallback behavior. - Treat suspicious, corrupt, or unusually large media samples as high-risk during manual QA and verify metadata analysis fallback behavior (
parseError) carefully. - Docker build/runtime validation still requires a real Docker-capable environment.