Skip to content

A RESTful API service to manage the leaderboard for a coding platform

Notifications You must be signed in to change notification settings

pgprajwal/CoderHack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

A RESTful API service built with Spring Boot to manage the leaderboard for a coding platform. The application uses MongoDB to persist user data.

Features

  • User Registration: Register a new user with a unique User ID and Username.
  • Update Score: Update the score of a specific user.
  • Badge Awarding: Award badges to users based on their scores.
    • 1 <= Score < 30 -> Code Ninja
    • 30 <= Score < 60 -> Code Champ
    • 60 <= Score <= 100 -> Code Master
  • User Retrieval: Retrieve a list of all registered users.
  • User Deletion: Deregister a specific user from the contest.

Installation and Usage

Prerequisites

  • Java 17 or higher
  • MongoDB
  • Postman for API testing

Getting Started

  1. Clone the repository:

    git clone https://github.com/pgprajwal/CoderHack.git
  2. Navigate to the project directory:

    cd CoderHack
  3. Build and run the application using Gradle:

    ./gradlew bootrun

API Endpoints

  • GET /users - Retrieve a list of all registered users
  • GET /users/{userId} - Retrieve the details of a specific user
  • POST /users - Register a new user to the contest
  • PUT /users/{userId} - Update the score of a specific user
  • DELETE /users/{userId} - Deregister a specific user from the contest

API Testing

For testing the API endpoints, you can use the following Postman Collection

About

A RESTful API service to manage the leaderboard for a coding platform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages