A web-based multiplayer Pong game. Frontend uses HTML, CSS, and JavaScript. Backend uses Django REST API. The app runs in Docker containers with PostgreSQL database.
- Real-time multiplayer Pong game
- Play against AI or other players
- Tournament system with automated matchmaking
- Single-page application with smooth navigation
- Two-Factor Authentication (2FA)
- JWT authentication
- Multi-language support
- PostgreSQL database
- Docker deployment
- Dockerized
- Runs with
docker-compose up --buildin rootless mode on Linux
- Framework Backend (Django): Scalable server-side solution.
- Remote Authentication (OAuth 2.0 with 42): Secure login via 42's OAuth 2.0.
- Two-Factor Authentication (2FA) & JWT: Enhanced security via 2FA (SMS/app/email) and JWT.
- Multiple Players: More than 2 players in a single game (e.g., 4-player squared board).
- AI Opponent: Simulates human play, uses power-ups (no A* algorithm).
- Database (PostgreSQL): Reliable data storage.
- Front-End Framework (Bootstrap): Responsive UI.
- Browser Compatibility: Supports an additional browser.
- Game Customization: Power-ups, attacks, maps with user-friendly settings.
- Multiple Language Support: 3+ languages with a language switcher.
- Docker
- Docker Compose
- Make (optional, for easier commands)
- Clone the repository:
git clone https://github.com/amine-za/ft_transcendence.git
cd ft_transcendence- Run with Make:
make upOr without Make:
docker compose up --build- Open your browser and go to: https://localhost:443
Note: You will see a security warning because of the self-signed certificate. Click "Advanced" and "Proceed to localhost" to continue.
The application will work immediately with default settings. Email 2FA features will be disabled until you configure email credentials in the .env file.
ft_transcendence/
├── .env.example # Environment variables template
├── .env # Your configuration (auto-created, gitignored)
├── docker-compose.yml # Docker services configuration
├── Makefile # Build automation
├── backend/ # Django REST API
│ ├── Dockerfile
│ ├── requirements.txt
│ └── project/
│ ├── accounts/ # User authentication
│ ├── oauth42/ # 42 OAuth integration
│ ├── twofa/ # Two-factor authentication
│ └── core/ # Django settings
├── frontend/ # Static web files
│ ├── index.html
│ ├── component/ # JavaScript modules
│ ├── assets/ # JS and language files
│ └── styles/ # CSS files
└── images/ # Documentation screenshots
make up # Start all services
make stop # Stop all services
make logs # View application logs
make clean # Remove containers and volumes
make fclean # Complete cleanup including images
make re # Clean and restart
make status # Check container statusThe application works with default settings. To enable email-based 2FA:
- Edit
.envfile after first run - Set Gmail credentials:
EMAIL_HOST_USER=your_gmail@gmail.com
EMAIL_HOST_PASSWORD=your_app_password
- Restart:
make re
To get Gmail app password: Google Account > Security > 2-Step Verification > App passwords
- Frontend: HTML, CSS, JavaScript
- Backend: Django, Django REST Framework
- Database: PostgreSQL
- Deployment: Docker, Nginx
- Authentication: JWT, OAuth 2.0
- Password hashing
- Two-Factor Authentication
- JWT tokens
- Protection against SQL injection and XSS
- HTTPS support
Enjoy ft_transcendence!





