- Introduction
- Features
- Technologies
- Modules Implemented
- Getting Started
- Installation
- Usage
- Security
- License
Transcendence is a web-based Pong game developed as part of the ft_transcendence project at 42. This is 42's common core capstone project, where students explore new technologies and develop a robust, scalable web application. The game supports real-time multiplayer Pong, along with various advanced modules to extend functionality, such as AI opponents, secure authentication, user management and blockchain integration for tournament scores.
Grade: 125/100
- Real-Time Pong Gameplay: Play the classic Pong game against other players online in real time.
- Tournaments: Organize and participate in tournaments with matchmaking and tracking.
- User Authentication: Secure registration and login system for players.
- AI Opponent: Challenge an AI opponent with dynamic behavior.
- Customization: Players can adjust game settings, including power-ups and different maps.
- Live Chat: Communicate with other players during gameplay and tournaments.
- Game History: Track your performance, wins, and losses through a user profile.
- Blockchain Integration: Tournament scores are securely stored using Ethereum smart contracts.
- Microservices Architecture: Backend designed with microservices for flexibility and scalability.
- Frontend: Vanilla JavaScript, Bootstrap (for UI/UX).
- Backend: Django (framework for the backend) and Django Rest Framework (APIs)
- Database: PostgreSQL.
- Blockchain: Ethereum (for storing tournament scores). Sepolia is used as testing chain
- Docker: Used to containerize the applications (backend is implemented as microservices).
- WebSockets: For real-time communication during gameplay.
Here are the major and minor modules selected for this project:
- Web Framework: A backend framework (Django) is used to manage game logic, user management, and interactions.
- Database Integration: PostgreSQL is used as the database for storing user data and game information.
- Blockchain for Tournament Scores: Tournament scores are securely stored on the Ethereum blockchain.
- Standard User Management: Players can register, log in, and manage their profiles, with authentication across tournaments.
- Remote Authentication (OAuth): Secure authentication using OAuth 2.0 with the 42 platform.
- Remote Players: Play against players remotely in real-time Pong matches.
- AI Opponent: An AI opponent with dynamic behavior is introduced for single-player gameplay.
- Microservices: The backend is designed using microservices architecture for flexibility and scalability.
- Frontend Framework: Bootstrap is used for designing a responsive and user-friendly interface.
- User and Game Stats Dashboards: Dashboards for tracking and displaying user and game statistics.
- Expanding Browser Compatibility: The game supports multiple browsers, ensuring a seamless user experience across different platforms.
- Multiple Language Support: The game supports multiple languages, catering to a diverse user base.
To run this project, ensure you have the following prerequisites installed:
- Docker
- Docker-Compose
- A modern browser (Google Chrome recommended)
-
Clone the repository:
git clone https://github.com/romz8/transcendence.git cd transcendence
-
Build and run the Docker container
docker-compose up --build
2 (bis). Or simply run make:
make
This command will set up both the frontend and backend using Docker. The application will be accessible at https://localhost:3001
.
- Access the game by navigating to the main URL after running the Docker container.
- Players can register, log in, and join a game against other online players.
- If no opponents are available, players can challenge the AI.
- View and manage your profile, including match history and stats.
- Passwords are securely hashed before being stored.
- The platform is protected against SQL injection and XSS attacks.
- Secure WebSockets (wss) and HTTPS are enforced.
- JWT are implemented for enhanced authentication security.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any inquiries, feel free to reach out:
- GitHub: romz8