Giter Site home page Giter Site logo

ratham-backend's Introduction

Ratham-Backend

Ratham Backend is a Go-based web application that manages sessions between students and deans at a university. It provides a set of APIs for user registration, login, session booking, and management.

Features & Functionality

Ratham Backend offers the following key features and functionalities:

  1. Session Management

    • Session Booking: Students can view and book available dean sessions. Each dean session is one hour long, scheduled on Thursdays and Fridays at 10 AM every week.
    • Pending Sessions: Deans can log in to view a list of pending sessions, including student names and session details.
  2. User Management

    • Student Registration: New students can register with their university ID and password.
    • Dean Registration: New deans can register with their university ID and password.
    • User Login: Registered students and deans can log in to the system.
    • User Logout: Users can log out to end their sessions securely.
  3. Upcoming Free Sessions

    • Upcoming Sessions: Deans can log in to see a list of upcoming free sessions, including session start and end times.
  4. Authentication

    • JWT Authentication: User authentication is implemented using JSON Web Tokens (JWT) for secure access to protected routes. To access protected routes, include the JWT token in the request headers as a Bearer token.

Getting Started

To run this application locally, follow these steps:

  1. Clone the repository to your local machine.
git clone https://github.com/Sahil-4555/ratham-backend.git
  1. Navigate to the project directory.
cd ratham-backend
  1. Install the required dependencies.
go mod tidy
  1. Start the server
go run main.go

The Server will start on port 8080 by default.

API EndPoints

Students APIs

  1. Register:
// Register a new student. --POST Method
http://localhost:8080/student/register
  1. Login:
// Authenticate and log in a student. --POST Method
http://localhost:8080/student/login
  1. Get Student Details:
// Retrieve student details. --GET Method
http://localhost:8080/student/user
  1. Logout:
// Log out the student. --POST Method
http://localhost:8080/student/logout

Dean APIs

  1. Register:
// Register a new dean. --POST Method
http://localhost:8080/dean/register
  1. Login:
// Authenticate and log in a dean. --POST Method
http://localhost:8080/dean/login
  1. Get Student Details:
// Retrieve dean details. --GET Method
http://localhost:8080/dean/user
  1. Logout:
// Log out the dean. --POST Method
http://localhost:8080/dean/logout

Session APIs

  1. Add New Session:
// Add a new session (deans only) --POST Method
http://localhost:8080/session/addsession
  1. Get All Free Sessions:
// Get a list of free sessions (students only). --GET Method
http://localhost:8080/session/getfreesession
  1. Book a Session:
// Book a session (students only). --POST Method
http://localhost:8080/session/booksession/:sessionid
  1. Get Upcoming Free Sessions:
// Get upcoming free sessions (deans only). --GET Method
http://localhost:8080/session/getupcomingfreesession

Technologies Used

  • Go (Golang)
  • Fiber - Web framework for Go
  • MongoDB - Database for storing user and session data

ratham-backend's People

Contributors

sahil-4555 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.