How oswincuaran/proyect_isw2_ferreteria_cafetera_microservices works
Ferretería Cafetera’s inventory system is a set of REST microservices behind a Laravel API Gateway. The documented user flow is request → gateway authentication/role checks and routing → the relevant service; purchases can also validate suppliers and warehouses and register inventory movements. Core domain branches cover inventory, catalog, suppliers, purchasing and returns, alerts, and reporting. Edges between services follow README documentation; internal edges use the shown excerpts or source-index references. Some service internals and route wiring were not sampled, so those links are limited to documented relationships.
Main entry points: ProxyController.php API gateway · clients.py Service clients · orders.py Purchases service · products.js Products
Components 21
Gateway and identity
- API gateway
gateway/app/Http/Controllers/ProxyController.php - User management
gateway/app/Http/Controllers/UserController.php - Users and roles
gateway/app/Models/User.php - Request security
gateway/bootstrap/app.php
Inventory
- Inventory service
inventario/inventory/views.py - Stock and movements
inventario/inventory/services.py - Inventory records
inventario/inventory/models.py
Purchases and returns
- Purchases service
compras/orders.py - Returns service
compras/returns.py - Service clients
compras/clients.py - Purchases database
compras/database.py
Catalog and suppliers
- Categories
catalogo/routes/categories.js - Products
catalogo/routes/products.js - Catalog database
catalogo/db.js - Supplier service
proveedores/suppliers/views.py - Supplier lookup
catalogo/clients/suppliers.js
Alerts and reporting
- Alerts service
notificaciones/routes/alerts.js - Reports and dashboard
reportes/reports.py - Report clients
reportes/clients.py - Email delivery
notificaciones/utils/mailer.js
Other components
- Staff user
Connections 26
- Staff user → API gateway: sends request
README.md - API gateway → Request security: applies checks
gateway/bootstrap/app.php - API gateway → User management: routes identity
- User management → Users and roles: reads and writes
gateway/app/Http/Controllers/UserController.php - API gateway → Inventory service: routes requests
README.md - API gateway → Supplier service: routes requests
README.md - API gateway → Categories: routes requests
README.md - API gateway → Products: routes requests
README.md - API gateway → Purchases service: routes requests
README.md - API gateway → Alerts service: routes requests
README.md - API gateway → Reports and dashboard: routes requests
README.md - Inventory service → Stock and movements: delegates stock logic
- Stock and movements → Inventory records: uses records
inventario/inventory/services.py - Purchases service → Service clients: validates and registers
compras/orders.py - Returns service → Service clients: calls service clients
compras/returns.py - Purchases service → Purchases database: uses database
compras/orders.py - Returns service → Purchases database: uses database
compras/returns.py - Service clients → Inventory service: checks and posts movements
compras/clients.py - Service clients → Supplier service: checks supplier
compras/clients.py - Categories → Catalog database: queries
catalogo/routes/categories.js - Products → Catalog database: queries
catalogo/routes/products.js - Products → Supplier lookup: checks supplier
catalogo/routes/products.js - Supplier lookup → Supplier service: requests supplier data
- Alerts service → Email delivery: sends notifications
notificaciones/routes/alerts.js - Alerts service → API gateway: looks up user data
- Reports and dashboard → Report clients: uses service clients