42-transcendence

42 License: MIT Version

Contributors:

GitHub GitHub GitHub GitHub GitHub

Trainscendence

Time to shine!

Project Overview

Version 15.1

ft_transcendence is a group project focused on creating a website for a Pong contest. The project requires adherence to specific technical and security constraints, with opportunities for modular enhancements.

Thanks to your website, users will play Pong with others.

Mandatory Requirements

  1. Website Development
    • Single-page application using pure vanilla JavaScript for frontend unless overridden by a module.The user should be able to use the Back and Forward buttons of the browser.
    • Backend in pure Ruby, unless overridden by a module.
    • Compatibility with the latest version of Google Chrome.
    • No unhandled errors or warnings during navigation.
    • Deployment via a single Docker command, using rootless mode on Linux clusters.
  2. Game Features
    • Real-time multiplayer Pong game with identical paddle speeds for all players, including AI.
    • Tournament system with player registration and matchmaking.
  3. Security Concerns
    • Password hashing, protection against SQL injections/XSS.
    • HTTPS for all connections.
    • Form and user input validation.

Modules

Beneath is a table outlining all possible modules for the ft_transcendence project, including their type, points and whether we did them or not. Major modules are worth 10 points each, and minor modules are worth 5 points each.

Module Category Module Description Type Points Completed
Web Use a Framework as backend Major 10
Web Use a front-end framework or toolkit Minor 5
Web Use a database for the backend Minor 5
Web Store the score of a tournament in the blockchain Major 10
User Management Standard user management, authentication, users across tournaments Major 10
User Management Implementing a remote authentication Major 10 [ ]
Gameplay and User Experience Remote players Major 10
Gameplay and User Experience Multiplayers (more than 2 in the same game) Major 10 [ ]
Gameplay and User Experience Add Another Game with User History and Matchmaking Major 10 [ ]
Gameplay and User Experience Game Customization Options Minor 5 [ ]
Gameplay and User Experience Live chat Major 10
AI-Algo Introduce an AI Opponent Major 10
AI-Algo User and Game Stats Dashboards Minor 5
Cybersecurity Implement WAF/ModSecurity with Hardened Configuration and HashiCorp Vault for Secrets Management Major 10 [ ]
Cybersecurity GDPR Compliance Options with User Anonymization, Local Data Management, and Account Deletion Minor 5 [ ]
Cybersecurity Implement Two-Factor Authentication(2FA) and JWT Major 10
Devops Infrastructure Setup for log Management with ELK: Elasticsearch, Kibana, Logstash Major 10
Devops Monitoring system with Prometheus and Grafana Minor 5
Devops Designing the Backend as Microservices Major 10
Graphics Use of advanced 3D techniques Major 10
Accessibility Support on all devices Minor 5 [ ]
Accessibility Expanding Browser Compatibility Minor 5 [ ]
Accessibility Multiple language support Minor 5 [ ]
Accessibility Add accessibility for Visually Impaired Users Minor 5 [ ]
Accessibility Server-Side Rendering (SSR) Integration Minor 5 [ ]
Server-Side Pong Replacing Basic Pong with Server-Side Pong and Implementing an API Major 10
Server-Side Pong Enabling Pong Gameplay via CLI against Web Users with API Integration Major 10 [ ]
Testing Implementing a CI/CD testing protocol Extra x

Points Summary

(7 major modules are required to pass the project, 2 major and one minor extra to achieve full bonus points).

Evaluation

Running the application

On the root level of the project, run the following command:

make

This will build the Docker image and run the application. The application will be available at http://localhost:8080.

The modules

Devops (Laurent Brusa)

The assignment implements efficient log management using ELK (Elasticsearch, Logstash, Kibana) and monitoring with Prometheus/Grafana.

Read more about ELK in the docs ELK.md.
And about Grafana in the grafana.md.

Main Endpoints

Additional endpoints:

node exporter

This container will expose a Prometheus exporter for the host machine. It will be available at http://localhost:9100/metrics.

redis

This container will run a Redis instance. It will avalaible on the port 6379 via the redis protocol.

postgres

This container will run a Postgres instance. It will run on the port 5432 and the backend will be able to connect to it. There is a grafana dashboard connected to this datasource.

backend

This container will run the backend of the application. It will be available at http://localhost:8080.