Skip to content

Our solution for ft_transcendence of the common core of 42 school.

Notifications You must be signed in to change notification settings

tblaase/ft_transcendence

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

header

ft_transcendence

This is our ft_transcendence, the last project from the common core of 42 school
The project is the result of the collaboration between shackbei, tgrossma, mstrantz, tblaase and kprzybyl.

⚠️ This project will no longer be maintained and by now has some security issues that where not public until after we finished this project.
Here you can read about CVE-2022-23529, it affects JsonWebToken <= 8.5.1.
We are using 8.5.1 which was the latest stable version available during the project.

show result

result

Contents

Overview

In this project we were challanged to create a website where you can play pong and interact with other users.
For loggin into the page we had to use the OAuth system of 42 intra API.
The frontend had to be developed in a TypeScript framework of our choice.
The backend had to be written in NestJS.
As database we had to use PostgreSQL.
All details are listed in our requiremnts.txt.
Here are some example pictures from our project:

show login page

login


show profile page

profile


show profile settings page

settings


show pregame page

pregame


show ingame page

ingame


show after game page

aftergame


show scoreboard page

scoreboard


show chat page

chat


show chat owner page

chat_admin

Env File

⚠️ The file has to be named .env and it has to have this path /src/backend/.env
⚠️ NEVER publish this .env file since it may contain sensitive data as for example your API secret.
Theses following variables have to be set inside the file:

  • CLIENT_ID can be found on intra
  • CLIENT_SECRET can be found on intra
  • HOST this will be the IP-address of your server, i.e. http://localhost
  • CALLBACK this will be the same url as the callback-url in your intra,
    i.e. http://localhost:3000/auth/login/callback
  • POSTGRES_USER this will be the username for setting up and accessing the database (for some reason has to be the same as PGDATABASE)
  • POSTGRES_PASSWORD this will be the password for the user above
  • PGDATABASE this will be the name of your database (for some reason has to be the same as POSTGRES_USER)
  • JWT_PASSWORD this will be the password of your JWT-service
  • TWO_FACTOR_AUTHENTICATION_APP_NAME this will be name of your 2FA app

here you can find a template for our .env

How to launch

You need:

  • Docker
  • 2.5GB of discspace for the Docker-Images/Containers/Volume
  • 42 Intra API Key

Launch our project via the Makefile by using make or make all in the root directory of the repository. This takes 90 seconds here in our school, times may vary depending on the download speed.

For shutting down the server but not deleting anything use make down in the root of the repo.

For deleting every docker container/image/volume that is currently not used, use make clean in the root of the repo.

footer

Languages

  • TypeScript 54.4%
  • Vue 42.7%
  • Shell 0.8%
  • CSS 0.8%
  • Dockerfile 0.6%
  • JavaScript 0.4%
  • Other 0.3%