A real-time multiplayer Pong game platform built as the final project of 42's Common Core curriculum. This implementation features single-player (vs bot), multiplayer with 2 and 4 players, tournament mode, and an additional Rock Paper Scissors (RPS) game.
- Real-time multiplayer online Pong games with matchmaking system
- Multiple game modes: Single-player vs AI, 2-player, 4-player, and tournament modes
- Additional game: Rock Paper Scissors (RPS)
- User management: OAuth integration, unique display names, avatar uploads, and statistics
- Security: Two-factor authentication (2FA) and JWT-based authentication
- Social features: Friend system
- GDPR compliance: Privacy-focused data handling
- Multi-language: Available in English, Portuguese, Spanish and French
This project follows a microservices architecture with clear separation of concerns:
ft_transcendence/
....├── frontend/ # Vanilla TypeScript SPA with Tailwind CSS
....├── auth-service/ # Authentication and authorization service
....├── user-service/ # User management and profiles
....├── game-service/ # Game logic and real-time communication
....├── ngrok-service/ # Development tunneling service
....├── devops/ # Infrastructure and deployment configs
....└── docker-compose.yml # Container orchestration
- Clean Architecture: Application layer isolated from adapters (HTTP, DB, etc.)
- Domain-Driven Design (DDD): Domain models encapsulate core business rules
- CQRS Pattern: Commands mutate state; queries read state for better scalability
- Microservices: Independent services with clear boundaries
- Language: TypeScript (Vanilla)
- Styling: Tailwind CSS
- Build Tool: Vite
- Markup: HTML5
- Runtime: Node.js
- Framework: Fastify
- Database: SQLite with Prisma ORM
- Authentication: JWT, OAuth, 2FA (otplib)
- Real-time: WebSockets
- Containerization: Docker & Docker Compose
- Development: Ngrok for tunneling
- CI/CD: GitHub Actions
- Proxy: Nginx (reverse proxy)
The backend is intentionally simple while keeping clear boundaries:
- Clean Architecture: application layer isolated from adapters (HTTP, DB, etc.).
- DDD: domain models to encapsulate core business rules.
- CQRS: commands mutate state; queries read state. Separation keeps reads/writes independent and easier to evolve.
- Node.js (v18+)
- Docker & Docker Compose
- npm
-
Clone the repository
git clone <repository-url> cd ft_transcendence
-
Install dependencies
npm install
-
Start the development environment
make # or docker compose up --build -
Access the application
- Frontend:
http://localhost:3000 - API Documentation:
http://localhost:8080/docs
- Frontend:
> [!WARNING] > Google authentication will not work in the local environment. Please log in the normal way.
- Single Player: Play against an AI bot 'Cachorrao', the best player in the world
- Two Players: Classic head-to-head Pong gameplay
- Pong²: Extended Pong with four paddles (4 players)
- Tournament: Classic head-to-head competition with multiple rounds (4 players)
- Quick matches vs bot
- Best-of-five rounds
- Real-time result updates
The application uses SQLite with Prisma ORM for:
- User profiles and authentication
- Game sessions and statistics
- Friend relationships
- Tournament brackets
- Match history and leaderboards
Built by the 42 students working on this Common Core project. Follow us on Github:
bonissanti
Edu2metros
phm-aguiar
ArthurSobreira
MarcalAmaral