How dhanik29/code-young-project works
Codeyoung is a full-stack trial-class appointment booking system. A parent uses the React booking flow to request a locally specified time; the backend validates the request, converts it to UTC, checks mentor availability and daily quotas, assigns a mentor, and persists the booking. The confirmation presents parent- and mentor-local times and a meeting link; a separate dashboard lists bookings. The README also documents mentor profiles, slot availability, health checks, and confirmation emails. Backend service wiring is supported by sampled booking code; some frontend and API links reflect documented capabilities and the visible route structure.
Main entry points: App.jsx React app · index.js Route assembly · booking.service.js Booking assignment · BookingPage.jsx Booking form
Components 27
Booking frontend
- React app
frontend/src/App.jsx - Home page
frontend/src/pages/HomePage.jsx - Booking form
frontend/src/pages/BookingPage.jsx - Slot loading
frontend/src/hooks/useSlots.js - Slot picker
frontend/src/components/SlotPicker.jsx - Confirmation page
frontend/src/pages/SuccessPage.jsx - Bookings dashboard
frontend/src/pages/BookingsListPage.jsx - HTTP client
frontend/src/services/api.js
API surface
- Express API
backend/src/app.js - Route assembly
backend/src/routes/index.js - Booking routes
backend/src/routes/booking.routes.js - Slot routes
backend/src/routes/slot.routes.js - Mentor routes
backend/src/routes/mentor.routes.js - Health routes
backend/src/routes/health.routes.js - Booking controller
backend/src/controllers/booking.controller.js - Slot controller
backend/src/controllers/slot.controller.js - Mentor controller
backend/src/controllers/mentor.controller.js - Health controller
backend/src/controllers/health.controller.js
Booking domain
- Booking assignment
backend/src/services/booking.service.js - Slot availability
backend/src/services/slot.service.js - Mentor directory
backend/src/services/mentor.service.js - Timezone conversion
backend/src/utils/timezone.js - Meeting link
backend/src/utils/meetingLink.js
Persistence and notices
- Prisma client
backend/src/db.js - Booking database
backend/src/db.js - Confirmation email
backend/src/services/email.service.js
Other components
- Parent
Connections 32
- Parent → React app: uses
- React app → Home page: routes
- React app → Booking form: routes
- React app → Confirmation page: routes
- React app → Bookings dashboard: routes
- Booking form → Slot loading: loads slots
- Slot loading → HTTP client: requests slots
- Booking form → Slot picker: selects time
- Booking form → HTTP client: submits booking
- Bookings dashboard → HTTP client: fetches bookings
- HTTP client → Express API: HTTP requests
- Express API → Route assembly: mounts routes
- Route assembly → Booking routes: dispatches
- Route assembly → Slot routes: dispatches
- Route assembly → Mentor routes: dispatches
- Route assembly → Health routes: dispatches
- Booking routes → Booking controller: invokes
- Slot routes → Slot controller: invokes
- Mentor routes → Mentor controller: invokes
- Health routes → Health controller: invokes
- Booking controller → Booking assignment: calls
- Slot controller → Slot availability: calls
- Mentor controller → Mentor directory: calls
- Booking assignment → Timezone conversion: converts times
- Booking assignment → Meeting link: generates link
- Booking assignment → Prisma client: reads and writes
- Slot availability → Prisma client: checks availability
- Mentor directory → Prisma client: queries mentors
- Prisma client → Booking database: persists records
- Booking assignment → Confirmation email: sends confirmations
- Confirmation page → Parent: shows result
- Bookings dashboard → Parent: shows bookings