RollCall is a modern, full-stack attendance management application designed to streamline the process of tracking attendance, managing classes, and analyzing student performance. It features a premium, user-centric interface and robust backend architecture.
This application is packed with features designed for both Teachers and Students, providing a seamless educational management experience.
- Create & Manage Classes: Teachers can easily create courses with unique join codes.
- Archive System: Keep your dashboard clean by archiving finished classes. Archived classes are stored in a collapsible folder (LIFO) and can be unarchived at any time.
- Join Requests: Control access to your class. Teachers approve or decline student join requests securely.
- Dynamic Matrix View: A spreadsheet-like view of all students and attendance dates.
- Customizable Columns: Add custom columns for dates, marks, or specific activities.
- Private Columns: Mark columns as "Private" to hide them from students (perfect for grading or internal notes).
- One-Click Status Updates: Toggle attendance status (Present, Absent, Late, Excused) with a single click.
- Download CSV: Export class data to CSV. Choose to include or exclude private columns.
- Print View: A clean, printer-friendly version of the class register.
- In-App Alerts: Comprehensive notification system to keep everyone in the loop.
- For Students: Immediate alerts for class removals, join request approvals/denials, and new announcements.
- For Teachers: Notifications when a student voluntarily leaves a class or requests to join.
View Gallery (Click to expand)
Next.js (React): Chosen for its powerful Server-Side Rendering (SSR), optimal SEO capabilities, and intuitive file-based routing.
Tailwind CSS: Used to ensure rapid UI development with a scalable utility-first design system and built-in dark mode support.
TypeScript: Ensures type safety and highly maintainable codebase on the frontend.
Node.js: Provides a highly scalable, asynchronous environment for backend logic.
Express.js: Selected for its minimalist and robust routing capabilities to build RESTful APIs.
MongoDB (Mongoose): A NoSQL database that perfectly accommodates the flexible schema needed for dynamic attendance records and class structures.
- Frontend:
axios,react,next,tailwindcss - Backend:
mongoose,jsonwebtoken(JWT),bcryptjs,cors,cookie-parser
Our application uses a highly secure, stateless JWT-based authentication workflow:
- Registration/Login: The user provides credentials. Passwords are mathematically hashed using
bcryptjsbefore hitting the database. - Token Generation: Upon successful verification, the backend issues an Access Token (short-lived) and a Refresh Token (long-lived) using
jsonwebtoken. - API Access: The client stores the token and attaches it to the
Authorization: Bearer <token>header for subsequent requests. - Validation: Every protected route passes through the
authMiddleware. It intercepts the request, verifies the token signature against theJWT_SECRET, decodes the payload, and fetches the user. - Authorization (RBAC): Role-specific middlewares (
admin,teacher) further inspect the decoded user payload to ensure the user has the explicit rights to perform the requested action.
| Role | Capabilities |
|---|---|
| Student (Default) | Can join classes (via requests), view their own attendance/marks, and leave classes. Cannot modify class structures. |
| Teacher | Can create/manage classes, approve/decline join requests, update attendance/marks matrices, manage columns, and archive classes. |
| Admin | Full system access. Includes all Teacher privileges plus the ability to view all system users and perform global administrative actions. |
| Entity | Description / Attributes | Relationships |
|---|---|---|
| USER | ObjectId _idString nameString emailString role (admin/teacher/student) |
π¨βπ« Teaches CLASS (1:N)π Enrolls in CLASS (N:M)π Receives NOTIFICATION (1:N) |
| CLASS | ObjectId _idString nameString codeObjectId teacherBoolean isArchived |
π Contains CLASSRECORD (1:N) |
| CLASS_STUDENT | ObjectId class_idObjectId student_idString rollNumber |
Join Collection linking Users and Classes |
| CLASSRECORD | ObjectId _idObjectId classIdObjectId studentIdObjectId columnIdMixed value |
Links a Student to a specific Attendance/Marks cell in a Class |
| NOTIFICATION | ObjectId _idObjectId userString messageBoolean read |
Belongs to a specific User |
| Method | Endpoint | Middleware | Description |
|---|---|---|---|
| POST | /api/auth/register |
None | Registers a new user. |
| POST | /api/auth/login |
None | Authenticates user & returns JWT tokens. |
| GET | /api/users/profile |
protect |
Retrieves the logged-in user's profile. |
| GET | /api/users |
protect, admin |
Retrieves all users in the system. |
| POST | /api/classes |
protect, teacher |
Creates a new class. |
| GET | /api/classes |
protect |
Fetches classes associated with the user. |
| POST | /api/classes/join |
protect |
Submits a join request from a student. |
| PUT | /api/classes/:id/approve |
protect, teacher |
Approves a student's join request. |
| POST | /api/classes/:id/columns |
protect, teacher |
Adds a new attendance/marks column. |
| PUT | /api/classes/:id/cells |
protect, teacher |
Updates a specific cell in the matrix. |
| GET | /api/classes/:id/matrix |
protect |
Retrieves the full attendance matrix. |
(Note: Sensitive routes are strictly guarded by respective middlewares).
Follow these steps to run the project locally:
git clone <repository_url>
cd Attendancecd backend
npm installCreate a .env file in the backend directory with the required variables (e.g., PORT, MONGO_URI, JWT_SECRET).
npm run devcd frontend
npm installCreate a .env.local file in the frontend directory with your public environment variables (e.g., NEXT_PUBLIC_API_URL).
npm run devThe app will be available at http://localhost:3000.
If you found this project helpful or inspiring, please consider giving it a β on GitHub! Follow me for more amazing full-stack projects and web development resources. Your support motivates me to keep building!



