Skip to content

KaustubhBadve/ADSMN_Assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADSMN_Assignment

This assignment is entirely backend-focused, leveraging robust frameworks, JS-libraries, and SQL database to create a game platform. It encompasses functionalities such as user registration, authentication, game dashboard, ranking, weekly reports etc...

Features

    User Registration and Authentication
  • User can easily registered by passing valid active OTP and some basic details
  • JWT tokens are generated upon successful registration for both authentication and authorization purposes.

    • Dashboard Features
  • Users are limited to saving their score a maximum of three times per day, between midnight (12:00 AM) and the following midnight (12:00 AM).
  • Users have the capability to retrieve their overall score accumulated until the current date, along with their ranking among all other users.
  • Users also have access to week-wise reports, where they can view the week's number, the total score for that week, and their ranking among other users for that specific week. (Week 1 starts from March 1st, and subsequent weeks are calculated accordingly)

  • Access Postman Collection

      Detailed API documentation is accessible through Postman. Simply import the following URL into Postman to gain access to the Postman collection for this assignment:
  • The assignment has been deployed on EC2 with NGINX as a reverse proxy and PM2 as the package manager, allowing users to directly access the APIs. Furthermore, the database has been deployed to AWS RDS, ensuring efficient data management and accessibility.
  • Postman Collection URL
  • API Documentation

      For the savescore, userprogress, and weeklyreport APIs, a distinct Bearer token is required. Users can obtain this token after a successful registration or login process.
  • POST : /api/sendotp - For user registration as well as login otp generation api
  • POST : /api/registration - For user registration with unique mobileNo, email, name and OTP
  • POST : /api/login - To Login by passing mobileNo and OTP
  • POST : /api/savescore - To save score of given user(3 times max per day)
  • GET : /api/userprogress - To retrive overall user score and ranking among all other users.
  • GET : /api/weeklyreport - To retrieve a week-wise report for a given user, this api provides the week's name, the total score for that week, and the user's ranking among other users for that specific week.
  • Technologies Used

  • Node.js
  • Express.js
  • JWT (JSON Web Tokens): Authentication and authorization mechanism./li>
  • MySQL: Relational database management system.
  • Sequelize: ORM for MySQL
  • express-validator : express middleware for better error handling
  • EC2, Nginx, PM2, RDS
  • Getting Started

  • Clone the repository.
  • Navigate to the project directory.
  • Install dependencies: npm install
  • Start the server with watch mode: npm run start:watch
  • The server will run on port 3034 by default.
  • Database hosting is done on AWS-RDS, still to create tables based on models in MySQL locally just uncomment the sync line from bin/www file
  • About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published