This project is about creating a web app for the mighty Pong contest!
Users can login using the OAuth system of the school's intranet and enable two-factor authentication as well as add friends, see stats of the games they played, invite other users to join a game, etc. In addition to that, users can send each other direct messages and create chat rooms. Finally, they can play the mighty Pong game against each other or watch other players busy playing.
- Programming language: Typescript
- Frontend: ReactJS & Material UI
- Runtime environment: NodeJS
- Backend: NestJS
- Database: PostgreSQL
- Containerization: Docker
- Duplicate 'template.env' and name it '.env'.
-
Choose a proper jwt secret in src/auth/constants and name it 'constants.ts'.
-
Duplicate template.env located at src/common/envs and fill in the details:
- FORTYTWO_ID and FORTYTWO_APP_SECRET will be given when registrating the app on the intranet of 42
-
If you want to launch the project with 'make', change the DATABASE_HOST variable in the .env file with 'db'
- Duplicate template.env in the frontend root folder and fill the new file (named '.env').
$ docker run --link database-docker:db --network ft_transcendence_mynetwork --name adminer -p 8080:8080 -d adminer
# Change the db host in the ./backend/src/common/envs/.env to localhost
# Don't forget to change it to 'db' after if you want to run backend with docker.
# run the database from backend directory
$ docker run -h db --name postgres --env-file .env -p 5432:5432 -d postgres
#run adminer
$ docker run --link postgres:db --name adminer -p 8080:8080 -d adminer
# You can connect to adminer (localhost:8080) with :
# - System : PostgreSQL
# - Server : db
# - Username : postgres
# - Password : password provided in the .env file
# - Database : database name provided in the .env file
# stop testing databases
$ docker stop postgres adminer
$ docker system prune -af
$ docker volume prune -f
Make sure docker is installed.
If you want to run the project from one of school 42's mac, make sure to first launch the init_docker.sh
script.