How prabhakarmaganti/tracegaurd works
TraceGuard captures manufacturing custody from material receiving and production through batch genealogy, quality defects, targeted recall containment, and compliance evidence. Operators and quality, warehouse, and management users work through the browser UI; its modules call FastAPI endpoints, whose routers delegate business operations to shared CRUD logic and persist relational records. The README documents reporting, audit logs, master data, and QR labels as product capabilities. Some backend implementations were not sampled, so those branches are shown at the documented subsystem level without speculative internal call chains.
Main entry points: app.js UI Controller · main.py FastAPI App · crud.py Domain Operations · trace.js Trace UI
Components 25
Plant Interface
- Browser UI
frontend/index.html - UI Controller
frontend/js/app.js - Dashboard UI
frontend/js/dashboard.js - Batch UI
frontend/js/batches.js - Trace UI
frontend/js/trace.js - Materials UI
frontend/js/materials.js - Defects UI
frontend/js/defects.js - Recall UI
frontend/js/recalls.js - Reports UI
frontend/js/reports.js - Master Data UI
frontend/js/master_data.js
Production Operations
- Batch Endpoints
backend/routers/batches.py - Material Endpoints
backend/routers/materials.py - Master Data Endpoints
backend/routers/master_data.py - Trace Endpoints
backend/routers/trace.py
Quality and Recall
- Dashboard Endpoints
backend/routers/dashboard.py - Defect Endpoints
backend/routers/defects.py - Recall Endpoints
backend/routers/recalls.py - Report Endpoints
backend/routers/reports.py - Audit Endpoints
backend/routers/audit.py
API and Persistence
- FastAPI App
backend/main.py - Domain Operations
backend/crud.py - Code and QR Labels
backend/labels.py - Report Generation
backend/reports.py - SQLite Store
backend/database.py
Other components
- Plant User
Connections 43
- Plant User → Browser UI: uses
- Browser UI → UI Controller: loads
- UI Controller → Dashboard UI: dispatches
- UI Controller → Batch UI: dispatches
- UI Controller → Trace UI: dispatches
- UI Controller → Materials UI: dispatches
- UI Controller → Defects UI: dispatches
- UI Controller → Recall UI: dispatches
- UI Controller → Reports UI: dispatches
- UI Controller → Master Data UI: dispatches
- UI Controller → Dashboard Endpoints: HTTP requests
- Dashboard UI → Trace UI: opens trace
- Batch UI → Batch Endpoints: HTTP requests
- Batch UI → Master Data Endpoints: loads choices
- Trace UI → Trace Endpoints: HTTP requests
- Trace UI → Materials UI: opens lot label
- Materials UI → Material Endpoints: HTTP requests
- Defects UI → Defect Endpoints: HTTP requests
- Recall UI → Recall Endpoints: HTTP requests
- Reports UI → Report Endpoints: HTTP requests
- Master Data UI → Master Data Endpoints: HTTP requests
- FastAPI App → Batch Endpoints: registers routes
- FastAPI App → Material Endpoints: registers routes
- FastAPI App → Master Data Endpoints: registers routes
- FastAPI App → Trace Endpoints: registers routes
- FastAPI App → Dashboard Endpoints: registers routes
- FastAPI App → Defect Endpoints: registers routes
- FastAPI App → Recall Endpoints: registers routes
- FastAPI App → Report Endpoints: registers routes
- FastAPI App → Audit Endpoints: registers routes
- Batch Endpoints → Domain Operations: runs batch operations
- Batch Endpoints → Code and QR Labels: generates QR
- Material Endpoints → Domain Operations: manages lots
- Material Endpoints → Code and QR Labels: generates QR
- Master Data Endpoints → Domain Operations: manages reference data
- Trace Endpoints → Domain Operations: resolves genealogy
- Dashboard Endpoints → Domain Operations: loads metrics
- Defect Endpoints → Domain Operations: records defects
- Recall Endpoints → Domain Operations: calculates containment
- Report Endpoints → Report Generation: generates exports
- Audit Endpoints → Domain Operations: loads audit events
- Domain Operations → SQLite Store: reads and writes
- Report Generation → SQLite Store: reads records