# TODO - spotlight.cam **Active tasks and roadmap - optimized for quick reference** --- ## 🎯 CURRENT STATUS **Phase:** 0 (Frontend Mockup) - ✅ COMPLETED **Next Phase:** 1 (Backend Foundation) - ⏳ PENDING **Progress:** ~25% complete ### ✅ Completed - Frontend mockup with all views - Docker Compose (nginx + frontend) - Mock authentication, mock data - Documentation ### ⏳ Next Priority **Backend Foundation** - Node.js + PostgreSQL + Auth + WebSocket **See:** `docs/COMPLETED.md` for full list of completed tasks --- ## 📌 NEXT STEPS - Phase 1: Backend Foundation **Estimated Time:** 11-14 hours **Priority:** HIGH ### Step 1: Backend Setup (1-2h) ⏳ - [ ] Add `backend` service to docker-compose.yml - [ ] Initialize Node.js + Express project - [ ] Create folder structure (routes, controllers, middleware, etc.) - [ ] Add healthcheck endpoint: `GET /api/health` - [ ] Update nginx config to proxy `/api/*` to backend - [ ] Test: http://localhost:8080/api/health should return 200 OK ### Step 2: PostgreSQL Setup (2-3h) ⏳ - [ ] Add `db` service (PostgreSQL 15) to docker-compose.yml - [ ] Configure volumes for data persistence - [ ] Choose migration tool (Prisma / Knex / node-pg-migrate) - [ ] Create database schema (6 tables: users, events, chat_rooms, messages, matches, ratings) - [ ] Add indexes for performance - [ ] Create seed data (test events from worldsdc.com) - [ ] Test: Connect to DB from backend, run simple query ### Step 3: Authentication API (3-4h) ⏳ - [ ] Install dependencies: bcrypt, jsonwebtoken, express-validator - [ ] Implement password hashing with bcrypt - [ ] Implement JWT token generation and verification - [ ] Create endpoints: - `POST /api/auth/register` - Create account - `POST /api/auth/login` - Login, return JWT - `GET /api/users/me` - Get current user (protected) - [ ] Create auth middleware for protected routes - [ ] Update frontend AuthContext to use real API instead of mock - [ ] Test: Register → Login → Access protected endpoint ### Step 4: WebSocket Chat (4-5h) ⏳ - [ ] Install Socket.IO on backend - [ ] Setup Socket.IO server with Express - [ ] Implement event handlers: - Connection/disconnection - Join/leave event room - Send/receive messages - Active users list - [ ] Install socket.io-client on frontend - [ ] Update EventChatPage to use Socket.IO instead of mock - [ ] Update MatchChatPage to use Socket.IO for chat - [ ] Test: Real-time messaging between users --- ## 🎯 Future Phases (Reference) ### Phase 2: Core Features (2-3 weeks) - [ ] Matches API (create pairs) - [ ] Private 1:1 chat (Socket.IO rooms) - [ ] WebRTC signaling server (SDP/ICE exchange) - [ ] Ratings API ### Phase 3: WebRTC P2P (3-4 weeks) - MAIN FEATURE - [ ] RTCPeerConnection setup - [ ] RTCDataChannel for file transfer - [ ] Chunking implementation (16KB chunks) - [ ] Progress monitoring - [ ] Error handling & reconnection - [ ] STUN/TURN server configuration ### Phase 4: MVP Finalization (2-3 weeks) - [ ] Security hardening (rate limiting, validation, CORS) - [ ] Testing (unit, integration, E2E) - [ ] PWA features (manifest, service worker, icons) - [ ] Deployment (production environment) ### Phase 5: Optional Extensions - [ ] User badges & trust system - [ ] Block users - [ ] Public profiles - [ ] Push notifications - [ ] Video compression - [ ] Multi-file transfer --- ## 📝 Active Development Tasks ### Documentation - [x] ✅ README.md - [x] ✅ QUICKSTART.md - [x] ✅ CONTEXT.md - [x] ✅ TODO.md - [x] ✅ SESSION_CONTEXT.md - [x] ✅ ARCHITECTURE.md - [x] ✅ COMPLETED.md - [x] ✅ RESOURCES.md - [ ] ⏳ API documentation (Swagger/OpenAPI) - after backend - [ ] ⏳ Architecture diagrams - after backend - [ ] ⏳ WebRTC flow diagram - after WebRTC implementation ### Infrastructure - [x] ✅ Docker Compose (nginx, frontend) - [ ] ⏳ Docker Compose (backend, db) - [ ] ⏳ Production Dockerfile optimization (multi-stage builds) - [ ] ⏳ CI/CD pipeline (GitHub Actions) - [ ] ⏳ HTTPS setup (Let's Encrypt) ### Testing - [ ] ⏳ Backend tests (Jest + Supertest) - [ ] ⏳ Frontend tests (Vitest + React Testing Library) - [ ] ⏳ E2E tests (Playwright / Cypress) - [ ] ⏳ WebRTC manual testing (different devices) --- ## 🚀 Quick Commands **Start development:** ```bash docker compose up --build ``` **Rebuild after changes:** ```bash docker compose down && docker compose up --build ``` **Access:** - Frontend: http://localhost:8080 - Backend (future): http://localhost:8080/api **Git workflow:** ```bash git status git add . git commit -m "feat: description" ``` --- ## 📊 Progress Tracking | Phase | Status | Progress | Estimated Time | |-------|--------|----------|----------------| | Phase 0: Frontend Mockup | ✅ Done | 100% | ~8h (completed) | | Phase 1: Backend Foundation | ⏳ Next | 0% | ~11-14h | | Phase 2: Core Features | ⏳ Pending | 0% | ~15-20h | | Phase 3: WebRTC P2P | ⏳ Pending | 0% | ~20-30h | | Phase 4: MVP Finalization | ⏳ Pending | 0% | ~15-20h | **Overall Progress:** ~25% (1 of 4 core phases done) --- ## 📝 Notes - Frontend mockup is presentation-ready - All views work with mock data - easy to connect real API - WebRTC P2P mockup in MatchChatPage - needs real implementation - Focus on Phase 1 next (backend foundation) - Update task status: ⏳ → 🔄 → ✅ --- **For detailed task history:** See `docs/COMPLETED.md` **For learning resources:** See `docs/RESOURCES.md` **For quick session context:** See `docs/SESSION_CONTEXT.md` **For technical details:** See `docs/ARCHITECTURE.md` --- **Last Updated:** 2025-11-12