docs: translate README.md to English

This commit is contained in:
Radosław Gierwiało
2025-11-13 21:53:53 +01:00
parent 21ba899f98
commit 8c637469fd

246
README.md
View File

@@ -1,60 +1,60 @@
# spotlight.cam 🎥 # spotlight.cam 🎥
Aplikacja webowa (PWA) dla społeczności tanecznej umożliwiająca matchmaking, czatowanie i wymianę nagrań wideo bezpośrednio przez WebRTC (peer-to-peer). Web application (PWA) for the dance community enabling matchmaking, chat, and video file exchange directly via WebRTC (peer-to-peer).
## 🚀 Funkcjonalności ## 🚀 Features
### ✅ Zaimplementowane ### ✅ Implemented
**Autoryzacja & Bezpieczeństwo:** **Authentication & Security:**
-**JWT Authentication** - prawdziwa autoryzacja z bcrypt password hashing -**JWT Authentication** - real authentication with bcrypt password hashing
-**Email Verification** - weryfikacja email przez AWS SES (link + PIN code) -**Email Verification** - email verification via AWS SES (link + PIN code)
-**Password Reset** - pełny workflow resetowania hasła -**Password Reset** - complete password reset workflow
-**WSDC Integration** - auto-fill danych z worldsdc.com podczas rejestracji -**WSDC Integration** - auto-fill data from worldsdc.com during registration
-**Event Slugs** - unikalne alfanumeryczne identyfikatory zapobiegające ID enumeration attacks -**Event Slugs** - unique alphanumeric identifiers preventing ID enumeration attacks
**Profile użytkowników:** **User Profiles:**
-**User Profiles** - edycja profilu (imię, nazwisko, 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** - kraj (dropdown z 195 krajami) i miasto -**Location** - country (dropdown with 195 countries) and city
-**Public Profiles** - widoczne dla innych zalogowanych pod /{username} -**Public Profiles** - visible to other logged-in users at /{username}
-**Profile Statistics** - liczba matchów, średnia ocena, liczba recenzji -**Profile Statistics** - number of matches, average rating, number of reviews
**Eventy & Chat:** **Events & Chat:**
-**Event List** - przeglądanie eventów tanecznych z worldsdc.com -**Event List** - browse dance events from worldsdc.com
-**Event Participation Tracking** - automatyczne zapisywanie dołączonych eventów -**Event Participation Tracking** - automatic saving of joined events
-**Real-time Event Chat** - Socket.IO chat dla uczestników eventu -**Real-time Event Chat** - Socket.IO chat for event participants
-**Active Users Sidebar** - lista użytkowników online w evencie -**Active Users Sidebar** - list of online users in the event
-**Message History** - persistencja wiadomości w bazie danych -**Message History** - message persistence in database
-**Infinite Scroll** - ładowanie starszych wiadomości -**Infinite Scroll** - loading older messages
**Matchmaking & Private Chat:** **Matchmaking & Private Chat:**
-**Matchmaking** - łączenie się w pary bezpośrednio z czatu eventowego -**Matchmaking** - pairing directly from event chat
-**Private 1:1 Chat** - prywatny czat dla sparowanych użytkowników z Socket.IO -**Private 1:1 Chat** - private chat for matched users with Socket.IO
**Backend & Infrastructure:** **Backend & Infrastructure:**
-**PostgreSQL Database** - 7 tabel z relacjami (Prisma ORM) -**PostgreSQL Database** - 7 tables with relations (Prisma ORM)
-**RESTful API** - Express.js backend z walidacją -**RESTful API** - Express.js backend with validation
-**WebSocket** - Socket.IO dla real-time communication -**WebSocket** - Socket.IO for real-time communication
-**Docker Compose** - pełna orkiestracja (nginx, frontend, backend, PostgreSQL) -**Docker Compose** - full orchestration (nginx, frontend, backend, PostgreSQL)
-**Test Coverage** - 81%+ coverage (Jest + Supertest) -**Test Coverage** - 81%+ coverage (Jest + Supertest)
### 🔜 W trakcie implementacji ### 🔜 In Progress
-**Matches API** - create/accept match requests -**Matches API** - create/accept match requests
-**Ratings API** - ocenianie partnera po współpracy (1-5 gwiazdek) -**Ratings API** - rate partner after collaboration (1-5 stars)
-**WebRTC Signaling** - SDP/ICE exchange via Socket.IO -**WebRTC Signaling** - SDP/ICE exchange via Socket.IO
-**WebRTC P2P Transfer** - prawdziwy transfer plików przez RTCDataChannel -**WebRTC P2P Transfer** - real file transfer via RTCDataChannel
## 🛠️ Stack Technologiczny ## 🛠️ Tech Stack
### Frontend ### Frontend
- **React 18** - framework UI - **React 18** - UI framework
- **Vite** - build tool i dev server - **Vite** - build tool and dev server
- **Tailwind CSS v3.4.0** - stylowanie - **Tailwind CSS v3.4.0** - styling
- **React Router** - routing - **React Router** - routing
- **Lucide React** - ikony - **Lucide React** - icons
- **Context API** - zarządzanie stanem (auth) - **Context API** - state management (auth)
- **Socket.IO Client** - real-time WebSocket communication - **Socket.IO Client** - real-time WebSocket communication
### Backend ### Backend
@@ -73,7 +73,7 @@ Aplikacja webowa (PWA) dla społeczności tanecznej umożliwiająca matchmaking,
- **Nginx** - reverse proxy & static file serving - **Nginx** - reverse proxy & static file serving
- **Alpine Linux** - lightweight container base images - **Alpine Linux** - lightweight container base images
## 📁 Struktura projektu ## 📁 Project Structure
``` ```
spotlightcam/ spotlightcam/
@@ -135,31 +135,31 @@ spotlightcam/
└── RESOURCES.md # Learning resources └── RESOURCES.md # Learning resources
``` ```
## 🚀 Uruchomienie projektu ## 🚀 Getting Started
### Wymagania ### Requirements
- Docker i Docker Compose - Docker and Docker Compose
- (Opcjonalnie) Node.js 20+ dla developmentu bez Dockera - (Optional) Node.js 20+ for development without Docker
### Development Mode ### Development Mode
1. Sklonuj repozytorium: 1. Clone the repository:
```bash ```bash
git clone <repo-url> git clone <repo-url>
cd spotlightcam cd spotlightcam
``` ```
2. Skopiuj przykładowy plik .env: 2. Copy example .env file:
```bash ```bash
cp backend/.env.example backend/.env cp backend/.env.example backend/.env
``` ```
3. Uruchom Docker Compose z profilem dev: 3. Start Docker Compose with dev profile:
```bash ```bash
docker compose --profile dev up docker compose --profile dev up
``` ```
4. Otwórz przeglądarkę: 4. Open browser:
``` ```
http://localhost:8080 http://localhost:8080
``` ```
@@ -170,7 +170,7 @@ http://localhost:8080
docker compose --profile prod up -d docker compose --profile prod up -d
``` ```
### Dostęp do usług ### Service Access
**Development:** **Development:**
- Frontend: http://localhost:8080 - Frontend: http://localhost:8080
@@ -184,7 +184,7 @@ docker compose --profile prod up -d
- HTTPS: https://localhost (port 443, requires SSL certificates) - HTTPS: https://localhost (port 443, requires SSL certificates)
- PostgreSQL: internal only (not exposed) - PostgreSQL: internal only (not exposed)
### Zatrzymanie ### Stopping Services
```bash ```bash
# Development # Development
@@ -194,7 +194,7 @@ docker compose --profile dev down
docker compose --profile prod down docker compose --profile prod down
``` ```
### Rebuild po zmianach ### Rebuild After Changes
```bash ```bash
docker compose --profile dev down docker compose --profile dev down
@@ -203,9 +203,9 @@ docker compose --profile dev up --build
## 🗄️ Database Schema ## 🗄️ Database Schema
7 tables z relacjami (Prisma ORM): 7 tables with relations (Prisma ORM):
1. **users** - użytkownicy 1. **users** - users
- Base: id, username, email, password_hash, avatar, created_at, updated_at - Base: id, username, email, password_hash, avatar, created_at, updated_at
- WSDC: first_name, last_name, wsdc_id - WSDC: first_name, last_name, wsdc_id
- Email: email_verified, verification_token, verification_code, verification_token_expiry - Email: email_verified, verification_token, verification_code, verification_token_expiry
@@ -213,111 +213,111 @@ docker compose --profile dev up --build
- Social: youtube_url, instagram_url, facebook_url, tiktok_url - Social: youtube_url, instagram_url, facebook_url, tiktok_url
- Location: country, city - Location: country, city
2. **events** - eventy taneczne 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** - uczestnicy eventów (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
4. **chat_rooms** - pokoje czatu 4. **chat_rooms** - chat rooms
- id, event_id, type (event/private), created_at - id, event_id, type (event/private), created_at
5. **messages** - wiadomości 5. **messages** - messages
- id, room_id, user_id, content, type (text/link/video), created_at - id, room_id, user_id, content, type (text/link/video), created_at
6. **matches** - pary użytkowników 6. **matches** - user pairs
- id, user1_id, user2_id, event_id, room_id, status (pending/accepted/completed), created_at - id, user1_id, user2_id, event_id, room_id, status (pending/accepted/completed), created_at
7. **ratings** - oceny 7. **ratings** - ratings
- id, match_id, rater_id, rated_id, score (1-5), comment, would_collaborate_again, created_at - id, match_id, rater_id, rated_id, score (1-5), comment, would_collaborate_again, created_at
### Migracje ### Migrations
```bash ```bash
# Rozwój (w kontenerze backend) # Development (inside backend container)
docker compose exec backend npx prisma migrate dev docker compose exec backend npx prisma migrate dev
# Produkcja # Production
docker compose exec backend-prod npx prisma migrate deploy docker compose exec backend-prod npx prisma migrate deploy
# Generowanie Prisma Client # Generate Prisma Client
docker compose exec backend npx prisma generate docker compose exec backend npx prisma generate
``` ```
### Seed data ### Seed Data
```bash ```bash
docker compose exec backend npx prisma db seed docker compose exec backend npx prisma db seed
``` ```
Dodaje: Adds:
- 3 eventy (Warsaw, Barcelona, Herräng) - 3 events (Warsaw, Barcelona, Herräng)
- 2 użytkowników (john_doe, jane_smith) - 2 users (john_doe, jane_smith)
- Event chat rooms - Event chat rooms
## 🧪 Testowanie aplikacji ## 🧪 Testing the Application
### Flow testowy: ### Test Flow:
1. **Rejestracja z WSDC** (http://localhost:8080/register) 1. **Registration with WSDC** (http://localhost:8080/register)
- Opcjonalnie: podaj WSDC ID (np. 12345) dla auto-fill danych - Optional: provide WSDC ID (e.g., 12345) for auto-fill
- Wypełnij formularz rejestracji - Complete registration form
- Otrzymasz email weryfikacyjny (sprawdź AWS SES sandbox) - You'll receive verification email (check AWS SES sandbox)
2. **Weryfikacja Email** (http://localhost:8080/verify-email) 2. **Email Verification** (http://localhost:8080/verify-email)
- Kliknij link z emaila LUB wpisz 6-cyfrowy kod PIN - Click link from email OR enter 6-digit PIN code
- Email zostanie zweryfikowany - Email will be verified
3. **Logowanie** (http://localhost:8080/login) 3. **Login** (http://localhost:8080/login)
- Email: john@example.com - Email: john@example.com
- Password: password123 - Password: password123
4. **Edycja profilu** (http://localhost:8080/profile) 4. **Profile Editing** (http://localhost:8080/profile)
- Uzupełnij social media links (Instagram, YouTube, etc.) - Add social media links (Instagram, YouTube, etc.)
- Wybierz kraj z listy 195 krajów - Select country from list of 195 countries
- Podaj miasto - Enter city
- Edytuj WSDC ID, imię, nazwisko - Edit WSDC ID, first name, last name
5. **Wybór eventu** (http://localhost:8080/events) 5. **Event Selection** (http://localhost:8080/events)
- Zobacz listę eventów (dołączone wyświetlają się na górze) - View event list (joined events appear at top)
- Wybierz event (np. "Warsaw Dance Festival 2025") - Select event (e.g., "Warsaw Dance Festival 2025")
- Kliknij "Join chat" lub "Open chat" (jeśli już dołączyłeś) - Click "Join chat" or "Open chat" (if already joined)
6. **Czat eventowy** 6. **Event Chat**
- Real-time chat z Socket.IO - Real-time chat with Socket.IO
- Po prawej stronie lista aktywnych użytkowników online - Active users list on the right side
- Kliknij ikonę "+" przy użytkowniku aby się z nim połączyć - Click "+" icon next to user to connect
- Zostaniesz przekierowany do prywatnego czatu 1:1 - You'll be redirected to private 1:1 chat
7. **Czat 1:1 - WebRTC (mockup)** 🔥 7. **1:1 Chat - WebRTC (mockup)** 🔥
- Zobacz profil partnera na górze (kliknij username aby zobaczyć public profile) - See partner's profile at top (click username to view public profile)
- Status WebRTC połączenia (disconnected/connecting/connected) - WebRTC connection status (disconnected/connecting/connected)
- **Wysyłanie filmu przez WebRTC (mockup):** - **Sending video via WebRTC (mockup):**
- Kliknij "Wyślij film (WebRTC)" - Click "Send video (WebRTC)"
- Wybierz plik wideo z dysku - Select video file from disk
- Zobacz symulację transferu P2P - See P2P transfer simulation
- **Fallback - wysyłanie linku:** - **Fallback - link sharing:**
- Kliknij "Link" - Click "Link"
- Wklej URL do filmu (Google Drive, Dropbox, etc.) - Paste video URL (Google Drive, Dropbox, etc.)
8. **Ocena partnera** (coming soon - Matches & Ratings API) 8. **Rate Partner** (coming soon - Matches & Ratings API)
- Kliknij "Zakończ i oceń" - Click "Finish and rate"
- Wybierz ocenę (1-5 gwiazdek) - Select rating (1-5 stars)
- Dodaj komentarz - Add comment
- Zaznacz czy chcesz współpracować ponownie - Mark if you want to collaborate again
9. **Historia współprac** (http://localhost:8080/history) 9. **Collaboration History** (http://localhost:8080/history)
- Zobacz listę matchów - See list of matches
- Zobacz otrzymane oceny - See received ratings
- Zobacz statystyki - See statistics
10. **Public Profiles** 10. **Public Profiles**
- Kliknij na username innego użytkownika - Click on another user's username
- Zobacz profil: avatar, lokalizacja, social media, statystyki - View profile: avatar, location, social media, statistics
## 🔐 Bezpieczeństwo ## 🔐 Security
### Zaimplementowane zabezpieczenia: ### Implemented Security Features:
**Authentication:** **Authentication:**
- bcrypt password hashing (10 salt rounds) - bcrypt password hashing (10 salt rounds)
@@ -351,7 +351,7 @@ Dodaje:
- Room-based access control - Room-based access control
- User verification before joining rooms - User verification before joining rooms
### Planowane zabezpieczenia (Phase 3): ### Planned Security Features (Phase 3):
⏳ CORS configuration ⏳ CORS configuration
⏳ CSRF protection (cookies) ⏳ CSRF protection (cookies)
@@ -416,26 +416,26 @@ docker compose exec backend npm run test:coverage
- Video compression - Video compression
- Multi-file transfer - Multi-file transfer
## 📖 Dokumentacja ## 📖 Documentation
**Quick Start:** **Quick Start:**
- `docs/SESSION_CONTEXT.md` - Szybki kontekst dla wznowienia sesji (minimal tokens) - `docs/SESSION_CONTEXT.md` - Quick context for resuming sessions (minimal tokens)
**Main Documentation:** **Main Documentation:**
- `docs/CONTEXT.md` - Główny opis projektu i założeń - `docs/CONTEXT.md` - Main project description and assumptions
- `docs/TODO.md` - Aktywne zadania i roadmap - `docs/TODO.md` - Active tasks and roadmap
**Detailed Documentation:** **Detailed Documentation:**
- `docs/ARCHITECTURE.md` - Szczegóły techniczne i implementacyjne - `docs/ARCHITECTURE.md` - Technical details and implementation
- `docs/PHASE_1.5.md` - Dokumentacja Phase 1.5 (Email & WSDC) - `docs/PHASE_1.5.md` - Phase 1.5 documentation (Email & WSDC)
- `docs/SECURITY_AUDIT.md` - Security audit & fixes - `docs/SECURITY_AUDIT.md` - Security audit & fixes
- `docs/DEPLOYMENT.md` - Deployment guide - `docs/DEPLOYMENT.md` - Deployment guide
- `docs/COMPLETED.md` - Archiwum ukończonych zadań - `docs/COMPLETED.md` - Completed tasks archive
- `docs/RESOURCES.md` - Linki do dokumentacji i zasobów edukacyjnych - `docs/RESOURCES.md` - Links to documentation and learning resources
## 🤝 Contributing ## 🤝 Contributing
Projekt jest w fazie rozwoju. Aktualnie implementujemy Phase 2 (Matches & Ratings API, WebRTC P2P transfer). Project is in development phase. Currently implementing Phase 2 (Matches & Ratings API, WebRTC P2P transfer).
### Git workflow: ### Git workflow:
```bash ```bash
@@ -444,7 +444,7 @@ git add .
git commit -m "feat: description" git commit -m "feat: description"
``` ```
**Uwaga:** Commit messages bez wzmianek o AI/automatycznym generowaniu. **Note:** Commit messages without mentions of AI/automatic generation.
## 📄 License ## 📄 License
@@ -452,6 +452,6 @@ TBD
--- ---
**Current Status:** Phase 1.5 ✅ Completed | Phase 2 ⏳ In Progress (60% overall) **Current Status:** Phase 1.5 ✅ Completed | Phase 2 ⏳ In Progress (65% overall)
**Last Updated:** 2025-11-13 **Last Updated:** 2025-11-13