Skip to content

Aayush-coder32/Student-ERP-System

Repository files navigation

Smart College ERP

Advanced college ERP starter built with Next.js App Router, React, Tailwind CSS, MongoDB, Mongoose, NextAuth, OTP authentication, Cloudinary, QR generation, and role-based dashboards.

What is included

  • Responsive landing page plus module pages for registration, academics, scholarship, hostel, transport, library, exams, results, placement, finance, gallery, complaints, notifications, and profile
  • Role-aware dashboards for student, admin, faculty, hostel admin, scholarship admin, transport admin, librarian, and accountant
  • NextAuth setup with OTP credentials login and optional Google sign-in
  • MongoDB connection utility and Mongoose schemas for core ERP collections
  • API routes for students, departments, scholarship, hostel, transport, library, fees, notifications, gallery, complaints, exams, results, placement, lost-and-found, reports, AI helpers, and uploads
  • Cloudinary upload signature helper
  • QR code generation for transport passes
  • PDF invoice endpoint for fee receipts
  • CSV export endpoint for student and fee reports

Project structure

app/
  api/
  admin/
  complaints/
  dashboard/
  departments/
  exams/
  faculty/
  fees/
  gallery/
  hostel/
  library/
  login/
  lost-found/
  notifications/
  placement/
  profile/
  register/
  results/
  scholarship/
  transport/
components/
  dashboard/
  forms/
  layout/
  tables/
  ui/
context/
hooks/
lib/
models/
public/
services/
types/
utils/
middleware.ts

Environment setup

Copy .env.example to .env.local and fill in the credentials you want to enable.

Required for core app:

  • NEXTAUTH_URL
  • NEXTAUTH_SECRET
  • MONGODB_URI

Optional integrations:

  • Google OAuth: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET
  • OTP SMS: TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_PHONE_NUMBER
  • OTP email: SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS
  • Media upload: CLOUDINARY_CLOUD_NAME, CLOUDINARY_API_KEY, CLOUDINARY_API_SECRET
  • AI extension key: OPENAI_API_KEY

Run locally

npm install
npm run dev

Open http://localhost:3000.

Important implementation notes

  • OTP delivery falls back to returning the generated OTP in the API response when SMTP or Twilio are not configured. This is intentional for local development.
  • Google sign-in is enabled only when the Google environment variables are provided.
  • The AI routes currently provide safe rule-based helpers so the project remains runnable without an LLM provider.
  • This repository is a strong production-oriented starter. For a live campus rollout, you should still add deeper workflow rules, audit retention policies, file moderation, test coverage, and deployment secrets.

Useful endpoints

  • POST /api/auth/otp/request
  • POST /api/auth/otp/verify
  • GET, POST /api/students
  • GET /api/admin/analytics
  • POST /api/uploads/sign
  • POST /api/ai/notice-summary
  • POST /api/ai/scholarship-eligibility
  • GET /api/fees/invoice/:invoiceNumber
  • GET /api/reports/export?entity=students
  • GET /api/reports/export?entity=fees

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages