Skip to content

ilies1511/ft_transcendence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

754 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Logo

Transcendence

Our final project of the 42 School core curriculum.

Score

๐Ÿ“š Table of Contents

๐ŸŽฏ Project Overview

Welcome to ft_transcendence! This is a full-stack web application featuring a real-time 3D Pong game with multiplayer capabilities, user management, chat functionality, tournaments, and much more.

Key Features

  • ๐ŸŽฎ 3D Pong Game with Babylon.js
  • ๐ŸŒ Real-time Multiplayer gaming
  • ๐Ÿ† Tournament System with matchmaking
  • ๐Ÿ’ฌ Live Chat and messaging
  • ๐Ÿ‘ฅ User Management with profiles and friends
  • ๐Ÿ” Security with 2FA and OAuth
  • ๐Ÿ“ฑ Compatibility with all browsers
  • ๐Ÿš€ Containerized deployment with Docker

๐Ÿ“ธ Screenshots

Login Page
๐Ÿ” Authentication
Secure login (Password or OAuth)
Game Selection
๐ŸŽฎ Game
Map selector & game modes
Live Gameplay
๐Ÿ“ Live Gameplay
3D Pong with live chat
User Profile
๐Ÿ“Š User Profile
Stats & match history
Settings Page
โš™๏ธ Settings & Privacy
Avatar upload, 2FA, GDPR features

๐Ÿ› ๏ธ Tech Stack

Category Technology
Frontend TypeScript, Vite, Tailwind CSS, Babylon.js, SPA
Backend Node.js, Fastify, SQLite
Security JWT, OAuth 2.0, 2FA (TOTP), bcrypt, HTTPS, WSS
Real-time WebSockets (ws library)
Infrastructure Docker, Docker Compose, Caddy

๐Ÿš€ Quick Start

Prerequisites

  • Docker
  • Docker Compose
  • Make

Environment Setup

  1. Clone the repository

    git clone <repository-url>
    cd ft_transcendence
  2. Configure environment variables

    cp .env.prod.example .env.prod
    # Edit .env.prod with your secrets (JWT_SECRET, COOKIE_SECRET, Google OAuth credentials)
  3. Generate secrets (if needed)

    # JWT Secret (64 characters)
    openssl rand -hex 32
    
    # Cookie Secret (32 characters)
    openssl rand -hex 16

๐ŸŽฎ Running the Application

Production Mode

# Start the application
make prod-up

# View logs
make prod-logs

# Stop the application
make prod-down

# Alternatively: restart the application
make prod-re

Development Mode

# Start development environment
make dev

# Clean up development containers
make clean

Utility Commands

# Complete Docker cleanup
make ff_clean_docker

# Update environment variables
make update-env

Project Structure

ft_transcendence/
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ frontend/          # Vite + TypeScript frontend
โ”‚   โ”œโ”€โ”€ backend/           # Fastify + Node.js backend
โ”‚   โ””โ”€โ”€ game_shared/       # Shared game logic
โ”œโ”€โ”€ docker/                # Docker configurations
โ””โ”€โ”€ docker-compose.yml     # Container orchestration

๐ŸŒ Access the Application

  • Production: https://localhost:443 or https://<your-hostname>:1443
  • Development: http://localhost:5173 (Frontend) + http://localhost:3000 (Backend)

๐ŸŽฏ Implemented Modules

This project fulfilled all mandatory requirements and includes multiple bonus modules from the subject.

Final Score: 125/100 ๐ŸŽ‰

Web Development

  • โœ… Frontend Framework: TypeScript
  • โœ… Single Page Application: Complete SPA architecture
  • โœ… Browser Compatibility: Firefox, Chrome, Brave
  • โœ… Containerization: Docker deployment with single command

Game Features

  • โœ… Live Multiplayer Pong: Real-time gameplay
  • โœ… Local & Remote Play: Same keyboard or different players
  • โœ… Tournament System: Multi-player tournaments with matchmaking
  • โœ… Server-Side Game Logic: Anti-cheat protection
  • โœ… 3D Graphics: Immersive Babylon.js rendering with camera controls
  • โœ… Game Customization: Adjustable game parameters

User Management

  • โœ… Secure Authentication: Hashed passwords with strong algorithms
  • โœ… OAuth Integration: Google Sign-In support
  • โœ… User Profiles: Custom avatars, usernames, display names
  • โœ… Statistics Tracking: Win/loss records and match history
  • โœ… Two-Factor Authentication: Enhanced security with 2FA
  • โœ… GDPR Compliance: Data export, anonymization, and deletion

Social Features

  • โœ… Real-time Chat: Direct messaging between users
  • โœ… Friends System: Add friends and view online status
  • โœ… User Blocking: Block unwanted interactions
  • โœ… Game Invitations: Invite friends to matches

Security & Infrastructure

  • โœ… HTTPS/WSS: End-to-end encryption
  • โœ… Input Validation: Frontend and backend validation
  • โœ… Protected Routes: Secure access control
  • โœ… CSRF Protection: Cross-site request forgery prevention

๐Ÿ‘ฅ Team

Name Role Profile
Fabian Rapp Game LinkedIn
Iliรจs Ziane Backend LinkedIn
Maksim Volkmann Frontend LinkedIn
Daniel Ilin Frontend LinkedIn | Website

About

This project is centered around the design, development, and organization of a full-stack web application. A PONG Game

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors