Skip to content

A website with user accounts/profiles and relations (friendships & blocks), real-time multiplayer game and chat (DMs & rooms)!

License

Notifications You must be signed in to change notification settings

Kuninoto/42_ft_transcendence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ft_transcendence (42Porto - 42Cursus)

Project done in collaboration with:

Rodrigo Ramos
João Arsénio

Grade: 100/100

Demonstration:

printscreen of the auth page printscreen of the dashboard page printscreen of the user's profile page

Stack Used

TS Logo  NextJS Logo  Tailwindcss Logo 
NestJS Logo  PostgreSQL Logo  Docker Logo

Overview

A website to host the might pong contest!

Disclaimer: Only tested on Google Chrome and Brave (Also works on Firefox but has a visual bug on user's profile avatar update field)

Features

  • User accounts/profiles and relations (friendships & blocks)
  • OAuth2 Login with 42's intranet and 2FA with Google Authenticator
  • Chat (groups with roles (owner, admin and participant) and DMs)
  • Pong game (with themes!)
  • Matchmaking, 1v1 and match history

Installing and running the project:

1- Install Docker: install Docker engine official docs
2- Clone this repository

git clone https://github.com/Kuninoto/42_ft_transcendence

3- Navigate to lvl_6_ft_transcendence

cd 42_ft_transcendence/lvl_6_ft_transcendence

4- Write a .env file on /backend and /frontend like the .env.example to use your very own configurations
5- Navigate back to lvl_6_ft_transcendence and run the containers

cd lvl_6_ft_transcendence && docker-compose up --build

Useful links

General
Web Development 10min Overview
100+ Web Development Things you Should Know

Frontend Overview
Backend Overview

JavaScript 101
Arrow functions in JavaScript
JavaScript Promises in 10 Minutes
JavaScript Promises in 10 Seconds
Async Await and Promises

NestJS
NestJS explained in 100 seconds
NestJS Tutorial for Beginners
Custom Decorators NestJS Docs
Serve Static NestJS Docs
Official Docs

User Auth
Introduction to OAuth 2.0
Session vs Token Authentication in 100 Seconds
Session vs Token based authentication
NestJS Tutorial - Setting up Passport, OAuth2, TypeORM, Sessions, Session Store, Database
Introduction to JWT
JWT Authentication best practices
JWT usage vs. Session
JWT vs. Opaque tokens
Passportjs serializerUser and deserializeUser
2FA with Google
NestJS passport docs

Chat & Game (WebSockets/Socket.IO)
A Beginner's Guide to WebSockets
WebSockets in 100 Seconds & Beyond with Socket.io
NestJS WebSockets Tutorial Playlist
Full Socket.io and React.js Online Multiplayer Tic-Tac-Toe Game | Socket.io From Zero To Hero

Database
SQL explained in 100 seconds
7 Databases Overview
Dockerhub Postgres image
How to Use the Postgres Docker Official Image
PostgreSQL CLI Cheat Sheet
PostgreSQL Official Docker Image Docs
Difference between one-to-many and many-to-one

Adminer
Definition
What is Adminer and how to use it
Connection Adminer to Postgresql
Setup Adminer with docker for database managment

Gluing the pieces together
NestJS, TypeORM and PostgreSQL full example development and setup
Setting up NestJS with PostgreSQL


Made by Nuno Carvalho (Kuninoto) | nnuno-ca@student.42porto.com

About

A website with user accounts/profiles and relations (friendships & blocks), real-time multiplayer game and chat (DMs & rooms)!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages