A modern full-stack web application for managing parent visits to college hostels, featuring a seamless QR code-based entry/exit workflow, real-time approvals, and a unified monorepo using Next.js API routes (no separate backend server required).
- Register visit requests for parents
- Instantly generate QR codes for each request
- Track visit status, scan history, and approvals
- View and delete visit requests
- Scan QR codes for entry and exit (auto-detects action)
- Entry allowed before approval, exit only after warden approval
- Real-time verification and error feedback
- View recent and full scan history
- Approve or reject visit requests after entry scan
- Monitor all hostel visit activity
- View visit and scan history
- Consistent, modern UI across all portals
- Next.js 14 (App Router, API Routes)
- TypeScript
- TailwindCSS
- Prisma ORM (with SQLite for dev)
- JWT authentication
- bcryptjs for password hashing
- QRCode for QR code generation
- Lucide React for icons
- Axios for HTTP requests
- Node.js 18+ and npm
- Git
-
Clone the repository
git clone <repository-url> cd parent_transport_management_system
-
Install dependencies
npm install --legacy-peer-deps
-
Set up the database
npx prisma generate npx prisma migrate dev --name init # (Optional) Seed data if a seed script is provided
Just start the Next.js app (API and frontend are unified):
npm run devThe app will run on http://localhost:3000
Use these credentials to test the application:
- Parent: parent@example.com / parent123
- Security: security@example.com / security123
- Warden: warden@example.com / warden123
- Parent Registration: Parent creates a visit request for a student
- Entry Scan: Security scans QR code for entry (no approval needed)
- Warden Approval: Warden reviews and approves/rejects after entry
- Exit Scan: Security scans QR code for exit (approval required)
- Tracking: All actions and scans are tracked and visible in the portals
parent_transport_management_system/
├── src/ # Next.js app (frontend + API routes)
│ ├── app/ # App router pages & API endpoints
│ ├── components/ # React components
│ ├── contexts/ # React contexts
│ └── lib/ # Utilities (API, Prisma, etc.)
├── prisma/ # Database schema
└── README.md
POST /api/auth/login- User loginPOST /api/auth/register- User registrationGET /api/auth/me- Get current user
POST /api/visits- Create visit requestGET /api/visits- Get visit requestsGET /api/visits/:id- Get specific visit requestPOST /api/visits/:id/approve- Approve/reject request
POST /api/scan/record- Record a scan (auto-detects entry/exit)GET /api/scan/verify/:qrCode- Verify QR code and get next actionGET /api/scan/logs- Get scan logs
GET /api/students- Get all studentsGET /api/students/search- Search studentsPOST /api/students- Create student (Warden only)
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is for educational purposes.
For support, please contact the development team.