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