How viniciusredes/projeto-agro works
Agro Frota is an in-memory fleet, maintenance, and inventory management MVP with a web management panel and a field-operator mobile app. The workflow is to record machine deployments and returns, track parts and purchases, open and close maintenance orders (including parts consumption and costs), and review fleet and stock status. The web and mobile clients call the backend API; the README documents the mobile QR, damage-photo, and operator flows. Backend internals and several mobile integrations were not excerpted, so those relationships are shown only where documented or left unconnected.
Main entry points: server.ts HTTP API server · inicio.ts Overview dashboard · maquina.service.ts Fleet client service · peca.service.ts Inventory client service
Components 25
Operator and management clients
- Overview dashboard
agro-frontend/src/app/features/inicio/inicio.ts - Fleet screens
agro-frontend/src/app/features/maquinas - Inventory screens
agro-frontend/src/app/features/estoque - Service-order screens
agro-frontend/src/app/features/ordens-servico - Operator home
agro-mobile/src/app/index.tsx - Machine actions
agro-mobile/src/app/maquina/[id]/index.tsx - Machine list
agro-mobile/src/app/maquinas.tsx - QR scanning
agro-mobile/src/app/escanear.tsx - Damage report
agro-mobile/src/app/maquina/[id]/avaria.tsx - Damage photos
agro-mobile/src/servicos/fotos-os.ts - Camera capture
agro-mobile/src/componentes/camera.tsx
Fleet operations
- Fleet API
agro-backend/server.ts - Fleet client service
agro-frontend/src/app/core/services/maquina.service.ts - Mobile fleet service
agro-mobile/src/servicos/maquinas.ts
Parts inventory
- Inventory API
agro-backend/server.ts - Inventory client service
agro-frontend/src/app/core/services/peca.service.ts
Maintenance records
- Maintenance API
agro-backend/server.ts - Service-order client
agro-frontend/src/app/core/services/ordem-servico.service.ts - Mobile order service
agro-mobile/src/servicos/ordens-servico.ts
API and state
- HTTP API server
agro-backend/server.ts - In-memory state
agro-backend/server.ts - Web API transport
agro-frontend/src/app/core/api.ts - Mobile API transport
agro-mobile/src/api.ts
Other components
- Fleet manager
- Field operator
Connections 32
- Fleet manager → Overview dashboard: views status
agro-frontend/src/app/features/inicio/inicio.ts - Overview dashboard → Fleet client service: loads fleet
agro-frontend/src/app/features/inicio/inicio.ts - Overview dashboard → Inventory client service: loads stock
agro-frontend/src/app/features/inicio/inicio.ts - Overview dashboard → Service-order client: loads orders
agro-frontend/src/app/features/inicio/inicio.ts - Fleet screens → Fleet client service: requests fleet
agro-frontend/src/app/features/maquinas/maquinas-lista/maquinas-lista.ts - Inventory screens → Inventory client service: requests stock
agro-frontend/src/app/features/estoque/pecas-lista/pecas-lista.ts - Service-order screens → Service-order client: requests orders
agro-frontend/src/app/features/ordens-servico/os-detalhe/os-detalhe.ts - Field operator → Operator home: uses app
- Operator home → Mobile fleet service: loads machines
agro-mobile/src/app/index.tsx - Machine list → Mobile fleet service: loads machines
agro-mobile/src/app/maquinas.tsx - Machine actions → Mobile fleet service: records actions
agro-mobile/src/app/maquina/[id]/index.tsx - QR scanning → Machine actions: opens machine
- Damage report → Mobile order service: opens corrective order
- Damage report → Camera capture: captures photos
- Camera capture → Damage photos: supplies images
- Damage photos → Mobile order service: uploads photos
- Fleet client service → Web API transport: sends requests
agro-frontend/src/app/core/services/maquina.service.ts - Inventory client service → Web API transport: sends requests
agro-frontend/src/app/core/services/peca.service.ts - Service-order client → Web API transport: sends requests
agro-frontend/src/app/core/services/ordem-servico.service.ts - Mobile fleet service → Mobile API transport: uses transport
- Mobile order service → Mobile API transport: uses transport
- Web API transport → HTTP API server: calls API
README.md - Mobile API transport → HTTP API server: calls API
README.md - HTTP API server → Fleet API: routes fleet
agro-backend/server.ts - HTTP API server → Inventory API: routes inventory
agro-backend/server.ts - HTTP API server → Maintenance API: routes maintenance
agro-backend/server.ts - Fleet API → In-memory state: reads and writes
agro-backend/server.ts - Inventory API → In-memory state: reads and writes
agro-backend/server.ts - Maintenance API → In-memory state: reads and writes
agro-backend/server.ts - Fleet client service → Fleet API: requests fleet routes
- Inventory client service → Inventory API: requests inventory routes
- Service-order client → Maintenance API: requests order routes