How bitotsav-fest/website works
Purpose and Runtime
This is a Next.js App Router site for Bitotsav, BIT Mesra’s festival. It combines a public festival/marketing experience with authenticated attendee dashboards, event registration, teams, ticket verification, scanning, chat, and administration. The runtime is React/Next.js with Tailwind-style UI components; static media and 3D assets are served from public/.
Key entry points: src/app/layout.js, src/app/page.js, src/middleware.js, src/auth.js.
Public Festival Experience
Public routes provide the landing page, event catalog/detail pages, schedules, gallery, sponsors, tickets, merch, concerts, alumni, and informational pages. The landing implementation is componentized around visual sections and 3D presentation assets.
Paths: src/app/page.js, src/components/landing/Landing.js, src/app/events/[id]/page.js, src/app/events/data.js, public/BIT-v1.glb.
Authentication and Access Boundary
NextAuth is exposed through the catch-all auth API route, with server actions for authentication and middleware as the request-level access gate. Login/logout and dashboard pages form the user-facing authentication boundary; protected APIs should rely on the same session/authorization model.
Paths: src/auth.js, src/app/api/auth/[...nextauth]/route.js, src/app/actions/auth.js, src/middleware.js.
Persistence and Domain Models
The repository contains both Prisma schema/client access and model files consistent with a separate document-model layer, indicating a mixed or transitional persistence architecture. Core stored domains are users, teams, events, and audit logs. Database connectivity is abstracted behind shared library modules rather than page code.
Paths: prisma/schema.prisma, src/lib/prisma.js, src/lib/dbConnect.js, src/models/user.js, src/models/Team.js, src/models/Event.js.
Registration, Teams, and Tickets
Event registration is an API-driven flow. Team creation, joining, retrieval/pagination, and admin team operations are independently routed. Ticket verification supports a downstream scanner workflow, while dashboard components render attendee profile, event details, and QR ticket state.
Paths: src/app/api/events/register/route.js, src/app/api/teams/create/route.js, src/app/api/teams/join/route.js, src/app/actions/verify-ticket.js, src/app/scanner/page.js, src/components/dashboard/QRTicket.jsx.
Attendee Dashboard and Eligibility
The dashboard is the principal authenticated portal. It supports user retrieval/deletion, BIT/day-scholar and non-BIT flows, and appears to use bundled CSV/JS allowlists for eligibility or email matching. This is a material boundary between institutional participant validation and general registration.
Paths: src/app/dashboard/page.js, src/app/dashboard/day-scholar/page.js, src/app/dashboard/non-bit/page.js, src/lib/dayscholarbitmesra.js, src/lib/allowedK21_with_emails.js.
Administration, Operations, and Observability
An admin panel provides participant data presentation/export plus administrative user search/update APIs. Scanner statistics, general stats, logs, and verification endpoints support on-site operations and monitoring. Admin authorization is a critical boundary because these routes mutate or expose user/event data.
Paths: src/app/adminpanel/page.js, src/app/api/admin/search/route.js, src/app/api/admin/update-user/route.js, src/app/api/logs/route.js, src/app/api/stats/route.js, src/app/scanner/stats/page.js.
External/Client Services and Delivery
Chat is exposed as a server API and rendered through a chatbot component. Email and security utilities likely integrate outbound messaging and validation/security concerns. The application includes a service worker, Workbox bundle, web manifest, and sitemap, enabling installability/caching and discoverability.
Paths: src/app/api/chat/route.js, src/components/chatbot/chatbot-popup.jsx, src/lib/email.js, src/lib/security.js, public/sw.js, public/manifest.json.
Main entry points: page.js Attendee dashboard · layout.js Next.js app shell · schema.prisma Mixed persistence layer · middleware.js Request access gate
Components 21
Public experience
- Festival landing · Visual festival entry experience.
src/app/page.js - Landing sections
src/components/landing/Landing.js - Event catalog · Event detail is driven by bundled event data.
src/app/events/[id]/page.js - Event data
src/app/events/data.js - Festival 3D assets
public/BIT-v1.glb
Access & attendee
- Request access gate · Applies route-level access control.
src/middleware.js - Auth & session · Shared authentication and authorization model.
src/auth.js - Auth API
src/app/api/auth/[...nextauth]/route.js - Attendee dashboard
src/app/dashboard/page.js - Participant eligibility · Institutional and day-scholar eligibility data.
src/lib/dayscholarbitmesra.js - Event registration
src/app/api/events/register/route.js - Team operations · Creation and joining are independent API flows.
src/app/api/teams/create/route.js - QR ticket · Renders attendee ticket state.
src/components/dashboard/QRTicket.jsx
Operations
- Ticket scanner · On-site ticket verification workflow.
src/app/scanner/page.js - Admin panel · Participant administration and export.
src/app/adminpanel/page.js - Admin user API · Searches and mutates participant records.
src/app/api/admin/update-user/route.js - Logs & statistics · Operational monitoring and scanner statistics.
src/app/api/stats/route.js
Data & services
- Mixed persistence layer · Repository retains relational schema/client and document-model access.
prisma/schema.prisma - Festival chat · Server chat endpoint used by the chatbot UI.
src/app/api/chat/route.js - Offline delivery · Enables installability and cached delivery.
public/sw.js
Other components
- Next.js app shell · Application layout and route host.
src/app/layout.js
Connections 22
- Next.js app shell → Festival landing: serves
- Festival landing → Landing sections: composes
- Landing sections → Festival 3D assets: uses
- Next.js app shell → Event catalog: routes to
- Event catalog → Event data: reads
- Request access gate → Auth & session: checks session
- Auth API → Auth & session: exposes
- Request access gate → Attendee dashboard: protects
- Attendee dashboard → Participant eligibility: validates participant type
- Attendee dashboard → Event registration: registers for events
- Attendee dashboard → Team operations: manages teams
- Attendee dashboard → QR ticket: displays
- Event registration → Mixed persistence layer: stores registration
- Team operations → Mixed persistence layer: stores teams
- QR ticket → Ticket scanner: presents for verification
- Request access gate → Admin panel: protects
- Admin panel → Admin user API: administers users
- Admin user API → Mixed persistence layer: updates records
- Ticket scanner → Logs & statistics: reports activity
- Logs & statistics → Mixed persistence layer: reads logs and records
- Next.js app shell → Festival chat: serves chat client
- Next.js app shell → Offline delivery: delivers