docs: update CONTEXT.md and ARCHITECTURE.md to reflect completed MVP
CONTEXT.md updates:
- Changed 'Planned' to 'Implemented' for backend, db, and WebRTC
- Updated Docker Compose components - all services now implemented
- Updated database models section with actual schema
- Updated tech stack - removed 'Planned' labels
- Added test coverage stats (223/223 tests passing)
- Updated Last Updated date to 2025-11-20
- Added MVP complete status
ARCHITECTURE.md updates:
- Updated architecture diagram - marked backend and db as ✅ IMPL
- Changed 'Planned Services' to 'Implemented Services'
- Added production Dockerfile info
- Added test coverage (223/223 passing, 71%)
- Added Prisma ORM details
- Updated Last Updated date to 2025-11-20
- Added production-ready status
Both files now accurately reflect the completed MVP state.
This commit is contained in:
@@ -23,14 +23,14 @@
|
||||
▼ ▼
|
||||
┌────────┐ ┌────────────┐
|
||||
│Frontend│ │ Backend │ (Node.js + Express + Socket.IO)
|
||||
│(Vite) │ │ (planned) │
|
||||
│(Vite) │ │ ✅ IMPL │
|
||||
│:5173 │ │ :3000 │
|
||||
└────────┘ └──────┬─────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────┐
|
||||
│ PostgreSQL │ (Database)
|
||||
│ (planned) │
|
||||
│ PostgreSQL │ (Database with Prisma ORM)
|
||||
│ ✅ IMPL │
|
||||
└─────────────┘
|
||||
|
||||
WebRTC P2P Connection:
|
||||
@@ -60,19 +60,22 @@ Browser A ←──────────────────────
|
||||
- Volumes: hot reload support
|
||||
- Environment: `NODE_ENV=development`, `VITE_HOST=0.0.0.0`
|
||||
|
||||
### Planned Services
|
||||
### Implemented Services
|
||||
|
||||
**backend:**
|
||||
- Build: `./backend/Dockerfile`
|
||||
- Build: `./backend/Dockerfile` (dev) / `./backend/Dockerfile.prod` (prod)
|
||||
- Internal port: 3000
|
||||
- Environment: DB credentials, JWT secret, etc.
|
||||
- Environment: DB credentials, JWT secret, AWS SES, etc.
|
||||
- Depends on: `db`
|
||||
- Features: REST API, Socket.IO, JWT auth, Prisma ORM
|
||||
- Tests: 223/223 passing (71% coverage)
|
||||
|
||||
**db:**
|
||||
- Image: `postgres:15-alpine`
|
||||
- Port: 5432 (internal only)
|
||||
- Port: 5432 (exposed in dev, internal in prod)
|
||||
- Volumes: PostgreSQL data persistence
|
||||
- Environment: POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB
|
||||
- Managed by: Prisma migrations
|
||||
|
||||
---
|
||||
|
||||
@@ -649,4 +652,6 @@ VITE_WS_URL=wss://api.spotlight.cam
|
||||
|
||||
---
|
||||
|
||||
**Last Updated:** 2025-11-12
|
||||
**Last Updated:** 2025-11-20
|
||||
|
||||
**Status:** ✅ All architecture components implemented and production-ready
|
||||
|
||||
@@ -38,24 +38,27 @@ Browser A ←──────────────────────
|
||||
|
||||
## 🐳 Docker Compose – komponenty
|
||||
|
||||
**Current:**
|
||||
**Current (All Implemented):**
|
||||
- `nginx`: Reverse proxy (port 8080)
|
||||
- `frontend`: React/Vite/Tailwind (port 5173 internal)
|
||||
|
||||
**Planned:**
|
||||
- `frontend`: React/Vite/Tailwind PWA (port 5173 internal)
|
||||
- `backend`: Node.js/Express/Socket.IO (port 3000 internal)
|
||||
- `db`: PostgreSQL 15
|
||||
- `db`: PostgreSQL 15 with Prisma ORM
|
||||
|
||||
---
|
||||
|
||||
## 🗃️ Modele bazy danych (Planned)
|
||||
## 🗃️ Modele bazy danych (Implemented)
|
||||
|
||||
- `users`: identyfikacja, email, hasło, avatar
|
||||
- `events`: lista eventów (z worldsdc.com)
|
||||
- `users`: identyfikacja, email, hasło (bcrypt), avatar, profile data
|
||||
- `events`: lista eventów (z worldsdc.com + manual entries)
|
||||
- `divisions`: competition divisions (Novice, Intermediate, Advanced, etc.)
|
||||
- `competition_types`: Jack & Jill, Strictly
|
||||
- `event_user_heats`: declared competition heats per user per event
|
||||
- `chat_rooms`: publiczne (event) i prywatne (match) pokoje
|
||||
- `messages`: wiadomości tekstowe/linki
|
||||
- `matches`: relacja między dwoma użytkownikami
|
||||
- `ratings`: oceny po wymianie nagraniami (1-5, komentarz)
|
||||
- `messages`: wiadomości tekstowe/linki (persisted)
|
||||
- `matches`: relacja między dwoma użytkownikami (CUID slugs for security)
|
||||
- `ratings`: oceny po wymianie nagraniami (1-5, komentarz, collaboration preference)
|
||||
- `event_participants`: tracking event participation
|
||||
- `event_checkin_tokens`: QR code check-in system
|
||||
|
||||
---
|
||||
|
||||
@@ -73,23 +76,27 @@ Browser A ←──────────────────────
|
||||
|
||||
## 💬 Tech Stack
|
||||
|
||||
### Frontend (Current)
|
||||
### Frontend
|
||||
- React 18 + Vite
|
||||
- Tailwind CSS v3.4.0 (NOT v4)
|
||||
- React Router
|
||||
- Context API
|
||||
- Context API for state
|
||||
- PWA (vite-plugin-pwa, Workbox service worker)
|
||||
- socket.io-client for real-time
|
||||
|
||||
### Backend (Planned)
|
||||
- Node.js + Express
|
||||
- Socket.IO (WebSocket)
|
||||
- PostgreSQL 15
|
||||
- bcrypt + JWT
|
||||
### Backend
|
||||
- Node.js 20 + Express 4.18.2
|
||||
- Socket.IO 4.8.1 (WebSocket)
|
||||
- PostgreSQL 15 with Prisma ORM 5.8.0
|
||||
- bcrypt + JWT authentication
|
||||
- Jest + Supertest (223/223 tests passing)
|
||||
|
||||
### WebRTC (Planned)
|
||||
- RTCPeerConnection
|
||||
- RTCDataChannel
|
||||
- Chunking (16KB chunks)
|
||||
- STUN/TURN servers
|
||||
### WebRTC
|
||||
- RTCPeerConnection (implemented)
|
||||
- RTCDataChannel (file transfer)
|
||||
- 16KB chunking (tested up to 700MB)
|
||||
- STUN servers for NAT traversal
|
||||
- E2E encryption (DTLS)
|
||||
|
||||
---
|
||||
|
||||
@@ -166,4 +173,6 @@ const wyslijWiadomosc = (wiadomosc) => {
|
||||
|
||||
---
|
||||
|
||||
**Last Updated:** 2025-11-12
|
||||
**Last Updated:** 2025-11-20
|
||||
|
||||
**Status:** ✅ MVP Complete - All core features implemented and tested
|
||||
|
||||
Reference in New Issue
Block a user