Backend / API

Student Management API

An academic administration API that connects student records with course registration, assessment results, and attendance. It calculates credit-weighted GPA and cumulative GPA while giving administrators and staff distinct permissions.

01

Academic records, results & attendance

02

Credit-weighted GPA & cumulative GPA

03

Admin / staff permissions & rotating tokens

API surface

Student Management API

  • GET/api/v1/students

    Search, filter, sort, and paginate student records.

  • POST/api/v1/academic/registrations

    Register a student for a course.

  • GET/api/v1/academic/students/:studentId/cgpa

    Calculate cumulative GPA with semester breakdowns.

  • POST/api/v1/auth/refresh

    Rotate a refresh token and issue a new token pair.

  • POST/api/v1/academic/attendance

    Allow administrators and staff to record attendance.

  • GET/api/v1/audit-logs

    Allow administrators to inspect authentication and user-management events.

  • GET/api/v1/health

    Check database connectivity.

Architecture

  1. 1

    NestJS modules organize students, academic administration, authentication, users, audit events, and health checks into separate domains.

  2. 2

    Prisma and PostgreSQL model faculties, departments, courses, sessions, semesters, registrations, and results. Academic services calculate grades and credit-weighted GPA.

  3. 3

    Bearer-token authentication and role guards protect operations. Rotating refresh tokens, account status checks, and temporary login lockouts support session security.

  4. 4

    Global DTO validation rejects unknown fields, while a Prisma exception filter translates persistence errors. Swagger documents requests and bearer authentication.

  5. 5

    Vitest unit tests and database-backed end-to-end tests exercise application behavior. CI migrates and seeds a PostgreSQL test database before running its checks.