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.
- 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
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
Copy .env.example to .env.local and fill in the credentials you want to enable.
Required for core app:
NEXTAUTH_URLNEXTAUTH_SECRETMONGODB_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
npm install
npm run devOpen http://localhost:3000.
- 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.
POST /api/auth/otp/requestPOST /api/auth/otp/verifyGET, POST /api/studentsGET /api/admin/analyticsPOST /api/uploads/signPOST /api/ai/notice-summaryPOST /api/ai/scholarship-eligibilityGET /api/fees/invoice/:invoiceNumberGET /api/reports/export?entity=studentsGET /api/reports/export?entity=fees