commits
Include 'newemail%' pattern in cleanup to catch users whose emails
were updated during email change tests, preventing duplicate email
errors on subsequent test runs.
- Make rate limit tests more resilient by checking if rate limiting triggers
rather than expecting exact iteration counts, preventing failures from
rate limit accumulation across tests
- Fix file upload size limit test to use 101MB instead of 26MB to properly
exceed the actual 100MB limit
- Update error message to show "100MB" instead of "25MB" to match the actual
MAX_FILE_SIZE constant
The previous cleanup only deleted rate limit attempts with keys containing
'test' or 'admin', but IP-based rate limits have keys like 'register:ip:unknown'
which don't match this pattern. This caused rate limit tests to fail because
attempts accumulated across tests.
Now clearing all rate limit attempts between tests to ensure proper isolation.
The rate limiting table is named rate_limit_attempts, not rate_limits.
Updated the test cleanup function to use the correct table name and
match keys containing test/admin identifiers.
- Add 57 integration tests covering all REST API endpoints
- Tests include authentication, sessions, user management, transcriptions, admin operations, and passkeys
- Tests gracefully skip if test server is not running on port 3001
- Add PORT environment variable support to server
- Add test and test:integration scripts to package.json
- Include comprehensive documentation in index.test.README.md
Test Coverage:
- Authentication endpoints (register, login, logout, me)
- Session management (list, delete)
- User management (delete account, update email/password/name/avatar)
- Passkey endpoints (register, authenticate, list, update, delete)
- Transcription endpoints (upload, list, health, stream)
- Admin endpoints (users, transcriptions, roles, sessions, passkeys)
Tests include:
- Input validation
- Rate limiting verification
- Authorization checks (user vs admin)
- Error handling
- Security testing (duplicate emails, invalid formats, etc.)
- Add created_at field to /api/auth/me response
- Remove debug console.log statements from SSE streams
- Keep error logging for debugging issues
馃挊 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
- Add --success-green (#16a34a) to color palette
- Use green for completed transcriptions (distinct from processing)
- Replace remaining hardcoded rgba colors with CSS variables
- Status colors: uploading (blue), processing (orange), completed (green), failed (gray)
馃挊 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
API:
- POST /api/transcriptions - upload audio files
- GET /api/transcriptions - list user transcriptions
- GET /api/transcriptions/:id/stream - SSE progress updates
- Use structured error handling for validation
Frontend:
- Add transcription component with drag-and-drop
- Real-time progress via SSE (no polling)
- Support for MP3, WAV, M4A, AAC, OGG, WebM, FLAC
- Add transcribe link to nav menu
- Update homepage with CTA buttons
馃挊 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
Architecture improvements:
- Extract 510 lines to src/lib/transcription.ts
- Add TranscriptionEventEmitter with automatic listener cleanup
- Add WhisperServiceManager with race-safe SSE streaming
- Implement file cleanup system for stale uploads
Error handling:
- Add structured error codes and AppError class
- Add validation, auth, and transcription error helpers
- Add requireAuth middleware to reduce boilerplate
Fixes:
- Memory leak: auto-cleanup listeners after 5min inactivity
- Race condition: prevent duplicate SSE streams with locks
- File cleanup: remove completed/failed files after 24h
馃挊 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
- Add faster-whisper Python service with SSE streaming
- Support for multiple audio formats (MP3, WAV, M4A, etc)
- SQLite-based job tracking and progress updates
- Add setup instructions to README
馃挊 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
- Add transcriptions table with status tracking
- Add eventsource-client for SSE support
- Configure environment variables for Whisper service
- Ignore uploads directory and .env file
馃挊 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
- Make rate limit tests more resilient by checking if rate limiting triggers
rather than expecting exact iteration counts, preventing failures from
rate limit accumulation across tests
- Fix file upload size limit test to use 101MB instead of 26MB to properly
exceed the actual 100MB limit
- Update error message to show "100MB" instead of "25MB" to match the actual
MAX_FILE_SIZE constant
The previous cleanup only deleted rate limit attempts with keys containing
'test' or 'admin', but IP-based rate limits have keys like 'register:ip:unknown'
which don't match this pattern. This caused rate limit tests to fail because
attempts accumulated across tests.
Now clearing all rate limit attempts between tests to ensure proper isolation.
- Add 57 integration tests covering all REST API endpoints
- Tests include authentication, sessions, user management, transcriptions, admin operations, and passkeys
- Tests gracefully skip if test server is not running on port 3001
- Add PORT environment variable support to server
- Add test and test:integration scripts to package.json
- Include comprehensive documentation in index.test.README.md
Test Coverage:
- Authentication endpoints (register, login, logout, me)
- Session management (list, delete)
- User management (delete account, update email/password/name/avatar)
- Passkey endpoints (register, authenticate, list, update, delete)
- Transcription endpoints (upload, list, health, stream)
- Admin endpoints (users, transcriptions, roles, sessions, passkeys)
Tests include:
- Input validation
- Rate limiting verification
- Authorization checks (user vs admin)
- Error handling
- Security testing (duplicate emails, invalid formats, etc.)
- Add --success-green (#16a34a) to color palette
- Use green for completed transcriptions (distinct from processing)
- Replace remaining hardcoded rgba colors with CSS variables
- Status colors: uploading (blue), processing (orange), completed (green), failed (gray)
馃挊 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
API:
- POST /api/transcriptions - upload audio files
- GET /api/transcriptions - list user transcriptions
- GET /api/transcriptions/:id/stream - SSE progress updates
- Use structured error handling for validation
Frontend:
- Add transcription component with drag-and-drop
- Real-time progress via SSE (no polling)
- Support for MP3, WAV, M4A, AAC, OGG, WebM, FLAC
- Add transcribe link to nav menu
- Update homepage with CTA buttons
馃挊 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
Architecture improvements:
- Extract 510 lines to src/lib/transcription.ts
- Add TranscriptionEventEmitter with automatic listener cleanup
- Add WhisperServiceManager with race-safe SSE streaming
- Implement file cleanup system for stale uploads
Error handling:
- Add structured error codes and AppError class
- Add validation, auth, and transcription error helpers
- Add requireAuth middleware to reduce boilerplate
Fixes:
- Memory leak: auto-cleanup listeners after 5min inactivity
- Race condition: prevent duplicate SSE streams with locks
- File cleanup: remove completed/failed files after 24h
馃挊 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>