How dazhygm/proyecto_uninpahu works
MysticalCut is a Vue/Express barber-shop management system. The main workflow is a user signing in, receiving a JWT, and using role-specific screens to manage bookings, services, users, products, carts, and ratings through the REST API. The backend routes requests to controllers, which use domain models and MySQL; appointment and rating flows form a distinct customer-service lifecycle. The README documents the client/server and authentication flow; unsampled frontend feature wiring is shown only as unverified.
Main entry points: api.js HTTP service clients · server.js Express API server · db.js MySQL connection · userRoutes.js User routes
Components 30
Web client
- Vue application shell
front/src/App.vue - Protected navigation
front/src/router/index.js - Sign-in and registration
front/src/views/auth/LoginUser.vue - User administration
front/src/views/users/UsersInfo.vue - Service and booking screens
front/src/views/services/CalendarioCitas.vue - Product catalog and cart
front/src/views/products/ProductsView.vue - Appointment ratings
front/src/views/services/CalificarCita.vue - HTTP service clients
front/src/services/api.js
REST API
- Express API server
back/server.js - User routes
back/routes/userRoutes.js - User and auth logic
back/controllers/userController.js - JWT verification
back/middlewares/authenticate.js - Mail delivery
back/config/mailer.js - MySQL connection
back/config/db.js - User data access
back/models/userModel.js
Appointments and ratings
- Appointment logic
back/controllers/quotesController.js - Appointment routes
back/routes/quotesRoutes.js - Appointment records
back/models/Quote.js - Rating logic
back/controllers/ratingController.js - Rating routes
back/routes/ratingRoutes.js - Rating records
back/models/Rating.js
Catalog and commerce
- Service routes
back/routes/serviceRoutes.js - Service management
back/controllers/serviceController.js - Service records
back/models/serviceModel.js - Product routes
back/routes/productRoutes.js - Product management
back/controllers/productController.js - Shopping cart logic
back/controllers/shoppingCartController.js - Cart records
back/models/ShoppingCart.js - Image uploads
back/middlewares/upload.js
Other components
- Barber shop user
Connections 35
- Barber shop user → Vue application shell: uses
- Vue application shell → Protected navigation: renders routes
front/src/App.vue - Barber shop user → Sign-in and registration: signs in
- Sign-in and registration → HTTP service clients: requests auth
- Protected navigation → HTTP service clients: uses API
- HTTP service clients → Express API server: HTTP requests
- Express API server → User routes: mounts
back/server.js - Express API server → Appointment routes: mounts
back/server.js - Express API server → Rating routes: mounts
back/server.js - Express API server → Service routes: mounts
back/server.js - Express API server → Product routes: mounts
back/server.js - User routes → User and auth logic: dispatches
back/routes/userRoutes.js - User routes → JWT verification: protects routes
back/routes/userRoutes.js - User and auth logic → User data access: calls
back/controllers/userController.js - User and auth logic → Mail delivery: uses mail
back/controllers/userController.js - User data access → MySQL connection: queries
back/models/userModel.js - Appointment routes → Appointment logic: dispatches
back/routes/quotesRoutes.js - Appointment logic → Appointment records: calls
back/controllers/quotesController.js - Appointment records → MySQL connection: queries
back/models/Quote.js - Rating routes → Rating logic: dispatches
back/routes/ratingRoutes.js - Rating logic → Rating records: calls
back/controllers/ratingController.js - Rating logic → Appointment records: checks appointment
back/controllers/ratingController.js - Rating records → MySQL connection: queries
back/models/Rating.js - Service routes → Service management: dispatches
back/routes/serviceRoutes.js - Service management → Service records: calls
back/controllers/serviceController.js - Service records → MySQL connection: queries
back/models/serviceModel.js - Product routes → Product management: dispatches
back/routes/productRoutes.js - Product routes → Image uploads: processes images
back/routes/productRoutes.js - Product management → MySQL connection: uses data access
- Shopping cart logic → Cart records: uses
- Cart records → MySQL connection: queries
back/models/ShoppingCart.js - Service and booking screens → HTTP service clients: requests services
- Product catalog and cart → HTTP service clients: requests products
- Appointment ratings → HTTP service clients: requests ratings
- User administration → HTTP service clients: requests users