Commit Graph

5 Commits

Author SHA1 Message Date
Radosław Gierwiało
664a2865b9 feat: implement WebRTC P2P file transfer with DataChannel
Add complete WebRTC peer-to-peer file transfer functionality:

Backend changes:
- Add WebRTC signaling events to Socket.IO (offer, answer, ICE candidates)
- Implement authorization checks for match participants
- Add signaling relay between matched users

Frontend changes:
- Create useWebRTC hook for RTCPeerConnection management
- Implement RTCDataChannel with 16KB chunking for large files
- Add real-time progress monitoring for sender and receiver
- Implement automatic file download on receiver side
- Add connection state tracking and error handling
- Integrate WebRTC with MatchChatPage (replace mockup)

Configuration:
- Add Vite allowed hosts configuration via VITE_ALLOWED_HOSTS env var
- Support comma-separated host list or 'all' for development
- Add .env.example with configuration examples
- Update docker-compose.yml with default allowed hosts

Documentation:
- Add comprehensive WebRTC testing guide with troubleshooting
- Add quick test checklist for manual testing
- Document WebRTC flow, requirements, and success criteria

Features:
- End-to-end encrypted P2P transfer (DTLS)
- 16KB chunk size optimized for DataChannel
- Buffer management to prevent overflow
- Automatic connection establishment with 30s timeout
- Support for files of any size
- Real-time progress tracking
- Clean connection lifecycle management
2025-11-15 14:12:51 +01:00
Radosław Gierwiało
3ff966defc refactor: migrate to native Docker Compose profiles
Simplified Docker Compose configuration by using native profiles
instead of override files, following best practices.

Changes:
- Consolidated docker-compose.yml with --profile dev/prod support
- Removed docker-compose.dev.yml and docker-compose.prod.yml
- Updated all documentation for new usage pattern
- Created comprehensive README.md and DEPLOYMENT.md
- Simplified commands: 'docker compose --profile dev up'

Environment-specific configurations:
- Development: relaxed security, hot reload, exposed ports
- Production: strict security, optimized builds, restricted access

This approach is cleaner, more maintainable, and follows Docker
Compose best practices.
2025-11-13 18:00:08 +01:00
Radosław Gierwiało
0e62b12f5e feat: add PostgreSQL database with Prisma ORM
Phase 1 - Step 2: PostgreSQL Setup

**Infrastructure:**
- Add PostgreSQL 15 Alpine container to docker-compose.yml
- Configure persistent volume for database data
- Update backend Dockerfile with OpenSSL for Prisma compatibility

**Database Schema (Prisma):**
- 6 tables: users, events, chat_rooms, messages, matches, ratings
- Foreign key relationships and cascading deletes
- Performance indexes on frequently queried columns
- Unique constraints for data integrity

**Prisma Setup:**
- Prisma Client for database queries
- Migration system with initial migration
- Seed script with 4 test events and chat rooms
- Database connection utility with singleton pattern

**API Implementation:**
- GET /api/events - List all events (with filtering and sorting)
- GET /api/events/:id - Get single event with relations
- Database connection test on server startup
- Graceful database disconnect on shutdown

**Seed Data:**
- Warsaw Dance Festival 2025
- Swing Camp Barcelona 2025
- Blues Week Herräng 2025
- Krakow Swing Connection 2025

**Testing:**
- Database connection verified 
- API endpoints returning data from PostgreSQL 
- Migrations applied successfully 

All systems operational 🚀
2025-11-12 21:56:11 +01:00
Radosław Gierwiało
320aaf1ce1 feat: add backend setup with Express and unit tests
Backend Foundation (Phase 1 - Step 1):

**Infrastructure:**
- Add backend service to docker-compose.yml
- Configure nginx to proxy /api/* to backend
- Node.js 20 Alpine Docker container

**Backend Setup:**
- Express.js REST API server
- CORS configuration
- Request logging middleware
- Error handling (404, 500)
- Graceful shutdown on SIGTERM/SIGINT
- Health check endpoint: GET /api/health

**Testing:**
- Jest + Supertest for unit tests
- 7 test cases covering:
  - Health check endpoint
  - 404 error handling
  - CORS headers
  - JSON body parsing
- Code coverage: 88.23%

**Project Structure:**
- backend/src/app.js - Express app setup
- backend/src/server.js - Server entry point
- backend/src/__tests__/ - Unit tests
- backend/README.md - Backend documentation

**Environment:**
- .env.example template
- Development configuration
- Ready for PostgreSQL integration

All tests passing 
2025-11-12 21:42:52 +01:00
Radosław Gierwiało
80ff4a70bf feat: initial project setup with frontend mockup
- Docker Compose setup with nginx reverse proxy and frontend service
- React + Vite + Tailwind CSS configuration
- Complete mockup of all application views:
  - Authentication (login/register)
  - Events list and selection
  - Event chat with matchmaking
  - 1:1 private chat with WebRTC P2P video transfer mockup
  - Partner rating system
  - Collaboration history
- Mock data for users, events, messages, matches, and ratings
- All UI text and messages in English
- Project documentation (CONTEXT.md, TODO.md, README.md, QUICKSTART.md)
2025-11-12 17:50:44 +01:00