How rohankapadiya/booking-platform works
This is a provider/customer booking platform: providers publish services and time slots, and customers find available slots and book or cancel them. The Next.js frontend supplies the user-facing pages and server actions; its calls into the Express API are only represented where shown by the excerpts. The API separates authentication, service/slot management and bookings, using JWT role checks and Prisma-backed persistence. The README is sparse, and some frontend/API wiring was not excerpted, so uncertain connections are omitted.
Main entry points: auth.js Authentication · db.js Prisma client · app.js Express API · services.js Services and slots
Components 20
Web experience
- Browse services
frontend/src/app/page.js - Service details
frontend/src/app/services/[id]/page.js - Sign in
frontend/src/app/login/page.js - Register
frontend/src/app/register/page.js - Provider dashboard
frontend/src/app/dashboard/page.js - Create service form
frontend/src/components/CreateServiceForm.js - Provider actions
frontend/src/lib/provider-actions.js - Auth actions
frontend/src/lib/auth-actions.js - Session lookup
frontend/src/lib/session.js - My bookings
frontend/src/app/bookings/page.js - Booking actions
frontend/src/lib/booking-actions.js
Booking API
- Express API
backend/src/app.js - Authentication
backend/src/routes/auth.js - JWT and roles
backend/src/middleware/auth.js - Services and slots
backend/src/routes/services.js - Bookings
backend/src/routes/bookings.js
Persistence
- Prisma client
backend/src/db.js - Relational database
backend/prisma/schema.prisma
Other components
- Customer
- Provider
Connections 18
- Provider → Provider dashboard: manages services
README.md - Customer → Browse services: finds services
README.md - Customer → My bookings: manages bookings
README.md - Create service form → Provider actions: submits to
frontend/src/components/CreateServiceForm.js - Sign in → Auth actions: authenticates via
- Register → Auth actions: registers via
- Session lookup → Authentication: requests current user
frontend/src/lib/session.js - Auth actions → Authentication: posts credentials
frontend/src/lib/auth-actions.js - Express API → Authentication: mounts routes
backend/src/app.js - Express API → Services and slots: mounts routes
backend/src/app.js - Express API → Bookings: mounts routes
backend/src/app.js - Authentication → JWT and roles: protects profile
backend/src/routes/auth.js - Services and slots → JWT and roles: checks access
backend/src/routes/services.js - Bookings → JWT and roles: checks access
backend/src/routes/bookings.js - Authentication → Prisma client: reads and writes users
backend/src/routes/auth.js - Services and slots → Prisma client: reads and writes services
backend/src/routes/services.js - Bookings → Prisma client: reads and writes bookings
backend/src/routes/bookings.js - Prisma client → Relational database: accesses