Experience the classic Pong game reimagined with modern web technologies and real-time multiplayer capabilities!
- Real-time multiplayer Pong gameplay
- Matchmaking system
- Live score tracking
- Power-ups and special abilities
- Custom game rooms
- Tournament mode
- Real-time chat system
- Friend management
- User profiles
- Achievement system
- Global leaderboard
graph TB
subgraph "Docker Environment"
subgraph "Frontend Container"
R[React App]
S[Serve Static Files]
end
subgraph "Backend Container"
D[Daphne Server]
DJ[Django App]
WS[WebSocket Handler]
end
subgraph "Nginx Container"
NC[Nginx Server]
SSL[SSL Termination]
PC[Proxy Controller]
end
subgraph "Database Container"
PG[PostgreSQL]
end
NC --> |"Proxy HTTPS\n(443)"| D
NC --> |"Serve Static\n(80/443)"| S
R --> |"Build"| S
D --> |"Handle Requests"| DJ
D --> |"WebSocket\nConnections"| WS
DJ --> |"Data\nOperations"| PG
WS --> |"Real-time\nUpdates"| PG
end
User --> |"HTTPS/WSS"| NC
sequenceDiagram
participant U as User
participant N as Nginx
participant F as Frontend
participant B as Backend
participant DB as PostgreSQL
U->>N: HTTPS Request
alt Static Content
N->>F: Request Static Files
F->>N: Return Built Files
N->>U: Serve Static Content
else API Request
N->>B: Proxy to Backend
B->>DB: Database Query
DB->>B: Query Result
B->>N: API Response
N->>U: Return Data
else WebSocket
U->>N: WS Connection
N->>B: Proxy WS
activate B
Note over B: Keep Connection Alive
B->>DB: Real-time Updates
B->>N: WS Messages
N->>U: Real-time Data
deactivate B
end
graph LR
subgraph "SSL Management"
I[Initial Setup] -->|Generate| K[SSL Keys]
K -->|Mount| N[Nginx]
K -->|Mount| B[Backend]
N -->|Terminate SSL| R[Requests]
B -->|Internal SSL| W[WebSocket]
end
graph TB
subgraph "Docker Volumes"
NV[nginx_certs]
FV[frontend_build]
DV[database]
subgraph "Mounted Locations"
NV -->|"SSL Certs"| NC[Nginx Container]
NV -->|"SSL Certs"| BC[Backend Container]
FV -->|"Static Files"| NC
DV -->|"Persistent Data"| PG[PostgreSQL Container]
end
end
graph LR
subgraph "Request Router"
H[HTTPS Request] -->|443| N[Nginx]
N -->|Static| S[Static Files]
N -->|API| B[Backend API]
N -->|WebSocket| W[WS Handler]
N -->|Admin| A[Admin Panel]
N -->|Media| M[Media Files]
end
- React.js with TypeScript
- CSS for styling
- Socket.io client for real-time communication
- Production-optimized build
- Static file serving
- Environment variable support
- Django with Daphne server
- WebSocket support
- SSL certificate integration
- Automatic migrations
- PostgreSQL integration
- Real-time game state management
- SSL termination
- Reverse proxy
- Static file serving
- WebSocket proxy
- Media file handling
- Security optimizations
- Persistent storage
- Environment configuration
- Automatic restart
- Data integrity
- Backup support
- TLS 1.2 and 1.3 support
- Strong cipher suite configuration
- Automatic certificate generation
- Secure key permissions (644)
- Real IP forwarding
- XSS protection
- Secure headers
- Maximum body size limits
-
Horizontal Scaling
- Backend containers can be replicated
- WebSocket connections are load-balanced
- Static content is cached
-
Performance Optimization
- Nginx caching for static files
- Database connection pooling
- WebSocket connection management
-
Monitoring Points
- Container health checks
- Database performance
- WebSocket connection status
- SSL certificate validity
Color | Hex Code | Usage |
---|---|---|
Primary | #000000 |
Main actions, buttons |
Secondary | #565656 |
Highlights, success states |
Accent | #FF4242 |
Notifications, alerts |
Background | #000000 |
Main background |
Text | #B0B0B0 |
Primary text |
- ๐ฎ The emperor: the player has to be at the top of the leaderboard
- ๐ The joker: the player has lost 5 matches
- ๐ซ maestro: the player has to win two tournaments in a row
- ๐ down keeper: The player has to win three matches with no points lost
- ๐ฅ thunder strike: The player has to win a match in a record time
Our project embraces:
- Clean, maintainable code
- Responsive design
- Real-time performance
- Scalable architecture
- User-centered design
This project is licensed under the MIT License - see the LICENSE file for details.
Made with โค๏ธ by the ft_transcendence team
ยฉ 2025 ft_transcendence. All rights reserved.