How ayusmannanda/college-management-system works
1. System Purpose and Delivery Surfaces
Axiom is a role-based college-management system for administration, faculty, and students. One React SPA is delivered as web/PWA and wrapped for Android and Electron desktop. The SPA consumes a separate Express REST API backed by MySQL.
• frontend/src/main.jsx
• frontend/src/App.jsx
• backend/server.js
2. Frontend Composition and Role Portals
The React application is organized around distinct Admin, Faculty, and Student page groups, with shared dashboard layout/UI components. Login, OAuth completion, and marksheet verification are cross-role entry flows. Protected routing gates client navigation; server authorization remains the enforcement boundary.
• frontend/src/pages/Login.jsx
• frontend/src/pages/Admin/AdminLayout.jsx
• frontend/src/pages/Faculty/FacultyLayout.jsx
• frontend/src/pages/Student/StudentLayout.jsx
• frontend/src/routes/ProtectedRoute.jsx
3. API Bootstrap, Routing, and Persistence Boundary
Express starts from backend/server.js, builds the application in backend/src/app.js, and exposes domain route groups that delegate to controllers. Controllers are the business/API boundary to the MySQL connection; the relational schema defines students, faculty, courses, subjects, assignments, attendance, marks, results, and roll generation.
• backend/server.js
• backend/src/app.js
• backend/src/config/db.js
• sql/schema.sql
4. Identity and Authorization Flow
Credentials and Google OAuth enter through auth routes/controllers. JWT authentication middleware establishes caller identity, and role middleware limits operations to Admin, Faculty, or Student privileges. This boundary protects management, record-entry, and self-service endpoints; faculty date restrictions for attendance are enforced server-side.
• backend/src/routes/authRoutes.js
• backend/src/controllers/authController.js
• backend/src/middleware/authMiddleware.js
• backend/src/middleware/roleAuthMiddleware.js
5. Academic Master Data and Assignment
Admin workflows manage the authoritative academic structure: courses, subjects, student/faculty accounts, and faculty-to-subject/class assignments. Assignment data drives the scoped faculty attendance and marks workflows, while students are associated with course/semester records.
• backend/src/controllers/courseController.js
• backend/src/controllers/subjectController.js
• backend/src/controllers/assignController.js
• backend/src/controllers/studentController.js
• backend/src/controllers/facultyController.js
6. Attendance, Marks, and Reporting Pipeline
Authorized Admin/Faculty users submit or edit attendance and marks against student/subject/course context. Dedicated controllers serve reports, student-facing attendance/marks views, and dashboards. Frontend role pages render the corresponding capture, report, and self-service experiences through the shared API client.
• backend/src/controllers/attendanceController.js
• backend/src/controllers/marksController.js
• backend/src/controllers/studentAttendanceController.js
• backend/src/controllers/studentMarksheetController.js
• frontend/src/utils/api.js
7. Marksheet Verification and File Assets
Marksheet presentation is generated client-side, including SHA-256-derived verification data and QR links to the verification route; backend verification resolves authenticity data. Backend-managed uploads hold profile photos and institutional assets used by profiles and printed marksheets.
• frontend/src/pages/Admin/PrintMarksheet.jsx
• frontend/src/pages/VerifyMarksheet.jsx
• backend/src/controllers/verifyController.js
• backend/uploads/
8. Runtime, Packaging, and Infrastructure
The material runtimes are Node.js/Express, React/Vite, and MySQL. Deployment separates frontend (Vercel), backend (Render), and database (Railway). Capacitor packages the built frontend into Android; Electron provides desktop main/preload processes. External identity is Google OAuth; spreadsheet workflows use import/export UI and backend record APIs.
• frontend/capacitor.config.json
• frontend/android/app/src/main/java/com/college/cms/MainActivity.java
• frontend/electron/main.js
• .github/workflows/build.yml
Main entry points: authMiddleware.js JWT & role authorization · main.jsx React SPA entry · db.js MySQL connection · app.js Express application
Components 20
React clients
One SPA serves web, PWA, Android, and desktop.
- React SPA entry
frontend/src/main.jsx - Application shell · Composes cross-role entry and navigation flows.
frontend/src/App.jsx - Protected routes · Gates client navigation; API remains authoritative.
frontend/src/routes/ProtectedRoute.jsx - Role portals · Role-specific dashboards and workflows.
frontend/src/pages/Admin/AdminLayout.jsx - API client
frontend/src/utils/api.js - Marksheet & verification UI · Generates SHA-256 verification data and QR links.
frontend/src/pages/Admin/PrintMarksheet.jsx
Express API
REST API and server-side authorization boundary.
- Express server
backend/server.js - Express application · Mounts domain routes and middleware.
backend/src/app.js - Authentication API · Credentials and Google OAuth completion.
backend/src/routes/authRoutes.js - JWT & role authorization · Enforces Admin, Faculty, and Student privileges.
backend/src/middleware/authMiddleware.js - Academic master data · Manages courses, subjects, accounts, and faculty assignments.
backend/src/controllers/courseController.js - Attendance & marks API · Captures scoped records and serves reports and student views.
backend/src/controllers/attendanceController.js - Marksheet verification API · Resolves marksheet authenticity data.
backend/src/controllers/verifyController.js
Academic data
Relational records and managed file assets.
- MySQL connection
backend/src/config/db.js - Academic schema · Defines academic entities, records, results, and roll generation.
sql/schema.sql - Managed uploads · Profile photos and institutional marksheet assets.
backend/uploads
Packaging & delivery
- Android package
frontend/capacitor.config.json - Desktop package
frontend/electron/main.js - Build pipeline · Builds delivery artifacts.
.github/workflows/build.yml
Other components
- Google OAuth
Connections 22
- React SPA entry → Application shell: mounts
- Application shell → Protected routes: uses
- Protected routes → Role portals: admits role views
- Role portals → API client: calls
- Marksheet & verification UI → API client: verifies through
- API client → Express server: REST
- Express server → Express application: starts
- Express application → Authentication API: mounts
- Express application → JWT & role authorization: applies
- JWT & role authorization → Academic master data: protects
- JWT & role authorization → Attendance & marks API: protects
- JWT & role authorization → Marksheet verification API: protects
- Authentication API → Google OAuth: OAuth
- Academic master data → MySQL connection: reads and writes
- Attendance & marks API → MySQL connection: reads and writes
- Marksheet verification API → MySQL connection: resolves
- MySQL connection → Academic schema: implements
- Academic master data → Managed uploads: manages assets
- React SPA entry → Android package: packaged as
- React SPA entry → Desktop package: wrapped by
- Build pipeline → React SPA entry: builds
- Build pipeline → Express server: builds