Soon, you will realize that you already know things
that you thought you didn’t
A fullstack typescript web app to play pong online in multiplayer with a tchat and some others features (ft. iCARUS and Firencio)
Report Bug
·
Request Feature
Table of Contents
This project aims to create a website to play Pong. It's a group project i made with iCARUS and Firencio. It requires us to develop a full web app complaining with the following technicals constraints:
- Write the back-end of the website in NestJS
- Write the front-end of the website in a typescript framework (we chose React)
- Use the latest stable version of any library or framework used
- Use a PostgreSQL database and no other database
- The website must be a single page application
- The website must be compatible with the latest version of Chrome and one other browser of our choice
- Users should not encounter any error or warning when browsing the website
- Everything has to be launched by a single call to
docker-compose up --build
- Any password must be hashed in the database
- The website must be protected against SQL injections
As for the features, we had to implement a Chat in addition to the Pong game. It includes channels management (bans, mutes, kick, admins), private messages, a list of users and other classics chat features.
A user account is required to play Pong. It can only be created by connecting to the website with the OAuth system of 42 Intranet. It is then defined by their login, a unique name they can choose, same for their avatar, and an optionnal two-factor authentication. All their infos, relationships (friends and blocked users) and stats related to the game are accessible for them on their profile page.
For the game itself a player is able to create a game and wait in a queue for another player to join. Or it can also see which games are available and join one of them, only by seeing the game specifications without knowing who is the other player. We implemented a classic and faithful Pong game, but also add differents maps and modifiers such as an increased or decreased paddle size, a ball that accelerate over time, or a fun mode where bonuses are randomly spawned on the map that can be picked up by the players to get a random effect (from a bonus to a malus or even a ball multiplication).
You shouldn't need a lot of things to run the project but be sure to follow the instructions below.
Having docker and docker-compose installed on your machine is the only requirement.
-
Clone the repo
git clone https://github.com/Link-Wolf/ft_transcendence.git
-
Duplicate and fill the .env file
cd ft_transcendence cp .template.env .env [vim/nano/code] .env
-
Then launch the project
cd ft_transcendence; make
-
Now you could access the website at the address and port you specified in the .env file
The website is pretty intuitive and easy to use. Some effort has been made to make it as user-friendly as possible with our poor skills in front-end development. Use our Pong website to play with your friends, chat with them, and have fun testing it!
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request