How meetindoriya/nexa-salon works
Nexa Salon is a salon-management application: customers browse services and products, register or sign in, and use role-specific dashboards for appointments and other salon operations. The React client calls an Express API; its appointment handlers check availability and manage bookings, while API routes dispatch requests to domain controllers and MongoDB models. The source index also identifies admin, barber, receptionist, inventory, orders, staff, wages, and analytics capabilities. Some of those implementation files were not excerpted, so their internal links are omitted or shown only where indexed references support them.
Main entry points: MainProvider.jsx App provider · AdminDashboard.jsx Admin dashboard · appointment.controller.js Appointment operations · api.js HTTP client
Components 27
React client
- App shell
src/App.jsx - App provider
src/component/MainProvider.jsx - Public salon page
src/component/Main.jsx - Admin dashboard
src/pages/AdminDashboard.jsx - Barber dashboard
src/pages/BarberDashboard.jsx - Receptionist dashboard
src/pages/ReceptionistDashboard.jsx - Customer dashboard
src/pages/UserDashboard.jsx
API and access
- HTTP client
backend/services/api.js - Auth and dashboard calls
backend/services/authService.js - Appointment calls
backend/services/appointmentService.js - Catalog calls
backend/services/serviceService.js - Product calls
backend/services/productService.js - Express API server
backend/src/server.js - Appointment routes
backend/src/routes/appointment.routes.js - Authentication and roles
backend/src/middleware/auth.js - Request validation
backend/src/middleware/validate.js
Salon operations
- Appointment operations
backend/src/controllers/appointment.controller.js - Admin and reporting
backend/src/controllers/dashboard.controller.js - Orders
backend/src/controllers/order.controller.js - Staff and time off
backend/src/controllers/staff.controller.js
Domain data
- Service records
backend/src/models/Service.js - Appointment records
backend/src/models/Appointment.js - User records
backend/src/models/User.js - Time-off records
backend/src/models/TimeOff.js - Order records
backend/src/models/Order.js - Product records
backend/src/models/Product.js
Other components
- Salon user
Connections 38
- Salon user → App shell: uses
- App shell → App provider: renders
src/App.jsx - App provider → Public salon page: routes to
src/component/MainProvider.jsx - App provider → Admin dashboard: routes to
src/component/MainProvider.jsx - App provider → Barber dashboard: routes to
src/component/MainProvider.jsx - App provider → Receptionist dashboard: routes to
src/component/MainProvider.jsx - App provider → Customer dashboard: routes to
src/component/MainProvider.jsx - Public salon page → Catalog calls: loads services
src/component/Main.jsx - Public salon page → Product calls: loads products
src/component/Main.jsx - Admin dashboard → Auth and dashboard calls: loads dashboard
src/pages/AdminDashboard.jsx - Admin dashboard → Appointment calls: manages appointments
src/pages/AdminDashboard.jsx - Admin dashboard → Catalog calls: manages services
src/pages/AdminDashboard.jsx - Admin dashboard → Product calls: manages products
src/pages/AdminDashboard.jsx - Barber dashboard → Appointment calls: loads appointments
src/pages/BarberDashboard.jsx - Barber dashboard → Auth and dashboard calls: loads dashboard
src/pages/BarberDashboard.jsx - Customer dashboard → Appointment calls: books appointments
src/pages/UserDashboard.jsx - Customer dashboard → Auth and dashboard calls: loads account
src/pages/UserDashboard.jsx - Appointment calls → HTTP client: sends requests
backend/services/appointmentService.js - Auth and dashboard calls → HTTP client: sends requests
backend/services/authService.js - Catalog calls → HTTP client: sends requests
backend/services/serviceService.js - Product calls → HTTP client: sends requests
backend/services/productService.js - HTTP client → Express API server: calls API
- Express API server → Appointment routes: mounts routes
backend/src/server.js - Appointment routes → Authentication and roles: guards requests
backend/src/routes/appointment.routes.js - Appointment routes → Request validation: validates input
backend/src/routes/appointment.routes.js - Appointment routes → Appointment operations: dispatches
backend/src/routes/appointment.routes.js - Appointment operations → Appointment records: reads and writes
backend/src/controllers/appointment.controller.js - Appointment operations → Service records: checks service
backend/src/controllers/appointment.controller.js - Appointment operations → User records: checks barber
backend/src/controllers/appointment.controller.js - Appointment operations → Time-off records: checks leave
backend/src/controllers/appointment.controller.js - Admin and reporting → Appointment records: queries
backend/src/controllers/dashboard.controller.js - Admin and reporting → Order records: queries
backend/src/controllers/dashboard.controller.js - Admin and reporting → User records: queries
backend/src/controllers/dashboard.controller.js - Orders → Order records: reads and writes
backend/src/controllers/order.controller.js - Orders → Product records: uses products
backend/src/controllers/order.controller.js - Staff and time off → User records: queries staff
backend/src/controllers/staff.controller.js - Staff and time off → Time-off records: manages leave
backend/src/controllers/staff.controller.js - Staff and time off → Appointment records: checks bookings
backend/src/controllers/staff.controller.js