Final project of the Ecole 42 Common Core curriculum. An advanced version of the classic Pong game, built using a microservices architecture with AI opponents, remote multiplayer capabilities, and robust user authentication. Frontend developed with Pure JS as a Single Page Application. Backend developed with Django Rest Framework.
Project Subject: https://cdn.intra.42.fr/pdf/pdf/117706/en.subject.pdf
This project aims to create an enhanced version of the Pong game with a focus on scalability, security, and advanced gameplay features. By leveraging microservices architecture and modern web technologies, we've built a robust platform that goes beyond the traditional Pong experience.
- Microservices Architecture: Backend designed as microservices for improved scalability and maintainability. Each service has its own database.
- User Management: Standard user management system with authentication across tournaments.
- Remote Authentication: Implement secure remote authentication for users.
- Two-Factor Authentication (2FA): Enhanced security with 2FA and JWT (JSON Web Tokens).
- AI Opponent: Challenge yourself against an intelligent AI player.
- Remote Multiplayer: Play against other players remotely.
- Server-Side Pong: Core game logic implemented on the server for fair play.
- RESTful API: Full-featured API for game interactions and data management.
- Frontend Framework: Modern, responsive user interface built with a frontend framework/toolkit.
- Database Integration: Robust data management using a backend database.
To set up this project, follow these steps:
-
Clone the repository:
git clone https://github.com/yigithankarabulut/ft_transcendence.git cd ft_transcendence
-
Edit .env file
Edit .env file for both frontend and backend with necessary configurations -
Run with Docker Compose
docker-compose up --build
Our microservices architecture includes the following components:
- API Gateway
Entry point for client requests, routing to appropriate services - Authentication Service
Provides authentication for requests to internal services. ApiGateway sends requests to the auth service as a middleware for all requests except Excluded Routes - User Management Service
Manages user management and authentication - Friend Service
Handles users' friendships. - Bucket Service
Service that stores and serves files such as Media, Photo, etc. - Game Playing Service
Service that processes the game on the server side. It has a Websocket consumer and connects to wss. - Game Service
Manages game logic and state - Mail Service
A consumer that consumes RabbitMQ. Asnyc handles cases such as 2FA code, Email verification, Forgot Password. - Status Service
Handles online/offline status of users.