Welcome to Transcendence, the final project of the 42Cursus common core program.
## β¨ Project OverviewTranscendence is about making a website that allows users to play pong.
- Use a Framework to build the backend
- Use a framework or a toolkit to build the frontend
- Use a database for the backend
- Store the score of a tournament in the Blockchain
- Standard user management, authentication, user across tournaments
- Implementing a remote authentication
- Remote players
- Multiplayers (more than 2 in the same game)
- Add Another Game with User History and Matchmaking
- Game Customization Options
- Live chat
- Introduce an AI Opponent
- User and Game Stats Dashboards
- Implement WAF/ModSecurity with Hardened Configuration and HashiCorp Vault for Secrets Management
- GDPR Compliance Options with User Anonymization, Local Data Management, and Account Deletion
- Implement Two-Factor Authentication (2FA) and JWT
- Support on all devices
- Expanding Browser Compatibility
- Multiple language supports
- Add accessibility for Visually Impaired Users
- Server-Side Rendering (SSR) Integration
- Replacing Basic Pong with Server-Side Pong and Implementing an API
- Enabling Pong Gameplay via CLI against Web Users with API Integration
We used Django for our backend development.
We used Bootstrap toolkit in addition of the vanilla Javascript for our frontend
We used a database for our backend. The database itself is PostgresSQL.
We store the tournament scores on a blockchain. The blockchain is Ethereum and the language used for smart contract development is Solidity.
Users can subscribe to the website and registered users can log in in a secure way. Users can select a unique display name to play the tournaments. They can update their information, upload an avatar (there is a default avatar if they don't provide one), add others as friends and view their online status. User profiles display stats (their wins and losses) and each user has a match history.
Implementation of the following system: OAuth 2.0 authentication with 42.
It is possible for two players, using two different computers, to access the website and play pong together. Network issues have been taken into account.
Pong can be played by 2 or 4 players.
It is possible to play another game than pong : connect 4. There is an history and players can join a game by using the matchmaking system.
It is possible to play against an AI in the CLI (Command-Line Interface).
We are compliant with the GDPR. Users are able to request anonymization of their personal data, which ensure that their identity and sensitive information are protected. They can also view, edit or delete their personal information stored within the system. They can request the permanent deletion fo their account.
We implemented Two-Factor Authentication (2FA) and we utilize JSON Web Tokens (JWT) as a secure method for authentication and authorization.
We established a robust infrastructure for log management and analysis using the ELK stack (Elasticsearch, Logstash, Kibana).
We set up a monitoring system using Prometheus and Grafana.
The backend follows microservices best practices.
Players can choose to play pong in 3D. We used ThreeJS/WebGL to create the graphics.
The website is designed in mobile first, responsive, supported on all devices.
The website is compatible with at least Chrome, Chrome-based and Firefox.
Players can change the language of the website. The supported languages are English, French, Spanish and Dutch.
We integrated Server-Side Rendering (SSR) to enhance the performance and SIO (Search Engine Optimization) of the website.
We replaced the basic pong game with a server-side pong game, accompanied by the implementation of an API.
We developed a Command-Line Interface (CLI) that allows users to play pong against players using the web version of the game.
We added a system of tournament that allows distant players to play together. Users can pick a theme.
- Make sure you have the following installed:
- Docker
- Docker compose
- Set up the environment variables by creating a .env file in the root directory. The required variables are:
POSTGRES_PASSWORD=your_postgres_password
ELASTIC_PASSWORD=your_elastic_password
DISCORD_WEBHOOK_URL=your_discord_webhook_url
KIBANA_ENCRYPTION_KEY=your_kibana_encryption_key
DOMAIN_NAME=your_domain_name
JWT_SECRET_KEY=your_jwt_secret_key
SALT=your_salt
KIBANA_PASSWD=your_kibana_password
DJANGO_SECRET=your_django_secret
CLIENT_42_ID=your_client_42_id
CLIENT_42_SECRET=your_client_42_secret
Once you have all the dependencies, you can compile Transcendence using the following Makefile
commands:
make
This project is licensed under the AGPL v3 License - see the LICENSE file for details.