This is a full-stack attendance management system for colleges, built with Next.js (frontend), Express/Node.js (backend), PostgreSQL, and Prisma ORM.
👉 See our Complete Documentation
- Node.js (v18 or higher)
- PostgreSQL database (local or remote)
- npm or yarn
backend/- Express/Node.js API server (TypeScript, Prisma)frontend/- Next.js React frontendsample_data_simplified/- Example CSVs for colleges, departments, users, etc.newschema.sql- Full database schema
git clone <repo-url>
cd attendance-management-system- Create a PostgreSQL database (e.g.
attendance_db). - Run the schema:
- Use
newschema.sqlto create all tables manually, or use Prisma migrations from the backend.
- Use
- (Optional) Import sample data:
- Use the CSVs in
sample_data_simplified/(e.g.colleges.csv) to populate your tables. You can use a tool likepsql, DBeaver, or a custom script.
- Use the CSVs in
cd backend
npm install
cp .env.example .env
# Edit .env and set your DATABASE_URL (e.g. postgresql://username:password@localhost:5432/attendance_db)
npm run db:generate
npm run db:push # or npm run db:migrate
npm run dev # Start backend server on http://localhost:4000 (default)cd ../frontend
npm install
npm run dev # Start frontend (Next.js) on http://localhost:3000You can use the provided CSVs in sample_data_simplified/ to import colleges, departments, users, etc. (see backend scripts or import manually).
Example: colleges.csv
code,name
NMAMIT,Nitte Mahalinga Adyanthaya Memorial Institute of Technology
NITTE,Nitte Institute of Technology
- Access the frontend at http://localhost:3000
- Use the admin panel to manage users, colleges, departments, courses, and attendance.
- Backend: see
backend/README.mdfor all backend commands - Frontend: see
frontend/README.mdfor all frontend commands
- Ensure your database is running and the connection string in
.envis correct. - If you see foreign key errors, make sure referenced records exist (e.g. colleges before departments, teachers before course offerings).
- For sample data, always import colleges first, then departments, then users, etc.
MIT