How protogulix/tunnel-backend works
Tunnel GMAO is a maintenance-management backend API for industrial teams. Users and integrations call the FastAPI application to manage equipment and intervention requests; accepted requests can lead to interventions, whose tasks and actions record execution, time, complexity, and parts. Preventive maintenance, stock and purchasing, reporting, and exports support the wider maintenance workflow. Repository routes delegate many operations to domain repositories and database access. Some capabilities are documented in the README and tree but their implementation was not sampled, so their internal wiring is shown only where supported.
Main entry points: app.py API application · interventions/routes.py Interventions · db.py Database access · intervention_requests/routes.py Intervention requests
Components 22
API and identity
- API application
api/app.py - Authentication
api/auth/routes.py - API keys
api/api_keys/routes.py
Maintenance work
- Equipment
api/equipements/routes.py - Intervention requests
api/intervention_requests/routes.py - Interventions
api/interventions/routes.py - Work tasks
api/intervention_tasks/routes.py - Work actions
api/intervention_actions/routes.py - Preventive maintenance
api/preventive_plans - Plan occurrences
api/preventive_occurrences
Stock and purchasing
- Stock catalogue
api/stock_items - Parts catalogue
api/parts/routes.py - Part templates
api/part_templates - Purchase requests
api/purchase_requests/routes.py - Supplier orders
api/supplier_orders/routes.py - Order lines
api/supplier_order_lines/routes.py
Reporting and exports
- Dashboard and stats
api/dashboard - PDF and QR exports
api/exports/routes.py - Audit trail
api/audits
Persistence
- Database access
api/db.py - PostgreSQL
Other components
- Users and integrations
Connections 31
- Users and integrations → API application: sends requests
- API application → Authentication: dispatches
- API application → API keys: dispatches
- API application → Equipment: dispatches
- API application → Intervention requests: dispatches
- API application → Interventions: dispatches
- API application → Work tasks: dispatches
- API application → Work actions: dispatches
- API application → Preventive maintenance: dispatches
- API application → Plan occurrences: dispatches
- API application → Stock catalogue: dispatches
- API application → Parts catalogue: dispatches
- API application → Part templates: dispatches
- API application → Purchase requests: dispatches
- API application → Supplier orders: dispatches
- API application → Order lines: dispatches
- API application → Dashboard and stats: dispatches
- API application → PDF and QR exports: dispatches
- Intervention requests → Interventions: creates on acceptance
- Interventions → Equipment: associates work
- Interventions → Work actions: loads actions
- Work tasks → Work actions: requires for completion
- Preventive maintenance → Plan occurrences: manages occurrences
- Purchase requests → Supplier orders: dispatches requests
- Supplier orders → Order lines: manages lines
- Interventions → Database access: reads and writes
- Intervention requests → Database access: reads and writes
- Authentication → Database access: reads and writes
- Database access → PostgreSQL: queries
- PDF and QR exports → Interventions: loads intervention data
- PDF and QR exports → Database access: loads planning data