Skip to content

callmemehdy/ft_transcendence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

385 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ft_transcendence

The Ultimate Ping Pong Platform ๐Ÿ“

The Transcendence
๐ŸŽฅ Click the image above to watch the demo

License Docker Next.js Fastify Vault Testing

"Not just a game. A lesson in secure, scalable, real-time architecture."

๐Ÿ“‘ Table of Contents


๐Ÿš€ Overview

ft_transcendence is a feature-rich, real-time multiplayer Pong platform. But under the hood, it's a showcase of modern DevOps and Secure Software Development Life Cycle (SSDLC) practices.

Built with a microservices-inspired architecture, it leverages Next.js for a responsive frontend, Fastify for a high-performance backend, and HashiCorp Vault for enterprise-grade secret management. This isn't just a coding exercise; it's a simulation of a production-ready environment.


โœจ Key Features & "The Why"

Why this stack? Because performance and security matter.

  • ๐Ÿ›ก๏ธ Enterprise Security (Vault): Unlike typical student projects that store secrets in .env files, this project uses HashiCorp Vault to manage secrets dynamically. This mimics real-world banking and enterprise security standards.
  • โšก Real-Time Performance: Utilizes WebSockets for low-latency gameplay, ensuring a smooth competitive experience.
  • ๐Ÿ‹ Containerized Infrastructure: Fully Dockerized environment ensuring consistency from development to production. make up is all you need.
  • ๐Ÿ” Two-Factor Authentication (2FA): Implements industry-standard TOTP 2FA for robust user account security.
  • ๐Ÿ“Š Interactive Dashboard: Dynamic visualizations of user stats and match history.

๐Ÿ—๏ธ Architecture

This project follows a separation of concerns principle, dividing the application into distinct, containerized services:

graph TD
    User[User] -->|HTTPS/WSS| Nginx[Nginx WAF & Load Balancer]
    Nginx -->|Traffic| Frontend[Next.js Frontend]
    Nginx -->|API Req| Backend[Fastify Backend]
    Backend -->|Read/Write| DB[(Database)]
    Backend -->|Auth| Vault[HashiCorp Vault]
    Backend -->|Metrics| Prom[Prometheus Monitor]
Loading

Tech Stack

Component Technology Reasoning
Frontend Next.js 15, Framer Motion SSR for SEO and performance; Motion for premium feel.
Backend Fastify (Node.js) Low overhead, high throughput API handling.
Database PostgreSQL / SQLite Relational data integrity for match history.
Security HashiCorp Vault Centralized secret management (No hardcoded keys!).
DevOps Docker Compose, Makefile 1-command deployment and environment isolation.

๐Ÿ“ธ Visual Showcase

๐ŸŽฎ Gameplay & Matchmaking

Remote Match Launcher Tournament Launcher
Remote Match Tournament
Local Launcher Matches History
Local Match History

๐Ÿ‘ค User Profile & Settings

User Profile Account Settings
Profile Settings

๐Ÿ” Authentication

Login Page Registration
Login Register

๐Ÿ’ฌ Social & Features

Live Chat Dashboard (Main)
Chat Dashboard

๐ŸŒ Internationalization & Accessibility

Dashboard (Arabic) Dashboard (French)
Dashboard AR Dashboard FR
High Contrast Mode Dark Mode
High Contrast Dark Mode

๐Ÿ“Š DevOps & Monitoring

Grafana Query Dashboard Grafana HTTP Dashboard
Grafana 1 Grafana 2

๐Ÿ› ๏ธ Getting Started

We believe in "Infrastructure as Code". You don't need to configure 10 files to run this.

Prerequisites

  • Docker & Docker Compose
  • Make

Installation

  1. Clone the repository

    git clone git@github.com:salahrachidi/The-transcendence.git
    cd ft_transcendence
  2. Launch the Infrastructure

    make up

    This command orchestrates the frontend, backend, database, and Vault containers automatically.

  3. Access the App Open https://localhost in your browser. (Accept the self-signed certificate, part of our HTTPS setup).


๐Ÿ’ก Challenges Solved

  • Immersive Arcade UI: Crafted a custom Glassmorphism/Neon design language using TailwindCSS, Framer Motion, and Lucide Icons to enhance user immersion to the Arcade game vibe.
  • The "Cookie" Dilemma: Solving SameSite=Strict policies while handling cross-container communication.
  • Secret Zero: Bootstrapping Vault securely without hardcoding the initial unseal tokens in the application code.
  • State Synchronization: Handling race conditions in real-time game logic using optimistic UI updates.

๐Ÿ“ฌ Contact

Mehdi El Akary - AI/ML & DevOps Enthusiast LinkedIn | GitHub

Salaheddine rachidi - Full-Stack & Robotics & AI/ML Enthusiast LinkedIn | GitHub

mohamed elhoudaigui - AI/ML & Backend Enthusiast LinkedIn | GitHub

Anas El Ammari - CyberSecurity & AI/ML Enthusiast LinkedIn | GitHub

About

Real-time multiplayer gaming platform with social features. Built with team collaboration, featuring JWT authentication, 2FA, live chat, user dashboards, and real-time ping-pong game with matchmaking system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors