Skip to content

Single page web application powering the mighty Pong contest.

Notifications You must be signed in to change notification settings

ehautefa/42-2022-transcendence

Repository files navigation

ft_transcendence

Final project of 42's Common Core.
Single page web application powering the mighty Pong contest !

  • Beautiful retro design;
  • Accessible via 42 Authentication;
  • SQL injections proof.

ft_transcendence

Features

A multiplayer playable Pong game:

  • Matchmaking system;
  • Custom options (ball color, bar size);
  • Game responsiveness;
  • Spectator mode.

User accounts

  • Customizable name and avatar;
  • Possible two factor authentication via Google Authenticator;
  • Friends management system;
  • Displayed status (online, offline);
  • Stats, game history, achievements.

A fully functional web chat:

  • Direct messages;
  • Public rooms, private rooms on invitation and protected rooms accessible via password;
  • Possibility to block, mute or ban other users;
  • Roles management system: owner, administrator or simple user;
  • Game invitations.

Technologies used

              
              

              

Usage

Step 1

Create an application on your 42 account (if you do not have a 42 account, you can get one here):
Settings => API => REGISTER A NEW APP
Fill up the informations of your app the way you want except for the Redirect URI field which must be:
https://hostname:4443/auth/login (https is mandatory, no / at the end).
For a local setup, hostname will be the hostname of your machine, which you can get by typing hostname in your terminal.

Step 2

Add the .env file to the root of the project. You can find a template here. Be sure to fill it properly:

  • The APP_HOST variable is set to your hostname;
  • The FT_CLIENT_ID variable is set to the UID you got on step 1;
  • The FT_CLIENT_SECRET variable is set to the secret you got on step 1;
  • The JWT_ACCESS_TOKEN_SECRET variable is set to a a string of characters you can ramdomly generate.

Step 3

Build the app.

docker-compose up --build

You can now navigate to https://hostname:4443 (do not forget to replace hostame) and enjoy a good old Pong Game with your 42's friends. 😉