Skip to content

Latest commit

 

History

History
171 lines (125 loc) · 3.9 KB

README.md

File metadata and controls

171 lines (125 loc) · 3.9 KB

Backend part of A+ Pathshala :

  • Create a website and mobile application for XYZ Educational Institute with common backend.
  • The fundamental idea is to leverage offline institutes to online.
  • The Core services of the website will be:
    1. live classes
    2. students and teachers authentication and authorization
    3. online payment system
    4. recorded course management
    5. online quiz and exam
  • website/application should be able to manage 1000 concurrent users.

Contributing Guidelines :

Contributors are always welcome!

Here are the ways you can contribute :

  1. Code contribution
  2. Project idea direction
  3. Documentation contribution
  4. Feature ideas & issue creation
  5. Create and solve own issues

We will add the best contributors in our internal team as well !

For any guidance, mail to [email protected] or get connected on LinkedIn or you may directly open a Pull Request.

API Documentation

This is the documentation for the API endpoints provided by the service. The API is designed to provide various functionalities related to user management.

Base URL

The base URL for all API endpoints is {{url}}/api/v1/

Authentication

The API requires authentication using a JWT token. Please refer to the authentication endpoint for more information on how to obtain the token.

User Endpoints

Creating new Student (Signup) :

This endpoint allows a student to sign up by providing their name, email, and password.
The API returns a JWT in a cookie that can be used to authenticate the student in subsequent requests.

Creates a new student with the given details.

  • URL: /student
  • Method: POST
  • Request Body:
{
  "name": "John Doe",
  "email": "[email protected]",
  "password": "password123",
  "age": 25
}
  • Response:
{
  "id": "1234567890",
  "name": "John Doe",
  "email": "[email protected]",
  "age": 25,
  "created_at": "2023-05-10T12:00:00Z"
}

Get Student

Retrieves the details of a user with the given ID.

  • URL: /student/{student_id}
  • Method: GET
  • Parameters:
Name Type Description
student_id string The ID of the student to retrieve
  • Response:
{
  "id": "1234567890",
  "name": "John Doe",
  "email": "[email protected]",
  "age": 25,
  "created_at": "2023-05-10T12:00:00Z"
}

Update Student

Updates the details of a user with the given ID.

  • URL: /student/{student_id}
  • Method: PUT
  • Parameters:
Name Type Description
student_id string The ID of the student to update
  • Request Body:
{
  "name": "Jane Doe",
  "age": 30
}
  • Response:
{
  "id": "1234567890",
  "name": "Jane Doe",
  "email": "[email protected]",
  "age": 30,
  "created_at": "2023-05-10T12:00:00Z"
}

Delete Student

Deletes a user with the given ID.

  • URL: /student/{student_id}
  • Method: DELETE
  • Parameters:
Name Type Description
student_id string The ID of the student to delete
  • Response:
{
  "message": "Student with ID 1234567890 has been deleted."
}

Errors

In case of an error, the API returns a JSON response with an error field containing a message describing the error.

Example:

{
  "error": "Invalid authentication token."
}