How hhyalcin/my-hair works
My Hair is a Flutter barber-discovery and appointment-booking app with a Node/Express API. The customer workflow is mobile app → shop discovery and staff/service availability → appointment booking and lifecycle updates; shop owners and staff also manage shops, services, schedules, and appointments, while customers can review completed visits and join a waitlist. The graph covers the documented mobile capabilities and sampled backend routes/controllers. Flutter application internals are not present in the supplied tree, so mobile is represented as a single client node; unsampled backend subsystems use only paths established by the tree or README.
Main entry points: db MySQL and cache · index.js Express API · notification.service.js Notifications · appointments.controller.js Appointment lifecycle
Components 24
Mobile client
- Flutter app
mobile
API and identity
- Express API
backend/src/index.js - Auth routes
backend/src/routes/auth.routes.js - Authentication
backend/src/controllers/auth.controller.js - Profile management
backend/src/controllers/profile.controller.js - MySQL and cache
backend/src/db - Firebase services
backend/src/firebase.js
Booking operations
- Shop routes
backend/src/routes/shops.routes.js - Shop discovery
backend/src/controllers/shops.controller.js - Barber routes
backend/src/routes/barber.routes.js - Shop operations
backend/src/controllers/barber.controller.js - Appointment routes
backend/src/routes/appointments.routes.js - Appointment lifecycle
backend/src/controllers/appointments.controller.js - Slot availability
backend/src/services/availability.service.js
Customer engagement
- Waitlist routes
backend/src/routes/waitlist.routes.js - Waitlist handling
backend/src/controllers/waitlist.controller.js - Review routes
backend/src/routes/reviews.routes.js - Review handling
backend/src/controllers/reviews.controller.js - Shop QR links
backend/src/controllers/qr.controller.js - Booking reminders
backend/src/crons - Notifications
backend/src/services/notification.service.js - Email delivery
backend/src/services/email.service.js
Other components
- Customer
- Shop owner or staff
Connections 39
- Customer → Flutter app: uses
- Shop owner or staff → Flutter app: uses
- Flutter app → Express API: API requests
- Express API → Auth routes: dispatches
- Express API → Shop routes: dispatches
- Express API → Barber routes: dispatches
- Express API → Appointment routes: dispatches
- Express API → Waitlist routes: dispatches
- Express API → Review routes: dispatches
- Express API → Shop QR links: dispatches
- Express API → Profile management: dispatches
- Auth routes → Authentication: calls
- Authentication → MySQL and cache: reads and writes
- Authentication → Firebase services: verifies identity
- Authentication → Email delivery: sends account email
- Profile management → MySQL and cache: reads and writes
- Shop routes → Shop discovery: calls
- Shop discovery → MySQL and cache: queries shops
- Barber routes → Shop operations: calls
- Shop operations → MySQL and cache: manages shop data
- Appointment routes → Appointment lifecycle: calls
- Appointment lifecycle → Slot availability: selects available staff
- Appointment lifecycle → MySQL and cache: books and updates
- Appointment lifecycle → Notifications: triggers notices
- Appointment lifecycle → Slot availability: invalidates cache
- Waitlist routes → Waitlist handling: calls
- Waitlist handling → MySQL and cache: reads and writes
- Waitlist handling → Notifications: triggers notices
- Review routes → Review handling: calls
- Review handling → MySQL and cache: stores reviews
- Review handling → Notifications: notifies owner
- Booking reminders → MySQL and cache: checks expiries
- Booking reminders → Notifications: triggers reminders
- Notifications → MySQL and cache: loads recipient data
- Notifications → Firebase services: sends push notifications
- Notifications → Email delivery: sends email notices
- Email delivery → MySQL and cache: loads recipient email
- Email delivery → Firebase services
- Shop QR links → MySQL and cache: resolves shop