docs: update documentation for Phase 2.5 completion and Phase 3 start
Update README.md: - Add landing page to features - Update test coverage section (43% backend, 116 tests passing) - Add WebRTC tests information (7 tests passing) - Update project structure (HomePage, hooks, utils, tests) - Add STUN servers to WebRTC features - Remove STUN/TURN and server upload fallback from Next Up - Update roadmap to Phase 3 in progress - Update test flow with landing page - Update progress to ~80% Update SESSION_CONTEXT.md: - Current phase: Phase 3 (MVP Finalization) in progress - Add landing page and WebRTC tests to What Works Now - Update What's Missing (remove STUN, add coverage improvement) - Add HomePage to routes and key files - Add useWebRTC, webrtcDetection, test files to key files - Update socket.js description with WebRTC signaling - Update final status with all completed phases - Update progress and date
This commit is contained in:
112
README.md
112
README.md
@@ -50,18 +50,24 @@ Web application (PWA) for the dance community enabling matchmaking, chat, and vi
|
||||
- ✅ **E2E Encryption** - DTLS encryption (native WebRTC)
|
||||
- ✅ **Auto Download** - automatic file download on receiver side
|
||||
|
||||
**Landing Page:**
|
||||
- ✅ **Homepage** - professional landing page with hero section, features showcase, and CTAs
|
||||
- ✅ **Public Access** - accessible to non-logged users with links to register/login
|
||||
- ✅ **Responsive Design** - mobile-friendly with gradient backgrounds
|
||||
|
||||
**Backend & Infrastructure:**
|
||||
- ✅ **PostgreSQL Database** - 7 tables with relations (Prisma ORM)
|
||||
- ✅ **RESTful API** - Express.js backend with validation
|
||||
- ✅ **WebSocket** - Socket.IO for real-time communication
|
||||
- ✅ **Docker Compose** - full orchestration (nginx, frontend, backend, PostgreSQL)
|
||||
- ✅ **Test Coverage** - 81%+ coverage (Jest + Supertest)
|
||||
- ✅ **Test Coverage** - comprehensive test suite for WebRTC, Auth, Events, Matches
|
||||
- ✅ **WebRTC Tests** - full Socket.IO signaling and detection tests (7 tests passing)
|
||||
|
||||
### 🔜 Next Up
|
||||
|
||||
- ⏳ **STUN/TURN Servers** - WebRTC NAT traversal for production
|
||||
- ⏳ **Server Upload Fallback** - alternative when WebRTC blocked
|
||||
- ⏳ **Competition Heats** - complete UI integration and real-time updates
|
||||
- ⏳ **PWA Features** - manifest, service worker, offline support
|
||||
- ⏳ **Security Hardening** - CORS, CSRF, Helmet.js, CSP
|
||||
|
||||
## 🛠️ Tech Stack
|
||||
|
||||
@@ -104,9 +110,11 @@ spotlightcam/
|
||||
│ │ ├── components/ # React components
|
||||
│ │ │ ├── common/ # Shared components, PasswordStrength, VerificationBanner
|
||||
│ │ │ ├── chat/ # Chat components
|
||||
│ │ │ ├── video/ # WebRTC video transfer (mockup)
|
||||
│ │ │ └── layout/ # Navbar, Layout
|
||||
│ │ │ ├── video/ # WebRTC components (WebRTCWarning)
|
||||
│ │ │ ├── layout/ # Navbar, Layout
|
||||
│ │ │ └── __tests__/ # Component tests (WebRTCWarning)
|
||||
│ │ ├── pages/ # Application pages
|
||||
│ │ │ ├── HomePage.jsx # Landing page with hero & features
|
||||
│ │ │ ├── LoginPage.jsx
|
||||
│ │ │ ├── RegisterPage.jsx # Two-step registration with WSDC lookup
|
||||
│ │ │ ├── VerifyEmailPage.jsx # Email verification (link + PIN)
|
||||
@@ -116,9 +124,12 @@ spotlightcam/
|
||||
│ │ │ ├── PublicProfilePage.jsx # View other user's profile
|
||||
│ │ │ ├── EventsPage.jsx # Event list with real API
|
||||
│ │ │ ├── EventChatPage.jsx # Real-time event chat
|
||||
│ │ │ ├── MatchChatPage.jsx # Private chat + WebRTC mockup
|
||||
│ │ │ ├── MatchChatPage.jsx # Private chat + WebRTC P2P transfer
|
||||
│ │ │ ├── RatePartnerPage.jsx # Rate partner after collaboration
|
||||
│ │ │ └── HistoryPage.jsx # Match history
|
||||
│ │ ├── hooks/ # Custom hooks (useWebRTC)
|
||||
│ │ ├── utils/ # Utilities (webrtcDetection)
|
||||
│ │ │ └── __tests__/ # Utility tests (webrtcDetection)
|
||||
│ │ ├── contexts/ # AuthContext (JWT integration)
|
||||
│ │ ├── services/ # API client, Socket.IO client
|
||||
│ │ ├── data/ # Static data (countries list)
|
||||
@@ -131,9 +142,14 @@ spotlightcam/
|
||||
│ │ ├── controllers/ # Auth, users, events, WSDC
|
||||
│ │ ├── middleware/ # Auth, validation, error handling
|
||||
│ │ ├── routes/ # API routes
|
||||
│ │ ├── socket/ # Socket.IO server (event/match rooms)
|
||||
│ │ ├── socket/ # Socket.IO server (event/match rooms, WebRTC signaling)
|
||||
│ │ ├── utils/ # Auth utils, DB, email service (AWS SES)
|
||||
│ │ └── __tests__/ # Jest unit tests (81%+ coverage)
|
||||
│ │ └── __tests__/ # Jest unit tests
|
||||
│ │ │ ├── socket-webrtc.test.js # WebRTC signaling tests (7 tests)
|
||||
│ │ │ ├── auth.test.js # Authentication tests
|
||||
│ │ │ ├── events.test.js # Events API tests
|
||||
│ │ │ ├── matches.test.js # Matches API tests
|
||||
│ │ │ └── ... # Other test suites
|
||||
│ ├── prisma/
|
||||
│ │ ├── schema.prisma # Database schema (7 tables)
|
||||
│ │ ├── migrations/ # Database migrations
|
||||
@@ -278,45 +294,52 @@ Adds:
|
||||
|
||||
### Test Flow:
|
||||
|
||||
1. **Registration with WSDC** (http://localhost:8080/register)
|
||||
1. **Landing Page** (http://localhost:8080/)
|
||||
- View professional landing page with hero section
|
||||
- Explore features showcase and how-it-works section
|
||||
- Click "Get Started" to register or "Sign in" to login
|
||||
|
||||
2. **Registration with WSDC** (http://localhost:8080/register)
|
||||
- Optional: provide WSDC ID (e.g., 12345) for auto-fill
|
||||
- Complete registration form
|
||||
- You'll receive verification email (check AWS SES sandbox)
|
||||
|
||||
2. **Email Verification** (http://localhost:8080/verify-email)
|
||||
3. **Email Verification** (http://localhost:8080/verify-email)
|
||||
- Click link from email OR enter 6-digit PIN code
|
||||
- Email will be verified
|
||||
|
||||
3. **Login** (http://localhost:8080/login)
|
||||
4. **Login** (http://localhost:8080/login)
|
||||
- Email: john@example.com
|
||||
- Password: password123
|
||||
|
||||
4. **Profile Editing** (http://localhost:8080/profile)
|
||||
5. **Profile Editing** (http://localhost:8080/profile)
|
||||
- Add social media links (Instagram, YouTube, etc.)
|
||||
- Select country from list of 195 countries
|
||||
- Enter city
|
||||
- Edit WSDC ID, first name, last name
|
||||
|
||||
5. **Event Selection** (http://localhost:8080/events)
|
||||
6. **Event Selection** (http://localhost:8080/events)
|
||||
- View event list (joined events appear at top)
|
||||
- Select event (e.g., "Warsaw Dance Festival 2025")
|
||||
- Click "Join chat" or "Open chat" (if already joined)
|
||||
|
||||
6. **Event Chat**
|
||||
7. **Event Chat**
|
||||
- Real-time chat with Socket.IO
|
||||
- Active users list on the right side
|
||||
- Click "+" icon next to user to connect
|
||||
- You'll be redirected to private 1:1 chat
|
||||
|
||||
7. **1:1 Chat - WebRTC P2P File Transfer** 🔥
|
||||
8. **1:1 Chat - WebRTC P2P File Transfer** 🔥
|
||||
- See partner's profile at top (click username to view public profile)
|
||||
- WebRTC connection status (disconnected/connecting/connected)
|
||||
- **Sending video via WebRTC:**
|
||||
- Click "Send video (WebRTC)"
|
||||
- Select video file from disk
|
||||
- Real P2P transfer via RTCDataChannel (supports files up to 700MB+)
|
||||
- See real-time progress bar
|
||||
- Real P2P transfer via RTCDataChannel with STUN servers for NAT traversal
|
||||
- Supports files up to 700MB+ tested successfully
|
||||
- See real-time progress bar (16KB chunking)
|
||||
- Receiver automatically downloads the file
|
||||
- End-to-end encryption via DTLS (native WebRTC)
|
||||
- **WebRTC Detection:**
|
||||
- Automatic detection if WebRTC is blocked
|
||||
- User-friendly warning with fix suggestions
|
||||
@@ -326,18 +349,18 @@ Adds:
|
||||
- Paste video URL (Google Drive, Dropbox, etc.)
|
||||
- Alternative when WebRTC blocked (Opera, VPNs, privacy settings)
|
||||
|
||||
8. **Rate Partner** (coming soon - Matches & Ratings API)
|
||||
9. **Rate Partner**
|
||||
- Click "Finish and rate"
|
||||
- Select rating (1-5 stars)
|
||||
- Add comment
|
||||
- Mark if you want to collaborate again
|
||||
|
||||
9. **Collaboration History** (http://localhost:8080/history)
|
||||
- See list of matches
|
||||
- See received ratings
|
||||
- See statistics
|
||||
10. **Collaboration History** (http://localhost:8080/history)
|
||||
- See list of matches
|
||||
- See received ratings
|
||||
- See statistics
|
||||
|
||||
10. **Public Profiles**
|
||||
11. **Public Profiles**
|
||||
- Click on another user's username
|
||||
- View profile: avatar, location, social media, statistics
|
||||
|
||||
@@ -387,15 +410,29 @@ Adds:
|
||||
|
||||
## 📊 Test Coverage
|
||||
|
||||
**Backend: 81%+ coverage**
|
||||
- Auth controllers: 78%
|
||||
- Socket.IO module: 89%
|
||||
- Jest + Supertest
|
||||
**Backend: ~43% overall coverage** (116 tests passing)
|
||||
- **WebRTC Signaling**: 7/7 tests passing (offer/answer/ICE relay, authorization)
|
||||
- **Auth Controllers**: 82.9% coverage
|
||||
- **Events API**: Comprehensive tests
|
||||
- **Matches API**: Full CRUD tests
|
||||
- **Socket.IO**: 42.4% coverage (WebRTC + chat)
|
||||
|
||||
**Frontend: Test files ready** (requires test runner setup)
|
||||
- WebRTC detection utility tests
|
||||
- WebRTC warning component tests
|
||||
|
||||
**Coverage gaps** (priority areas):
|
||||
- Routes: events.js (8.98%), matches.js (8.22%), users.js (43%)
|
||||
- Controllers: user.js (8.19%)
|
||||
- Utils: sanitize.js (31.81%)
|
||||
|
||||
```bash
|
||||
# Run tests
|
||||
# Run all backend tests
|
||||
docker compose exec backend npm test
|
||||
|
||||
# Run specific test suite
|
||||
docker compose exec backend npm test -- socket-webrtc.test.js
|
||||
|
||||
# Coverage report
|
||||
docker compose exec backend npm run test:coverage
|
||||
```
|
||||
@@ -434,17 +471,22 @@ docker compose exec backend npm run test:coverage
|
||||
### ✅ Phase 2.5: WebRTC P2P File Transfer (COMPLETED)
|
||||
- WebRTC signaling (SDP/ICE exchange via Socket.IO)
|
||||
- P2P file transfer via RTCDataChannel (16KB chunking)
|
||||
- STUN servers for NAT traversal (production-ready)
|
||||
- WebRTC capability detection (browser/network compatibility)
|
||||
- User-friendly fallback UX when WebRTC blocked
|
||||
- Tested up to 700MB file transfers
|
||||
- E2E encryption (DTLS)
|
||||
- Comprehensive test suite (7 backend tests passing)
|
||||
- Professional landing page with hero section
|
||||
|
||||
### ⏳ Phase 3: MVP Finalization (PLANNED)
|
||||
- Security hardening
|
||||
- Integration & E2E tests
|
||||
- PWA features (manifest, service worker)
|
||||
- Production deployment
|
||||
- Monitoring & logging
|
||||
### ⏳ Phase 3: MVP Finalization (IN PROGRESS)
|
||||
- ✅ Landing page (completed)
|
||||
- ✅ WebRTC tests (completed)
|
||||
- ⏳ Security hardening (CORS, CSRF, Helmet.js, CSP)
|
||||
- ⏳ Integration & E2E tests
|
||||
- ⏳ PWA features (manifest, service worker)
|
||||
- ⏳ Production deployment
|
||||
- ⏳ Monitoring & logging
|
||||
|
||||
### ⏳ Phase 4: Extensions (FUTURE)
|
||||
- User badges & trust system
|
||||
@@ -489,6 +531,6 @@ TBD
|
||||
|
||||
---
|
||||
|
||||
**Current Status:** Phase 2.5 (WebRTC) ✅ Completed | Phase 3 (MVP) ⏳ Next | Progress: ~78% overall
|
||||
**Current Status:** Phase 2.5 (WebRTC) ✅ Completed | Phase 3 (MVP) ⏳ In Progress | Progress: ~80% overall
|
||||
|
||||
**Last Updated:** 2025-11-15
|
||||
|
||||
Reference in New Issue
Block a user