Files
spotlightcam/docs/SESSION_CONTEXT.md
Radosław Gierwiało 0d083dcb22 docs: optimize documentation for token efficiency
- 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
2025-11-23 23:09:30 +01:00

133 lines
3.8 KiB
Markdown

# 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 fields
- `events` - Dance events with unique slugs
- `event_participants` - User-event relationship, competitorNumber
- `divisions` / `competition_types` / `event_user_heats` - Competition system
- `matches` - User pairings with CUID slugs
- `ratings` - 1-5 stars, comments
- `recording_suggestions` - Auto-matching results
- `chat_rooms` / `messages` - Real-time chat persistence
---
## Quick Commands
```bash
# 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
```javascript
// 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 | Email | 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 improvements
- `docs/ARCHITECTURE.md` - Technical implementation details
- `docs/archive/COMPLETED.md` - Full history of completed features
---
**Last Updated:** 2025-11-23