Skip to content

Link-Wolf/ft_transcendence

Repository files navigation

Link-Wolf - ft_transcendence 42 grade - 100 / 100 Year - 2023 stars - ft_transcendence forks - ft_transcendence issues - ft_transcendence Package - NodeJS Package - React DB - PostgreSQL OS - linux

Logo

ft_transcendence

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
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing

About The Project

preview of our website

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).

(back to top)

Getting Started

You shouldn't need a lot of things to run the project but be sure to follow the instructions below.

Prerequisites

Having docker and docker-compose installed on your machine is the only requirement.

Installation

  1. Clone the repo

    git clone https://github.com/Link-Wolf/ft_transcendence.git
  2. Duplicate and fill the .env file

    cd ft_transcendence
    cp .template.env .env
    [vim/nano/code] .env
  3. Then launch the project

    cd ft_transcendence; make
  4. Now you could access the website at the address and port you specified in the .env file

(back to top)

Usage

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!

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)