Skip to content

A Full Stack project that focuses on the organisation, registration and management of Games.

License

Notifications You must be signed in to change notification settings

vihaan-that/Colosseum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Colosseum: E-Sports Tournament Hosting Platform

Colosseum is a web platform for organizing and participating in e-sports tournaments. It allows organizers to create tournaments, manage teams, and track tournament progress. Players can register, join tournaments, and view tournament results. The platform also provides administrative control for banning or approving users and tournaments, ensuring a secure and fair experience for all participants.

Table of Contents

Features

  • Player Registration & Login: Players can register, log in, and participate in tournaments.
  • Tournament Creation: Organizers can create and manage tournaments.
  • Team Management: Organize players into teams and manage team participation.
  • Real-time Updates: View tournament progress and track results.
  • Admin Controls: Admins can ban/unban users and approve tournaments.
  • Secure Authentication: Uses JWT-based authentication for players and organizers.
  • Role-based Access Control: Provides different levels of access for admins, organizers, and players.

Tech Stack

  • Frontend: HTML, CSS, JavaScript, EJS for templating.
  • Backend: Node.js, Express.js, MongoDB.
  • Authentication: JWT (JSON Web Token).
  • Database: MongoDB for storing player, team, tournament, and report data.
  • Middleware: Custom middleware for authentication and role-based access control.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/colosseum.git
    cd colosseum
  2. Install the dependencies:

    npm install
  3. Set up the environment variables. Create a .env file in the root directory with the following values:

    MONGO_URI=mongodb://localhost:27017/tournamentDB
    JWT_SECRET=your_jwt_secret_key
  4. Start the server:

    npm start
  5. Open the browser and navigate to http://localhost:3000 to view the application.

Configuration

To configure the environment variables, update the .env file as follows:

  • MONGO_URI: MongoDB connection string.
  • JWT_SECRET: Secret key used for signing JWT tokens.
  • Port Configuration: The default port is 3000. You can change it in the app.js file if needed.

Usage

  1. Player Registration and Login: Players can sign up and log in from the homepage.
  2. Organizing a Tournament: After logging in, organizers can create new tournaments and manage them.
  3. Team Management: Organizers can create teams, and players can join teams.
  4. Admin Controls: Admins can ban/unban users and approve tournaments through the admin dashboard.

Project Structure

├── backend
│   ├── app.js              //Server      
│   ├── controllers         //Controller Files To Handle Backend Logic
│   ├── middleware          //Middleware Functions To Handle Authentication
│   ├── models              //Database Schema
│   └── routes              //Handles Routing Logic
├── frontend
│   ├── assets              //Contains Front-End Assets         
│   └── views               //Contains Views to be rendered

Main Components

  • app.js: Initializes the server, connects to the database, and sets up routes and middleware.
  • controllers: Contains the logic for players, organizers, admins, and tournament handling.
  • models: Mongoose models for Player, Organiser, Team, Tournament, etc.
  • routes: Defines the API routes for different entities (players, organizers, tournaments, etc.).
  • views: Contains EJS templates for rendering the frontend.

API Endpoints

Auth Routes

  • POST /auth/login: Log in as a player or organizer.
  • POST /auth/register: Register a new player.

Player Routes

  • POST /api/player: Create a new player.
  • GET /api/player/:id: Get player details.

Tournament Routes

  • POST /api/tournament: Create a new tournament.
  • GET /api/tournament/:id: Get tournament details.

Admin Routes

  • POST /api/admin/banPlayer/:id: Ban a player.
  • POST /api/admin/unbanPlayer/:id: Unban a player.
  • POST /api/admin/approveTournament/:id: Approve a tournament.

For a full list of API routes, see the API documentation.

#SNAPSHOTS TO DESCRIBE THE FLOW OF APPLICATION

Screenshot from 2024-09-27 05-37-50

Screenshot from 2024-09-27 05-37-59

Screenshot from 2024-09-27 05-38-42

Screenshot from 2024-09-27 05-38-56

Screenshot from 2024-09-27 05-39-07

Screenshot from 2024-09-27 05-40-45

Screenshot from 2024-09-27 05-41-19

Screenshot from 2024-09-27 05-57-34

Screenshot from 2024-09-27 05-57-51

Screenshot from 2024-09-27 05-58-01

Screenshot from 2024-09-27 05-58-06

Screenshot from 2024-09-27 05-59-19

Screenshot from 2024-09-27 05-59-19

Screenshot from 2024-09-27 06-00-04

Screenshot from 2024-09-27 06-00-14

Screenshot from 2024-09-27 06-00-31

Screenshot from 2024-09-27 06-00-43

Screenshot from 2024-09-27 06-01-01

Screenshot from 2024-09-27 06-01-28

Screenshot from 2024-09-27 06-01-33

Screenshot from 2024-09-27 06-01-45

Screenshot from 2024-09-27 06-02-00

Screenshot from 2024-09-27 06-02-10

Screenshot from 2024-09-27 06-02-10

Screenshot from 2024-09-27 06-02-10

Screenshot from 2024-09-27 06-03-16

Screenshot from 2024-09-27 06-03-20

Screenshot from 2024-09-27 06-03-36

Screenshot from 2024-09-27 06-03-36

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Full Stack project that focuses on the organisation, registration and management of Games.

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •