Skip to content

pasqualerossi/Transcendence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 

Repository files navigation

๐Ÿ“ Project Overview

This project consists of creating user accounts, chatting in channels and playing the game pong.

๐Ÿง‘ User Account

  • Use OAuth to Authenicate Users To The Website using their 42 Intra Account.
  • Choose a unique username.
  • Upload a profile icon (doesn't have a profile icon, a default one must be set).
  • Two-Factor Authentication (eg. Google Authenticator or Text Message to their Phone).
  • Add friends and see current status (Online, Offline or In A Game).
  • Stats (Wins, Losses, Ladder Level, Achievements) displayed on Profile.
  • User's Match History (1 v 1 Games and Ladder - anyone who they are friends with can see this).

๐Ÿ—ฃ๏ธ Chat

  • Create Channels (Chat Rooms) that are either public, private or protected by a Password.
  • Send Direct Messages to Other Users.
  • Be able to Block Users (No More Messages from a user you blocked).
  • Invite other users to play a game of pong through the chat interface.
  • Access other players profiles through chat interface.

๐Ÿ™‹ Channel Owner

  • The user who creates a new channel is automatically the channel owner, until they leave.
  • Channel owner sets a password required to access a channel, including changing or removing the password.
  • Channel owner is channel admin and can set other users as admins as well.
  • Channel admin can kick, ban and mute other users, but not other channel admins.

๐Ÿ“ Game

  • Users should be able to play a live pong game vs another player directly on the website
  • Matchmaking system - the user can join a queue until they get automatically matched with someone.
  • 2D, 2.5D or 3D Pong.
  • Customisation Options (eg. Power-ups, Different Maps), however, the user should be able to select a default version of the game.
  • The Pong Game must be responsive.


๐Ÿ•น๏ธ Use Cases

All the different things a user can do when they come to this website:

๐Ÿก Channel Owner

  • Creates, Edits and Deletes Channels

๐Ÿง‘โ€๐Ÿ’ป Admin

  • Add, Edit and Remove Passwords of Channels
  • Ban, Mute and Remove Users of Channels
  • Set Admins of The Channels

๐Ÿง User

  • Create a Profile
  • Update Profile Icon
  • Change Username
  • Enable Two-Factor Authentication
  • Add, Send Invites, Accept Invities, Remove, Block and Un-Block Friends

๐Ÿ“ Game

  • Play The Pong Game

๐Ÿ’ฌ Chat

  • Join and Leave Channels
  • Send Messages in Chat within the Channel
  • Send Invites to Other Users to play the Pong Game


๐Ÿ“ฆ Database Structure

The Database Structure for this project consists of the profile the user creates, the pong game stats and the chat history. The reason for this database is to show how everything is connected in this project.

๐Ÿ–ฅ๏ธ Profile

User

  • My Player ID
  • My Username
  • My Profile Icon
  • My Status (Online or Offline)
  • My 2FA (2-Way Authentication) Details

๐ŸŽฎ Game

Player

  • My Level
  • Number of Wins I've Had
  • Number of Losses I've Had

Game History

  • All Games History ID that I've been in
  • All Game Modes that I've been in (Single or Duos or Groups)
  • The History of Winners in Games
  • The History of Losers in Games
  • The History of Winners Scores in Games
  • The History of Losers Scores in Games
  • When The History of Games were Created

๐Ÿง‘โ€๐Ÿš€ Chat

Message

  • The Message ID
  • The Content of My Messages
  • When Those Messages was Created

Chat Room

  • The Chatroom ID
  • The Chat Name
  • The Chat Channels
  • Is Channel Public
  • The Channels Password
  • When The Channel was Created
  • When The Channel was Updated

Membership

  • The Membership ID
  • My Role in that Channel
  • Am I banned within a Channel
  • Am I muted within a Channel


โŒจ๏ธ Development

๐Ÿ–ผ๏ธ Frontend

  • Any TypeScript Framework can be chosen for this project (Vue.js, Express.js, Next.js, Angular, Svelte, etc)

๐Ÿšช Backend

  • Nest.js

๐Ÿ“ฆ Database

  • PostgreSQL

๐Ÿ’‚ Security

  • Passwords must be hashed, protected against SQL injections and server-side validation for forms and any user input

๐ŸŒ Browser

  • Compatible with Google Chrome and Firefox or Safari

๐Ÿƒ Run Command

docker-compose up --build