A full-stack attendance management system built with NestJS, React, and MongoDB. This system provides role-based access control for administrators, teachers, and students to manage attendance efficiently.
-
Role-Based Access Control
- Admin: Full system access
- Teacher: Manage classes and mark attendance
- Student: View attendance and class information
-
Authentication
- JWT-based authentication
- Password reset functionality
- Profile management with photo upload
-
Class Management
- Create and manage classes
- Assign teachers to classes
- Enroll students in classes
-
Attendance Tracking
- Mark attendance for students
- View attendance history
- Generate attendance reports
-
Backend
- NestJS (Node.js framework)
- MongoDB (Database)
- JWT (Authentication)
- Multer (File uploads)
-
Frontend
- React with TypeScript
- Material-UI
- React Router
- Axios
- Node.js (v14 or higher)
- MongoDB
- npm or yarn
-
Clone the repository
git clone https://github.com/omsherikar/Attendance.git cd Attendance -
Install backend dependencies
npm install
-
Install frontend dependencies
cd frontend npm install -
Environment Setup Create a
.envfile in the root directory with the following variables:MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret PORT=3000 -
Start the application
- Backend:
npm run start:dev
- Frontend:
cd frontend npm start
- Backend:
- POST
/auth/register - Body:
{ "name": "string", "email": "string", "password": "string", "role": "string", "rollNumber": "string" // Optional, required for students }
- POST
/auth/login - Body:
{ "email": "string", "password": "string" }
- POST
/auth/forgot-password - Body:
{ "email": "string" }
- POST
/classes - Body:
{ "name": "string", "teacherId": "string" }
- GET
/classes - Query Parameters:
teacherId: Filter by teacherstudentId: Filter by student
- POST
/attendance - Body:
{ "classId": "string", "date": "string", "records": [ { "studentId": "string", "status": "string" // "Present", "Absent", "Late" } ] }
- GET
/attendance - Query Parameters:
classId: Filter by classstudentId: Filter by studentdate: Filter by date
src/
├── auth/ # Authentication module
├── classes/ # Class management
├── attendance/ # Attendance tracking
├── shared/ # Shared utilities
└── main.ts # Application entry
frontend/
├── src/
│ ├── components/ # Reusable UI components
│ ├── contexts/ # React contexts
│ ├── pages/ # Application pages
│ ├── services/ # API services
│ └── App.tsx # Main component
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email [[email protected]] or open an issue in the repository.