> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/praveenarya123/sps-backend/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> SPS School Backend — a RESTful API for school management built with Node.js, Express, and MongoDB.

# SPS School Backend

SPS School Backend is a Node.js/Express REST API that powers a complete school management system. It handles user authentication, student records, teacher workflows, attendance tracking, assignment management, application processing, and finance administration — all backed by MongoDB.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Run the server locally in under 5 minutes
  </Card>

  <Card title="Authentication" icon="lock" href="/authentication">
    JWT-based auth with role-based access control
  </Card>

  <Card title="API Reference" icon="code" href="/api/auth/register">
    Full endpoint documentation with request/response schemas
  </Card>

  <Card title="Data Models" icon="database" href="/concepts/data-models">
    Mongoose schemas for all resources
  </Card>
</CardGroup>

## What SPS School Backend provides

The API is organized around seven core domains:

| Domain       | Base Path          | Description                                         |
| ------------ | ------------------ | --------------------------------------------------- |
| Auth         | `/api/auth`        | Register and authenticate users                     |
| Students     | `/api/student`     | Add and retrieve student records                    |
| Teachers     | `/api/teacher`     | Teacher-specific actions (e.g., create assignments) |
| Attendance   | `/api/attendance`  | Mark and query attendance records                   |
| Assignments  | `/api/assignment`  | Submit student assignment work                      |
| Applications | `/api/application` | Student/teacher application workflow                |
| Finance      | `/api/finance`     | Fee creation and listing                            |

## Tech stack

* **Runtime**: Node.js with Express 5
* **Database**: MongoDB via Mongoose 9
* **Auth**: JSON Web Tokens (JWT) + bcrypt password hashing
* **Middleware**: CORS, role-based access guards

## Role system

Every user is assigned one of seven roles. Certain endpoints require specific roles enforced via middleware.

<CardGroup cols={2}>
  <Card title="SUPER_ADMIN" icon="crown">
    Full system access
  </Card>

  <Card title="ACADEMIC_ADMIN" icon="graduation-cap">
    Academic operations management
  </Card>

  <Card title="STUDENT_ADMIN" icon="users">
    Student record management
  </Card>

  <Card title="FINANCE_ADMIN" icon="money-bill">
    Fee and finance management
  </Card>

  <Card title="OPERATIONS_ADMIN" icon="gears">
    Operational administration
  </Card>

  <Card title="TEACHER" icon="chalkboard-teacher">
    Create assignments, approve applications
  </Card>

  <Card title="STUDENT" icon="user-graduate">
    Submit assignments, send applications
  </Card>
</CardGroup>

<Note>
  See [Roles](/concepts/roles) for a detailed breakdown of each role's permissions and which endpoints they can access.
</Note>
