A modern, scalable, NestJS powered backend system designed for schools to manage students, teachers, classes, attendance, results, timetables, and financial operations (fees, invoices, payments). Built for performance, multi-tenant usage, and clean developer experience.
- RBAC Authentication (Admin, Teacher, Student)
- User & School Management
- Classes & Subjects Management
- Student Enrollment
- Attendance Tracking
- Results & Grades Module
- Timetable Scheduling
- Fees, Invoices, and Payments
- Audit Logging
The backend is built in a modular monorepo structure to keep each domain clean and independently maintainable.
/apps
/api → Main backend API (NestJS)
/packages
/core → Shared utilities (DTOs, Guards, Pipes)
/database → TypeORM schema & migrations
/types → Global TypeScript types
/auth → Authentication logic
- API Layer (REST + JWT Auth)
- Modular domain architecture
- Redis caching
- Centralized Audit Logging
| Table | Purpose |
|---|---|
| users | All system users (admin, teachers, students) |
| classes | School classes with assigned teacher |
| subjects | Offered subjects |
| enrollments | Student → Class mappings |
| attendance | Check-ins & check-outs |
| results | Test scores and grades |
| timetable | Class schedules |
| fee_invoices | Student invoices |
| fee_payments | Payments made against invoices |
| audit_logs | System activity logs |
- JWT Authentication
- Login, Signup
- Role-based access control
- Guards (AdminGuard, TeacherGuard, StudentGuard)
- Create/Update users
- Assign roles
- Manage teacher profiles
- Manage student information (parents, classes)
- Create classes
- Assign a teacher
- Manage capacity
- Create subjects
- Enroll students into classes
- Track academic year
- View all students in a class
- Check-in / Check-out system
- Daily logs
- Attendance reports
- Record scores
- Compute grades
- View term results per student
- Schedule classes
- Manage periods and days
- Class + subject linking
- Generate invoices
- Track due dates
- Log payments
- Financial reporting
- Records every admin or teacher action
- Stores IP address & timestamp
- Useful for compliance & debugging
- Node.js + NestJS
- TypeScript
- TypeORM
- PostgreSQL
- Redis (optional)
- Docker-ready
- CI/CD adaptable
- Monorepo-friendly
- Node.js (v18 or higher)
- PostgreSQL (v14 or higher)
- npm or yarn
npm installCreate a .env file in the root directory:
DATABASE_URL="postgresql://user:password@localhost:5432/school"
JWT_SECRET="your_secret_key_here"
PORT=3000Development mode:
npm run start:devProduction mode:
npm run build
npm run start:prodThe API will be available at: http://localhost:3000
# development
npm run start
# watch mode
npm run start:dev
# production mode
npm run start:prod# unit tests
npm test
# watch mode
npm run test:watch
# e2e tests
npm run test:e2e
# test coverage
npm run test:covnpm run buildnpm run start:prodThis project uses GitHub Actions for continuous integration. The CI pipeline runs on:
- Direct pushes to
mainbranch - Pull requests targeting
mainbranch
The pipeline includes:
- Test - Runs unit testson Node.js 18.x and 20.x
- Format Check - Validates code formatting and linting
- Build - Compiles the application
- Start - Verifies the application starts successfully
- Fork the repo
- Create a feature branch
- Submit a PR
- Follow the modular structure
- One module = one domain
- Use DTOs & Validation Pipes
- Write tests
For feature requests, bugs or contributions, open an issue or contact the maintainer.