- SESSION_CONTEXT.md: 485 → 132 lines (-73%) - Remove outdated "Next Steps" sections - Remove detailed file listings - Keep only essential quick-reference info - TODO.md: 917 → 118 lines (-87%) - Move detailed phase descriptions to COMPLETED.md - Keep security audit, checklist, future improvements - Remove redundant implementation details - CONTEXT.md: Update test count to 286/286
3.8 KiB
3.8 KiB
Session Context - spotlight.cam
Quick reference for resuming development sessions
Project Overview
Name: spotlight.cam Purpose: P2P video exchange app for dance event participants Main Feature: WebRTC P2P video file transfer (no server storage) Tech Stack: React + Vite + Tailwind | Node.js + Express + Socket.IO | PostgreSQL 15 | Docker Compose
Current Status
Phase: MVP Complete - Ready for Production Deployment Tests: 286/286 backend tests passing (73% coverage) Next Goal: Infrastructure setup (server, domain, SSL)
Core Features (All Implemented)
- JWT authentication with email verification (AWS SES)
- Real-time chat (Socket.IO) - event rooms + private 1:1
- WebRTC P2P file transfer (RTCDataChannel, up to 700MB tested)
- Competition heats system for matchmaking
- Recording matching system (auto-assign recorders)
- Matches & ratings API
- QR code event check-in
- PWA (offline support, iOS compatible)
- Security: CSRF, rate limiting, account lockout
Project Structure (Key Paths)
/spotlightcam
├── docker-compose.yml # nginx:8080 + frontend + backend + db
├── frontend/src/
│ ├── pages/ # React pages
│ ├── components/ # Reusable components
│ ├── contexts/ # AuthContext
│ ├── services/ # api.js, socket.js
│ ├── hooks/ # useWebRTC.js
│ └── constants/ # MATCH_STATUS, SUGGESTION_STATUS, etc.
├── backend/src/
│ ├── routes/ # API endpoints
│ ├── controllers/ # Business logic
│ ├── services/ # matching.js (auto-matching algorithm)
│ ├── socket/ # Socket.IO handlers
│ ├── constants/ # Status constants
│ └── __tests__/ # Jest tests
└── docs/
├── TODO.md # Current tasks & security audit
├── ARCHITECTURE.md # Technical details
└── archive/COMPLETED.md # Historical reference
Database Schema (11 tables)
Key models:
users- Auth, profile, social links, location, lockout fieldsevents- Dance events with unique slugsevent_participants- User-event relationship, competitorNumberdivisions/competition_types/event_user_heats- Competition systemmatches- User pairings with CUID slugsratings- 1-5 stars, commentsrecording_suggestions- Auto-matching resultschat_rooms/messages- Real-time chat persistence
Quick Commands
# Start development
docker compose up --build
# Run backend tests
docker compose exec backend npm test
# Access
# Frontend: http://localhost:8080
# API: http://localhost:8080/api
# Health: http://localhost:8080/api/health
Development Guidelines
- Code language: All code, strings, comments in ENGLISH
- Communication: POLISH with developer
- Git commits: Standard format, NO AI mentions
- Port: 8080 (not 80)
- Tailwind: v3.4.0 (v4 has breaking changes)
Key Constants
// frontend/src/constants/ & backend/src/constants/
MATCH_STATUS: pending | accepted | rejected | completed
SUGGESTION_STATUS: pending | accepted | rejected | not_found
CONNECTION_STATE: disconnected | connecting | connected | failed
Test Accounts (Seeded)
| Username | Password | |
|---|---|---|
| john_dancer | john@example.com | Dance123! |
| sarah_swings | sarah@example.com | Swing456! |
| mike_blues | mike@example.com | Blues789! |
For More Details
docs/TODO.md- Security audit, future improvementsdocs/ARCHITECTURE.md- Technical implementation detailsdocs/archive/COMPLETED.md- Full history of completed features
Last Updated: 2025-11-23