Skip to content

Inspirante-Tech/attendance-management-system

Repository files navigation

College ERP System

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


Prerequisites

  • Node.js (v18 or higher)
  • PostgreSQL database (local or remote)
  • npm or yarn

Project Structure

  • backend/ - Express/Node.js API server (TypeScript, Prisma)
  • frontend/ - Next.js React frontend
  • sample_data_simplified/ - Example CSVs for colleges, departments, users, etc.
  • newschema.sql - Full database schema

Setup Instructions

1. Clone the repository

git clone <repo-url>
cd attendance-management-system

2. Database Setup

  1. Create a PostgreSQL database (e.g. attendance_db).
  2. Run the schema:
    • Use newschema.sql to create all tables manually, or use Prisma migrations from the backend.
  3. (Optional) Import sample data:
    • Use the CSVs in sample_data_simplified/ (e.g. colleges.csv) to populate your tables. You can use a tool like psql, DBeaver, or a custom script.

3. Backend Setup

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)

4. Frontend Setup

cd ../frontend
npm install
npm run dev       # Start frontend (Next.js) on http://localhost:3000

5. Importing Sample Data

You 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

Usage

  • Access the frontend at http://localhost:3000
  • Use the admin panel to manage users, colleges, departments, courses, and attendance.

Scripts


Troubleshooting

  • Ensure your database is running and the connection string in .env is 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.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •