docs: update documentation with recent features

- Update README.md with tier system and recent features
- Add 3-tier account system (BASIC/SUPPORTER/COMFORT) to docs
- Document fairness algorithm and dual buffer system
- Add clickable usernames and country flags features
- Update test count to 285/286 passing (99.7%)
- Update database schema documentation with tier fields
- Update all last modified dates to 2025-11-29
This commit is contained in:
Radosław Gierwiało
2025-11-29 23:39:44 +01:00
parent aef1a35ee2
commit f187b3e44e
4 changed files with 54 additions and 24 deletions

View File

@@ -16,17 +16,19 @@ Web application (PWA) for the dance community enabling matchmaking, chat, and vi
**User Profiles:** **User Profiles:**
-**User Profiles** - profile editing (first name, last name, WSDC ID) -**User Profiles** - profile editing (first name, last name, WSDC ID)
-**Social Media Links** - YouTube, Instagram, Facebook, TikTok -**Social Media Links** - YouTube, Instagram, Facebook, TikTok
-**Location** - country (dropdown with 195 countries) and city -**Location** - country (dropdown with 195 countries with flags) and city
-**Public Profiles** - visible to other logged-in users at /{username} -**Public Profiles** - visible to other logged-in users at /@{username}
-**Profile Statistics** - number of matches, average rating, number of reviews -**Profile Statistics** - number of matches, average rating, number of reviews
-**Clickable Usernames** - usernames in chat are clickable links to public profiles
**Events & Chat:** **Events & Chat:**
-**Event List** - browse dance events from worldsdc.com -**Event List** - browse dance events from worldsdc.com
-**Event Participation Tracking** - automatic saving of joined events -**Event Participation Tracking** - automatic saving of joined events
-**Real-time Event Chat** - Socket.IO chat for event participants -**Real-time Event Chat** - Socket.IO chat for event participants with country flags
-**Active Users Sidebar** - list of online users in the event -**Active Users Sidebar** - list of online users in the event
-**Message History** - message persistence in database -**Message History** - message persistence in database
-**Infinite Scroll** - loading older messages -**Infinite Scroll** - loading older messages
-**Competitor Numbers** - bib number display in event chat
**Matchmaking & Private Chat:** **Matchmaking & Private Chat:**
-**Match Requests** - send and accept match requests with real-time notifications -**Match Requests** - send and accept match requests with real-time notifications
@@ -67,7 +69,16 @@ Web application (PWA) for the dance community enabling matchmaking, chat, and vi
-**Dashboard** - centralized landing page with active events, matches, requests -**Dashboard** - centralized landing page with active events, matches, requests
-**Online Count** - real-time users in event chat -**Online Count** - real-time users in event chat
-**Unread Count** - unread message badges per match -**Unread Count** - unread message badges per match
-**Recording Matching** - auto-assign recorders for competition heats -**Mobile-first Design** - responsive chat layout with page titles on mobile
**Auto-matching & Account Tiers:**
-**Smart Recording Matching** - auto-assign recorders for competition heats with collision detection
-**3-Tier Account System** - BASIC (free), SUPPORTER, COMFORT tiers with fairness-based assignment
-**Fairness Algorithm** - karma tracking (recordingsDone vs recordingsReceived) for balanced workload
-**Dual Buffer System** - prep time before and rest time after dancing (no buffer for recording)
-**Tier Penalties** - SUPPORTER (-10 fairness), COMFORT (-50 fairness) for reduced recording frequency
-**Event-specific Upgrades** - accountTierOverride for temporary tier boosts (e.g., Comfort Pass)
-**Multi-criteria Sorting** - Location > Fairness > Load balancing priority
-**Competitor Numbers** - bib number support for events -**Competitor Numbers** - bib number support for events
**Security & PWA (All Implemented):** **Security & PWA (All Implemented):**
@@ -262,12 +273,14 @@ docker compose --profile dev up --build
- Password Reset: reset_token, reset_token_expiry - Password Reset: reset_token, reset_token_expiry
- Social: youtube_url, instagram_url, facebook_url, tiktok_url - Social: youtube_url, instagram_url, facebook_url, tiktok_url
- Location: country, city - Location: country, city
- Account Tiers: account_tier (BASIC/SUPPORTER/COMFORT), recordings_done, recordings_received
2. **events** - dance events 2. **events** - dance events
- id, slug (unique), name, location, start_date, end_date, description, worldsdc_id, participants_count - id, slug (unique), name, location, start_date, end_date, description, worldsdc_id, participants_count
3. **event_participants** - event participants (many-to-many) 3. **event_participants** - event participants (many-to-many)
- id, user_id, event_id, joined_at - id, user_id, event_id, joined_at, recorder_opt_out, competitor_number
- account_tier_override (optional event-specific tier upgrade)
4. **chat_rooms** - chat rooms 4. **chat_rooms** - chat rooms
- id, event_id, type (event/private), created_at - id, event_id, type (event/private), created_at
@@ -468,14 +481,15 @@ REPL specifics:
## 📊 Test Coverage ## 📊 Test Coverage
**Backend: 73% overall coverage** (286/286 tests passing - 100%) **Backend: 73% overall coverage** (285/286 tests passing - 99.7%)
- **Matching Algorithm**: 30/30 tests passing (unit tests for collision detection, buffers, tier system)
- **WebRTC Signaling**: 7/7 tests passing (offer/answer/ICE relay, authorization) - **WebRTC Signaling**: 7/7 tests passing (offer/answer/ICE relay, authorization)
- **Auth Controllers**: Comprehensive coverage - **Auth Controllers**: Comprehensive coverage
- **Events API**: Full test suite - **Events API**: Full test suite
- **Matches API**: Full CRUD tests - **Matches API**: Full CRUD tests
- **Dashboard API**: 12 tests passing - **Dashboard API**: 12 tests passing
- **Socket.IO**: Full WebRTC + chat coverage - **Socket.IO**: Full WebRTC + chat coverage (1 flaky timeout test)
- **Test Isolation**: Fixed with unique test data per suite (100% passing) - **Test Isolation**: Fixed with unique test data per suite
**Frontend: Test files ready** (requires test runner setup) **Frontend: Test files ready** (requires test runner setup)
- WebRTC detection utility tests - WebRTC detection utility tests
@@ -594,6 +608,6 @@ TBD
--- ---
**Current Status:** MVP Complete ✅ | 286 tests passing | Ready for Production Deployment **Current Status:** MVP Complete ✅ | 285/286 tests passing (99.7%) | Ready for Production Deployment
**Last Updated:** 2025-11-23 **Last Updated:** 2025-11-29

