Giter Site home page Giter Site logo

api-submission---workindia's Introduction

SDE API Assignment by WorkIndia - Match Management System

Welcome to the Match Management System API documentation! This system allows administrators to manage matches, teams, and players, while also providing guests access to view match details and player statistics.

Table of Contents

Introduction

The Match Management System API is designed to facilitate the management of matches, teams, and players for sports events. It provides a secure environment for administrators to perform CRUD operations on matches, teams, and players, while also allowing guest users to view match details and player statistics.

Features

  • Admin Panel: Administrators can create, edit, and delete matches, teams, and players.
  • Guest Access: Guest users can view match details and player statistics without authentication.
  • JWT Authentication: Secure authentication using JSON Web Tokens (JWT) for admin access.

Technologies Used

  • Node.js
  • Express.js
  • MySQL
  • JSON Web Tokens (JWT)
  • Docker

Installation

  1. Clone the repository:
git clone https://github.com/thekavikumar/API-Submission---WorkIndia.git
  1. Install dependencies:
cd API-Submission---WorkIndia
npm install
  1. Configure MySQL database settings in .env file:
DB_HOST=your_database_host
DB_USER=your_database_username
DB_PASSWORD=your_database_password
DB_NAME=your_database_name

Usage

  1. Register as an administrator to obtain an authentication token.
  2. Use the obtained token to authenticate and access admin privileges.
  3. Use the provided endpoints to manage matches, teams, and players.
  4. Guest users can access match details and player statistics without authentication.

API Endpoints

  • POST /api/admin/signup: Register as an administrator.
  • POST /api/admin/login: Login as an administrator.
  • GET /api/matches: Retrieve all matches.
  • GET /api/matches/:id: Retrieve match details by ID.
  • POST /api/matches: Create a new match.
  • GET /api/teams: Retrieve all teams.
  • GET /api/teams/:id: Retrieve team details by ID.
  • POST /api/teams: Create a new team.
  • GET /api/players: Retrieve all players.
  • GET /api/players/:id: Retrieve player details by ID.

Authentication

  • Authentication is required for accessing admin privileges.
  • Use JSON Web Tokens (JWT) obtained after successful login for authentication.
  • Include the JWT in the Authorization header of API requests:
Authorization: Bearer your_jwt_token

Running with Docker

  1. Make sure you have Docker installed on your machine.
  2. Build the Docker image:
docker build -t cricbuzz-platform .
  1. Run the Docker container:
docker run -p 3000:3000 -d cricbuzz-platform

Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

api-submission---workindia's People

Contributors

thekavikumar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.