How sxiks/bike-store_3400626_equipo_2 works
Bike Store is a bicycle-and-accessories shop with a layered Express/PostgreSQL API and a React SPA. The intended customer path is browsing a catalog, authenticating, managing a cart, creating an order, and attempting simulated payment. The README notes that the current frontend uses simulated shop data; only login and registration are connected to the API, so the graph keeps those frontend and backend capabilities distinct. Backend routes also document administration and dashboard capabilities. Links reflect excerpts, the source index, or README; unsampled implementation details are not assumed.
Main entry points: pedidos.services.js Order and payment · app.js Express API · db.js Database pool · carrito.services.js Cart service
Components 34
Storefront
- React app
frontend/src/App.jsx - Shop page
frontend/src/pages/TiendaPage.jsx - Catalog UI
frontend/src/components/Catalogo.jsx - Cart state
frontend/src/context/CarritoContext.jsx - Cart panel
frontend/src/components/CarritoPanel.jsx - Auth state
frontend/src/context/AuthContext.jsx - Login and register
frontend/src/pages/LoginPage.jsx - Auth client
frontend/src/services/auth.service.js - HTTP client
frontend/src/services/api.js - Session storage
frontend/src/utils/storage.js
API and security
- Express API
backend/src/app.js - Auth routes
backend/src/routes/auth.routes.js - Product routes
backend/src/routes/productos.routes.js - Cart routes
backend/src/routes/carrito.routes.js - Order routes
backend/src/routes/pedidos.routes.js - JWT security
backend/src/middlewares/auth.middleware.js - Auth controller
backend/src/controllers/auth.controller.js - Product controller
backend/src/controllers/productos.controller.js - Cart controller
backend/src/controllers/carrito.controller.js - Order controller
backend/src/controllers/pedidos.controller.js
Commerce domains
- Identity service
backend/src/services/auth.services.js - Catalog service
backend/src/services/productos.services.js - Cart service
backend/src/services/carrito.services.js - Order and payment
backend/src/services/pedidos.services.js - Dashboard domain
backend/src/services/dashboard.services.js
Persistence and configuration
- User repository
backend/src/repositories/usuarios.repository.js - Product repository
backend/src/repositories/productos.repository.js - Cart repository
backend/src/repositories/carritos.repository.js - Order repository
backend/src/repositories/pedidos.repository.js - Payment repository
backend/src/repositories/pagos.repository.js - Transactions
backend/src/repositories/transaction.js - Database pool
backend/src/config/db.js
Other components
- Shopper
- PostgreSQL
Connections 41
- Shopper → React app: uses
README.md - React app → Shop page: routes to
frontend/src/App.jsx - Shop page → Catalog UI: presents
- Shop page → Cart state: uses
- Cart panel → Cart state: reads
frontend/src/components/CarritoPanel.jsx - Login and register → Auth state: uses
- Auth state → Auth client: calls
frontend/src/context/AuthContext.jsx - Login and register → Auth client: registers
- Auth client → HTTP client: sends
frontend/src/services/auth.service.js - Auth state → Session storage: reads/writes
frontend/src/context/AuthContext.jsx - HTTP client → Express API: HTTP/JSON
README.md - Express API → Auth routes: mounts
backend/src/app.js - Express API → Product routes: mounts
backend/src/app.js - Express API → Cart routes: mounts
backend/src/app.js - Express API → Order routes: mounts
backend/src/app.js - Auth routes → Auth controller: routes to
backend/src/routes/auth.routes.js - Product routes → Product controller: routes to
backend/src/routes/productos.routes.js - Cart routes → Cart controller: routes to
backend/src/routes/carrito.routes.js - Order routes → Order controller: routes to
backend/src/routes/pedidos.routes.js - Product routes → JWT security: guards admin
backend/src/routes/productos.routes.js - Auth controller → Identity service: calls
backend/src/controllers/auth.controller.js - Product controller → Catalog service: calls
backend/src/controllers/productos.controller.js - Cart controller → Cart service: calls
backend/src/controllers/carrito.controller.js - Order controller → Order and payment: calls
backend/src/controllers/pedidos.controller.js - Identity service → User repository: reads/writes
backend/src/services/auth.services.js - JWT security → Express API: verifies requests
- Catalog service → Product repository: queries
backend/src/services/productos.services.js - Cart service → Cart repository: queries
backend/src/services/carrito.services.js - Cart service → Product repository: checks products
backend/src/services/carrito.services.js - Order and payment → Cart service: loads cart
backend/src/services/pedidos.services.js - Order and payment → Order repository: creates/reads
backend/src/services/pedidos.services.js - Order and payment → Payment repository: records payment
backend/src/services/pedidos.services.js - Order and payment → Product repository: locks/updates stock
backend/src/services/pedidos.services.js - Order and payment → Cart repository: empties cart
backend/src/services/pedidos.services.js - Order and payment → Transactions: runs transaction
backend/src/services/pedidos.services.js - Product repository → Database pool: queries
backend/src/repositories/productos.repository.js - Order repository → Database pool: queries
backend/src/repositories/pedidos.repository.js - User repository → Database pool: queries
backend/src/repositories/usuarios.repository.js - Transactions → Database pool: uses pool
backend/src/repositories/transaction.js - Database pool → PostgreSQL: connects
README.md - Express API → Dashboard domain: serves dashboard