How andres345f/proyecto-2---feder works
FEDER Web is a Spanish-language agricultural federation commerce and operations system, with producer-origin traceability. A user enters through the React router, uses role-specific pages and API clients, and receives JSON responses from Laravel services backed by the existing PostgreSQL schema. Distinct workflows include customer catalog/cart/orders/payments, producer applications and production-to-purchase operations, and staff administration and operational reporting. The README documents the controller→service→repository layering; source excerpts confirm producer-operation calls and repository persistence. Most domain modules are indexed but not sampled, so their internal links are shown only where documented.
Main entry points: api.php REST route dispatch · OperacionProductorService.php Production and purchasing · Services Commerce rules · AppRouter.jsx Role-based routes
Components 22
Web presentation
- Role-based routes
frontend/src/routes/AppRouter.jsx - Commerce and ops pages
frontend/src/pages - Session and preferences
frontend/src/context - HTTP client
frontend/src/api/clienteHttp.js
API boundary
- REST route dispatch
backend/routes/api.php - Authentication endpoints
backend/app/Http/Controllers/Api/AutenticacionController.php - Product endpoints
backend/app/Http/Controllers/Api/ProductoController.php - Producer operations endpoints
backend/app/Http/Controllers/Api/OperacionProductorController.php - Producer affiliation
backend/app/Http/Controllers/Api/ProductorController.php
Commerce operations
- Commerce rules
backend/app/Services - Commerce repositories
backend/app/Repositories - Payments and plans
backend/app/Services/PagoService.php - Orders and delivery
backend/app/Services/PedidoService.php
Producer operations
- Production and purchasing
backend/app/Services/OperacionProductorService.php - Producer operation data
backend/app/Repositories/OperacionProductorRepository.php - Producer affiliation rules
backend/app/Services/ProductorService.php
Business platform
- Administration and permissions
backend/app/Services/AdminUsuarioService.php - Reporting and statistics
backend/app/Services/ReporteService.php - Audit trail
backend/app/Services/AuditoriaService.php - PostgreSQL
- Operation confirmation records
backend/app/Models/ConfirmacionOperacion.php
Other components
- Web users
Connections 24
- Web users → Role-based routes: opens
frontend/src/routes/AppRouter.jsx - Role-based routes → Commerce and ops pages: routes to
frontend/src/routes/AppRouter.jsx - Session and preferences → Role-based routes: guards routes
frontend/src/App.jsx - Commerce and ops pages → HTTP client: requests data
- HTTP client → REST route dispatch: sends JSON
- REST route dispatch → Authentication endpoints: dispatches auth
backend/routes/api.php - REST route dispatch → Product endpoints: dispatches product
backend/routes/api.php - REST route dispatch → Producer operations endpoints: dispatches operations
backend/routes/api.php - REST route dispatch → Producer affiliation: dispatches affiliation
backend/routes/api.php - Authentication endpoints → Session and preferences: returns session data
- Product endpoints → Commerce rules: delegates rules
backend/app/Http/Controllers/Api/ProductoController.php - Producer operations endpoints → Production and purchasing: calls operations
backend/app/Http/Controllers/Api/OperacionProductorController.php - Producer affiliation → Producer affiliation rules: calls affiliation rules
backend/app/Http/Controllers/Api/ProductorController.php - Production and purchasing → Producer operation data: reads and updates
backend/app/Services/OperacionProductorService.php - Producer operation data → Operation confirmation records: queries records
backend/app/Repositories/OperacionProductorRepository.php - Production and purchasing → PostgreSQL: runs transactions
backend/app/Services/OperacionProductorService.php - Commerce rules → Commerce repositories: uses repositories
backend/app/Services/OperacionProductorService.php - Commerce rules → Orders and delivery: includes order rules
- Commerce rules → Payments and plans: includes payment rules
- Commerce repositories → PostgreSQL: queries data
- Production and purchasing → Commerce rules: uses product rules
backend/app/Services/OperacionProductorService.php - Production and purchasing → Audit trail: records operations
backend/app/Services/OperacionProductorService.php - Administration and permissions → PostgreSQL: persists settings
- Reporting and statistics → PostgreSQL: reads business data