View File

@@ -49,6 +49,7 @@ Browser A ←──────────────────────
## 🗃️ Modele bazy danych (Implemented) ## 🗃️ Modele bazy danych (Implemented)
- `users`: identyfikacja, email, hasło (bcrypt), avatar, profile data - `users`: identyfikacja, email, hasło (bcrypt), avatar, profile data
- Account tiers: `accountTier` (BASIC/SUPPORTER/COMFORT), `recordingsDone`, `recordingsReceived`
- `events`: lista eventów (z worldsdc.com + manual entries) - `events`: lista eventów (z worldsdc.com + manual entries)
- `divisions`: competition divisions (Novice, Intermediate, Advanced, etc.) - `divisions`: competition divisions (Novice, Intermediate, Advanced, etc.)
- `competition_types`: Jack & Jill, Strictly - `competition_types`: Jack & Jill, Strictly
@@ -58,7 +59,9 @@ Browser A ←──────────────────────
- `matches`: relacja między dwoma użytkownikami (CUID slugs for security) - `matches`: relacja między dwoma użytkownikami (CUID slugs for security)
- `ratings`: oceny po wymianie nagraniami (1-5, komentarz, collaboration preference) - `ratings`: oceny po wymianie nagraniami (1-5, komentarz, collaboration preference)
- `event_participants`: tracking event participation - `event_participants`: tracking event participation
- Recording opt-out, competitor numbers, `accountTierOverride` (event-specific tier upgrades)
- `event_checkin_tokens`: QR code check-in system - `event_checkin_tokens`: QR code check-in system
- `recording_suggestions`: auto-matching results with collision detection
--- ---
@@ -89,7 +92,7 @@ Browser A ←──────────────────────
- Socket.IO 4.8.1 (WebSocket) - Socket.IO 4.8.1 (WebSocket)
- PostgreSQL 15 with Prisma ORM 5.8.0 - PostgreSQL 15 with Prisma ORM 5.8.0
- bcrypt + JWT authentication - bcrypt + JWT authentication
- Jest + Supertest (286/286 tests passing, 73% coverage) - Jest + Supertest (285/286 tests passing - 99.7%, 73% coverage)
### WebRTC ### WebRTC
- RTCPeerConnection (implemented) - RTCPeerConnection (implemented)
@@ -175,6 +178,6 @@ const wyslijWiadomosc = (wiadomosc) => {
--- ---
**Last Updated:** 2025-11-23 **Last Updated:** 2025-11-29
**Status:** ✅ MVP Complete - All core features implemented and tested **Status:** ✅ MVP Complete - All core features implemented and tested

View File

@@ -16,7 +16,7 @@
## Current Status ## Current Status
**Phase:** MVP Complete - Ready for Production Deployment **Phase:** MVP Complete - Ready for Production Deployment
**Tests:** 286/286 backend tests passing (73% coverage) **Tests:** 285/286 backend tests passing - 99.7% (73% coverage)
**Next Goal:** Infrastructure setup (server, domain, SSL) **Next Goal:** Infrastructure setup (server, domain, SSL)
### Core Features (All Implemented) ### Core Features (All Implemented)
@@ -24,11 +24,15 @@
- Real-time chat (Socket.IO) - event rooms + private 1:1 - Real-time chat (Socket.IO) - event rooms + private 1:1
- WebRTC P2P file transfer (RTCDataChannel, up to 700MB tested) - WebRTC P2P file transfer (RTCDataChannel, up to 700MB tested)
- Competition heats system for matchmaking - Competition heats system for matchmaking
- Recording matching system (auto-assign recorders) - Recording matching system with 3-tier account system (BASIC/SUPPORTER/COMFORT)
- Fairness algorithm (karma tracking: recordingsDone vs recordingsReceived)
- Dual buffer system (prep before + rest after dancing)
- Clickable usernames with @ prefix, country flags
- Matches & ratings API - Matches & ratings API
- QR code event check-in - QR code event check-in
- PWA (offline support, iOS compatible) - PWA (offline support, iOS compatible)
- Security: CSRF, rate limiting, account lockout - Security: CSRF, rate limiting, account lockout
- Test bot for automated testing
--- ---
@@ -63,12 +67,13 @@
Key models: Key models:
- `users` - Auth, profile, social links, location, lockout fields - `users` - Auth, profile, social links, location, lockout fields
- Account tiers: `accountTier` (BASIC/SUPPORTER/COMFORT), `recordingsDone`, `recordingsReceived`
- `events` - Dance events with unique slugs - `events` - Dance events with unique slugs
- `event_participants` - User-event relationship, competitorNumber - `event_participants` - User-event relationship, competitorNumber, recorderOptOut, `accountTierOverride`
- `divisions` / `competition_types` / `event_user_heats` - Competition system - `divisions` / `competition_types` / `event_user_heats` - Competition system
- `matches` - User pairings with CUID slugs - `matches` - User pairings with CUID slugs
- `ratings` - 1-5 stars, comments - `ratings` - 1-5 stars, comments
- `recording_suggestions` - Auto-matching results - `recording_suggestions` - Auto-matching results with collision detection
- `chat_rooms` / `messages` - Real-time chat persistence - `chat_rooms` / `messages` - Real-time chat persistence
--- ---
@@ -107,6 +112,11 @@ docker compose exec backend npm test
MATCH_STATUS: pending | accepted | rejected | completed MATCH_STATUS: pending | accepted | rejected | completed
SUGGESTION_STATUS: pending | accepted | rejected | not_found SUGGESTION_STATUS: pending | accepted | rejected | not_found
CONNECTION_STATE: disconnected | connecting | connected | failed CONNECTION_STATE: disconnected | connecting | connected | failed
ACCOUNT_TIER: BASIC | SUPPORTER | COMFORT
// Tier fairness penalties
FAIRNESS_SUPPORTER_PENALTY: 10
FAIRNESS_COMFORT_PENALTY: 50
``` ```
--- ---
@@ -129,4 +139,4 @@ CONNECTION_STATE: disconnected | connecting | connected | failed
--- ---
**Last Updated:** 2025-11-23 **Last Updated:** 2025-11-29

View File

@@ -7,14 +7,17 @@
## Current Status ## Current Status
**Phase:** MVP Complete - Ready for Production Deployment **Phase:** MVP Complete - Ready for Production Deployment
**Tests:** 286/286 passing (73% coverage) **Tests:** 285/286 passing - 99.7% (73% coverage)
**Status:** Awaiting infrastructure setup **Status:** Awaiting infrastructure setup
### Recently Completed (2025-11-23) ### Recently Completed (2025-11-29)
- Recording Matching System (auto-assign recorders for heats) - 3-Tier Account System (BASIC/SUPPORTER/COMFORT) with fairness algorithm
- Competitor Number (Bib) Support - Dual Buffer System (prep before + rest after dancing)
- Frontend Refactoring (component extraction, status constants) - Clickable Usernames with @ prefix in profiles
- Dashboard with real-time updates (online count, unread messages) - Country Flags in Event Chat
- Mobile-first Design Improvements (page titles on mobile)
- Recording Matching System Improvements (collision detection, schedule config)
- Test Bot for Automated Testing
**Full history:** See `docs/archive/COMPLETED.md` **Full history:** See `docs/archive/COMPLETED.md`
@@ -114,5 +117,5 @@ http://localhost:8080
--- ---
**Last Updated:** 2025-11-23 **Last Updated:** 2025-11-29
**Full Details:** See `docs/archive/COMPLETED.md` for implementation details **Full Details:** See `docs/archive/COMPLETED.md` for implementation details