BUSIT is a modern, full-stack Next.js web application designed to completely digitize campus shuttle payments. It eliminates the need for physical cash or hardware scanners by utilizing dynamic QR codes and a software-based live camera scanning portal.
- Software-Based Scanning: Drivers use a built-in
html5-qrcodecamera portal to scan student passes directly from the web app. No proprietary hardware required! - Dynamic Digital Passes: Students are automatically assigned a unique QR code boarding pass upon registration.
- Secure Architecture: Built with Next.js App Router, Prisma ORM, and NextAuth.js. Passwords are mathematically hashed via
bcryptto prevent plaintext data leaks. - Automated Email Receipts: Integrated
nodemailersystem automatically sends beautiful HTML email receipts when fares are deducted or wallets are topped up. - Premium UI/UX: Features a highly refined, professional dark-mode design built from scratch using strict Tailwind CSS utility classes.
- Framework: Next.js 16 (App Router)
- Database: PostgreSQL (Production via Neon) / SQLite (Local Development)
- ORM: Prisma
- Authentication: NextAuth.js (Credentials Provider)
- Styling: Tailwind CSS v4
- QR Engine:
qrcode&html5-qrcode - Emails:
nodemailer
Ensure you have Node.js installed on your machine.
Clone the repository and install dependencies:
git clone https://github.com/TRITUSLegend/busit-web.git
cd busit-web
npm installCreate a .env file in the root directory and add the following:
DATABASE_URL="file:./dev.db"
NEXTAUTH_SECRET="your_secure_random_string"
NEXTAUTH_URL="http://localhost:3000"
# Gmail SMTP Configuration for Email Receipts
SMTP_EMAIL="your_gmail_address@gmail.com"
SMTP_PASSWORD="your_16_character_app_password"Initialize the Prisma database schema:
npx prisma generate
npx prisma db pushStart the Next.js development server:
npm run devOpen http://localhost:3000 in your browser.
To test the core QR scanning functionality without a real shuttle:
- Open the app and register a new Student account.
- Open an Incognito Window (or use a separate device) and register a Driver account.
- On the Driver dashboard, grant camera permissions to activate the Live Scanner.
- Point the Driver's camera at the Student's QR code on the other screen.
- The system will instantly verify the pass, deduct 20 credits, and email a receipt to the student!
This application is fully ready for serverless deployment on Vercel.
- Import your GitHub repository to Vercel.
- Provide a cloud PostgreSQL database connection string (e.g., via Neon) in the
DATABASE_URLenvironment variable. - Add your
NEXTAUTH_SECRETand SMTP credentials. - Deploy! Run
npx prisma db pushlocally using your cloud URL to sync the database schema.