Skip to content

This project is the final project of the 42 Common Core curriculum. It is a Full Stack website. The front side is Pure JS and Single Page Application. The backend side is designed and written with Django as a microservice architecture.

Notifications You must be signed in to change notification settings

yigithankarabulut/ft_transcendence

Repository files navigation

ft_transcendence

Final project of the Ecole 42 Common Core curriculum. An advanced version of the classic Pong game, built using a microservices architecture with AI opponents, remote multiplayer capabilities, and robust user authentication. Frontend developed with Pure JS as a Single Page Application. Backend developed with Django Rest Framework.

Project Subject: https://cdn.intra.42.fr/pdf/pdf/117706/en.subject.pdf

Table of Contents

Introduction

This project aims to create an enhanced version of the Pong game with a focus on scalability, security, and advanced gameplay features. By leveraging microservices architecture and modern web technologies, we've built a robust platform that goes beyond the traditional Pong experience.

Features

  • Microservices Architecture: Backend designed as microservices for improved scalability and maintainability. Each service has its own database.
  • User Management: Standard user management system with authentication across tournaments.
  • Remote Authentication: Implement secure remote authentication for users.
  • Two-Factor Authentication (2FA): Enhanced security with 2FA and JWT (JSON Web Tokens).
  • AI Opponent: Challenge yourself against an intelligent AI player.
  • Remote Multiplayer: Play against other players remotely.
  • Server-Side Pong: Core game logic implemented on the server for fair play.
  • RESTful API: Full-featured API for game interactions and data management.
  • Frontend Framework: Modern, responsive user interface built with a frontend framework/toolkit.
  • Database Integration: Robust data management using a backend database.

Installation

To set up this project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yigithankarabulut/ft_transcendence.git
    cd ft_transcendence
  2. Edit .env file
    Edit .env file for both frontend and backend with necessary configurations

  3. Run with Docker Compose

    docker-compose up --build

Architecture

Our microservices architecture includes the following components:

  1. API Gateway
    Entry point for client requests, routing to appropriate services
  2. Authentication Service
    Provides authentication for requests to internal services. ApiGateway sends requests to the auth service as a middleware for all requests except Excluded Routes
  3. User Management Service
    Manages user management and authentication
  4. Friend Service
    Handles users' friendships.
  5. Bucket Service
    Service that stores and serves files such as Media, Photo, etc.
  6. Game Playing Service
    Service that processes the game on the server side. It has a Websocket consumer and connects to wss.
  7. Game Service
    Manages game logic and state
  8. Mail Service
    A consumer that consumes RabbitMQ. Asnyc handles cases such as 2FA code, Email verification, Forgot Password.
  9. Status Service
    Handles online/offline status of users.

About

This project is the final project of the 42 Common Core curriculum. It is a Full Stack website. The front side is Pure JS and Single Page Application. The backend side is designed and written with Django as a microservice architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published