How goncho05/proyecto-mueblerias-jota works
Mueblería Hermanos Jota is a furniture-catalog e-commerce application: customers browse a catalog and product details, while administrators can create and edit products. The React client calls an Express API backed by MongoDB; the client also maintains an in-memory cart. Authentication and role checks protect administrative product routes. The README describes the principal catalog flow, while the provided excerpts establish API routing, persistence calls, and admin-form operations; some UI-to-service call details are not excerpted, so those links are marked unverified.
Main entry points: App.jsx App and cart · server.js Express server · ProductList.jsx Product list · productos.js Product API client
Components 24
Storefront UI
- App and cart
client/src/App.jsx - Home page
client/src/pages/Home.jsx - Product list
client/src/components/ProductList.jsx - Product card
client/src/components/ProductCard.jsx - Product detail
client/src/components/ProductDetail.jsx - Navigation
client/src/components/Navbar.jsx - Contact form
client/src/components/ContactForm.jsx - Footer
client/src/components/Footer.jsx - Product admin form
client/src/components/AdminProductForm.jsx - Product API client
client/src/services/productos.js
Catalog API
- Express server
backend/server.js - Product routes
backend/routes/productos.routes.js - Product operations
backend/controllers/producto.controller.js
Identity and access
- Auth routes
backend/routes/auth.routes.js - Registration and login
backend/controllers/auth.controller.js - Token validation
backend/middlewares/auth.middleware.js - Admin authorization
backend/middlewares/admin.middleware.js
Data and persistence
- Product model
backend/models/product.js - User model
backend/models/user.js - MongoDB
backend/config/db.js - Product seed data
backend/data/productos.js - Seed runner
backend/seed.js
Other components
- Shopper
- API client
Connections 30
- Shopper → App and cart: browses
- App and cart → Home page: routes to
client/src/App.jsx - App and cart → Product list: routes to
client/src/App.jsx - App and cart → Product detail: routes to
client/src/App.jsx - App and cart → Contact form: routes to
client/src/App.jsx - App and cart → Product admin form: routes to
client/src/App.jsx - App and cart → Navigation: renders
client/src/App.jsx - App and cart → Footer: renders
client/src/App.jsx - App and cart → Product list: supplies cart action
client/src/App.jsx - App and cart → Product detail: supplies cart action
client/src/App.jsx - App and cart → Navigation: supplies cart count
client/src/App.jsx - Home page → Product list: uses
client/src/pages/Home.jsx - Product list → Product card: renders
client/src/components/ProductList.jsx - Product list → Product API client: loads products
client/src/components/ProductList.jsx - Product detail → Product API client: loads detail
client/src/components/ProductDetail.jsx - Product admin form → Product API client: reads and saves
client/src/components/AdminProductForm.jsx - Product card → Product API client: uses image URL
client/src/components/ProductCard.jsx - Product API client → Express server: HTTP requests
- API client → Express server: sends requests
- Express server → Product routes: mounts routes
backend/server.js - Express server → Auth routes: mounts routes
backend/server.js - Product routes → Product operations: dispatches
backend/routes/productos.routes.js - Product routes → Token validation: protects writes
backend/routes/productos.routes.js - Product routes → Admin authorization: checks admin role
backend/routes/productos.routes.js - Auth routes → Registration and login: dispatches
backend/routes/auth.routes.js - Registration and login → User model: reads and writes users
backend/controllers/auth.controller.js - Product operations → Product model: reads and writes products
backend/controllers/producto.controller.js - Express server → MongoDB: connects
backend/server.js - Seed runner → Product seed data: loads records
backend/seed.js - Seed runner → Product model: creates records
backend/seed.js