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)
|
│Frontend│ │ Backend │ (Node.js + Express + Socket.IO)
|
||||||
│(Vite) │ │ (planned) │
|
│(Vite) │ │ ✅ IMPL │
|
||||||
│:5173 │ │ :3000 │
|
│:5173 │ │ :3000 │
|
||||||
└────────┘ └──────┬─────┘
|
└────────┘ └──────┬─────┘
|
||||||
│
|
│
|
||||||
▼
|
▼
|
||||||
┌─────────────┐
|
┌─────────────┐
|
||||||
│ PostgreSQL │ (Database)
|
│ PostgreSQL │ (Database with Prisma ORM)
|
||||||
│ (planned) │
|
│ ✅ IMPL │
|
||||||
└─────────────┘
|
└─────────────┘
|
||||||
|
|
||||||
WebRTC P2P Connection:
|
WebRTC P2P Connection:
|
||||||
@@ -60,19 +60,22 @@ Browser A ←──────────────────────
|
|||||||
- Volumes: hot reload support
|
- Volumes: hot reload support
|
||||||
- Environment: `NODE_ENV=development`, `VITE_HOST=0.0.0.0`
|
- Environment: `NODE_ENV=development`, `VITE_HOST=0.0.0.0`
|
||||||
|
|
||||||
### Planned Services
|
### Implemented Services
|
||||||
|
|
||||||
**backend:**
|
**backend:**
|
||||||
- Build: `./backend/Dockerfile`
|
- Build: `./backend/Dockerfile` (dev) / `./backend/Dockerfile.prod` (prod)
|
||||||
- Internal port: 3000
|
- Internal port: 3000
|
||||||
- Environment: DB credentials, JWT secret, etc.
|
- Environment: DB credentials, JWT secret, AWS SES, etc.
|
||||||
- Depends on: `db`
|
- Depends on: `db`
|
||||||
|
- Features: REST API, Socket.IO, JWT auth, Prisma ORM
|
||||||
|
- Tests: 223/223 passing (71% coverage)
|
||||||
|
|
||||||
**db:**
|
**db:**
|
||||||
- Image: `postgres:15-alpine`
|
- Image: `postgres:15-alpine`
|
||||||
- Port: 5432 (internal only)
|
- Port: 5432 (exposed in dev, internal in prod)
|
||||||
- Volumes: PostgreSQL data persistence
|
- Volumes: PostgreSQL data persistence
|
||||||
- Environment: POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB
|
- 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
|
## 🐳 Docker Compose – komponenty
|
||||||
|
|
||||||
**Current:**
|
**Current (All Implemented):**
|
||||||
- `nginx`: Reverse proxy (port 8080)
|
- `nginx`: Reverse proxy (port 8080)
|
||||||
- `frontend`: React/Vite/Tailwind (port 5173 internal)
|
- `frontend`: React/Vite/Tailwind PWA (port 5173 internal)
|
||||||
|
|
||||||
**Planned:**
|
|
||||||
- `backend`: Node.js/Express/Socket.IO (port 3000 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
|
- `users`: identyfikacja, email, hasło (bcrypt), avatar, profile data
|
||||||
- `events`: lista eventów (z worldsdc.com)
|
- `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
|
- `chat_rooms`: publiczne (event) i prywatne (match) pokoje
|
||||||
- `messages`: wiadomości tekstowe/linki
|
- `messages`: wiadomości tekstowe/linki (persisted)
|
||||||
- `matches`: relacja między dwoma użytkownikami
|
- `matches`: relacja między dwoma użytkownikami (CUID slugs for security)
|
||||||
- `ratings`: oceny po wymianie nagraniami (1-5, komentarz)
|
- `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
|
## 💬 Tech Stack
|
||||||
|
|
||||||
### Frontend (Current)
|
### Frontend
|
||||||
- React 18 + Vite
|
- React 18 + Vite
|
||||||
- Tailwind CSS v3.4.0 (NOT v4)
|
- Tailwind CSS v3.4.0 (NOT v4)
|
||||||
- React Router
|
- React Router
|
||||||
- Context API
|
- Context API for state
|
||||||
|
- PWA (vite-plugin-pwa, Workbox service worker)
|
||||||
|
- socket.io-client for real-time
|
||||||
|
|
||||||
### Backend (Planned)
|
### Backend
|
||||||
- Node.js + Express
|
- Node.js 20 + Express 4.18.2
|
||||||
- Socket.IO (WebSocket)
|
- Socket.IO 4.8.1 (WebSocket)
|
||||||
- PostgreSQL 15
|
- PostgreSQL 15 with Prisma ORM 5.8.0
|
||||||
- bcrypt + JWT
|
- bcrypt + JWT authentication
|
||||||
|
- Jest + Supertest (223/223 tests passing)
|
||||||
|
|
||||||
### WebRTC (Planned)
|
### WebRTC
|
||||||
- RTCPeerConnection
|
- RTCPeerConnection (implemented)
|
||||||
- RTCDataChannel
|
- RTCDataChannel (file transfer)
|
||||||
- Chunking (16KB chunks)
|
- 16KB chunking (tested up to 700MB)
|
||||||
- STUN/TURN servers
|
- 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