A comprehensive full-stack web application for automated attendance tracking, real-time classroom displays, and personalized student activity suggestions.
- Monorepo: NPM Workspaces
- Frontend: Next.js 14 with TypeScript and Tailwind CSS
- Backend: Node.js with Express.js and TypeScript
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT with role-based access control
- Real-time: WebSocket communication using Socket.IO
- Containerization: Docker and Docker Compose
- Node.js 18+
- Docker and Docker Compose
- Git
- Node.js (v18 or higher)
- Docker and Docker Compose
- Git
-
Clone the repository:
git clone https://github.com/mdsahilnoob/smart_attendance_app.git cd smart-attendance-app -
Install dependencies: This command installs dependencies for all packages in the workspace.
npm install
-
Set up environment variables: Copy the example environment file for the server.
cp packages/server/.env.example packages/server/.env
Now, edit the new
.envfile inpackages/server/with your database credentials and a JWT secret. -
Start the database and services: This command starts the PostgreSQL database, the backend, and the frontend containers.
npm run docker:up
-
Run database migrations (Crucial Step): After the containers are running, open a new terminal and run the Prisma migrate command to set up your database schema.
npm run prisma:migrate
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
| Command | Description |
|---|---|
npm run dev |
Starts the frontend and backend development servers. |
npm run build |
Builds all packages for production. |
npm run docker:up |
Starts all services in detached mode via Docker Compose. |
npm run docker:down |
Stops and removes all running containers. |
npm run docker:build |
Forces a rebuild of the Docker images. |
smart-attendance-app/
├── packages/
│ ├── client/ # Next.js Frontend
│ │ ├── app/ # Next.js App Router
│ │ ├── components/ # UI, feature, and layout components
│ │ ├── lib/ # Helper functions, API client
│ │ └── ...
│ └── server/ # Express.js Backend
│ ├── src/
│ │ ├── controllers/
│ │ ├── services/
│ │ ├── routes/
│ │ └── ...
│ ├── prisma/ # Database Schema & Migrations
│ └── ...
├── docker-compose.yml # Container Orchestration
└── package.json # NPM Workspace Configuration
- Role-based Authentication: Student, Teacher, and Admin roles
- QR Code Attendance: Automated attendance marking system
- Real-time Updates: Live attendance tracking with WebSocket
- Smart Suggestions: Personalized activity recommendations
- Comprehensive Dashboards: Role-specific interfaces
- Docker Deployment: Production-ready containerization
POST /api/auth/register- User registrationPOST /api/auth/login- User login
POST /api/attendance/mark-qr- Mark attendance via QR codeGET /api/attendance/class/:classId- Get class attendance
GET /api/schedule/my- Get personal schedule
GET /api/suggestions/my- Get personalized suggestions
- ✅ Phase 1: Monorepo & Docker Infrastructure
- 🔄 Phase 2: Database Schema with Prisma
- ⏳ Phase 3: Backend API with Authentication
- ⏳ Phase 4: Frontend with Role-based Dashboards
- ⏳ Phase 5: Real-time WebSocket Features
- ⏳ Phase 6: QR Code Attendance System
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.