Skip to content

vicode-dev/Transcendence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ Transcendence - 42Cursus Project

Welcome to Transcendence, the final project of the 42Cursus common core program.

Uptime Badge

Uptime Badge

## ✨ Project Overview

Transcendence is about making a website that allows users to play pong.

🎯 Key Objectives:

πŸ“š Features

Web

User Management

Gameplay and user experience

AI-Algo

Cybersecurity

Devops

Graphics

Accessibility

Server-Side Pong

Detailed Features

Web

Framework for backend

We used Django for our backend development.

Framework for front-end

We used Bootstrap toolkit in addition of the vanilla Javascript for our frontend

Database for backend

We used a database for our backend. The database itself is PostgresSQL.

Blockchain

We store the tournament scores on a blockchain. The blockchain is Ethereum and the language used for smart contract development is Solidity.

User Management

Standard user management

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.

Remote authentication

Implementation of the following system: OAuth 2.0 authentication with 42.

Gameplay and user experience

Remote players

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.

Multiple players

Pong can be played by 2 or 4 players.

Another game

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.

AI-Algo

AI opponent

It is possible to play against an AI in the CLI (Command-Line Interface).

Cybersecurity

GDPR

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.

2FA

We implemented Two-Factor Authentication (2FA) and we utilize JSON Web Tokens (JWT) as a secure method for authentication and authorization.

Devops

ELK

We established a robust infrastructure for log management and analysis using the ELK stack (Elasticsearch, Logstash, Kibana).

Monitoring system

We set up a monitoring system using Prometheus and Grafana.

Backend as microservices

The backend follows microservices best practices.

Graphics

3D techniques

Players can choose to play pong in 3D. We used ThreeJS/WebGL to create the graphics.

Accessibility

Support on all devices

The website is designed in mobile first, responsive, supported on all devices.

Browser compatibility

The website is compatible with at least Chrome, Chrome-based and Firefox.

Multiple languages

Players can change the language of the website. The supported languages are English, French, Spanish and Dutch.

SSR integration

We integrated Server-Side Rendering (SSR) to enhance the performance and SIO (Search Engine Optimization) of the website.

Server-Side Pong

Server-side pong

We replaced the basic pong game with a server-side pong game, accompanied by the implementation of an API.

CLI

We developed a Command-Line Interface (CLI) that allows users to play pong against players using the web version of the game.

Out of scope

We added a system of tournament that allows distant players to play together. Users can pick a theme.

πŸ› οΈ Installation & Compilation Guide

πŸ“¦ Dependencies

  1. Make sure you have the following installed:
  • Docker
  • Docker compose
  1. 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

πŸ—οΈ Compilation

Once you have all the dependencies, you can compile Transcendence using the following Makefile commands:

make

πŸš€ Usage

πŸ“„ License

This project is licensed under the AGPL v3 License - see the LICENSE file for details.


About

The best transcendence

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published