How anandha-scraper/spot-q works
This is an authenticated foundry operations and quality-records application: department users enter production, melting, moulding, sand-lab, and material-test records, then view reports; administrators also manage users and download logs. The frontend routes users to department forms and reports, while the backend exposes protected API routes and separates controllers, services, and repositories. The graph preserves documented product areas, but many domain modules were not sampled, so uncertain internal calls are omitted.
Main entry points: app.jsx Application routes · services Record services · server.js HTTP server · routes Department APIs
Components 22
Web application
- Application routes
frontend/app.jsx - Session context
frontend/src/context/AuthContext.jsx - Department drafts
frontend/src/context/DepartmentContext.jsx - Department forms
frontend/src/pages - Department reports
frontend/src/pages - Admin dashboard
frontend/src/Components/AdminDashboard.jsx - Download log reports
frontend/src/pages/Admin/DownloadLogsReport.jsx
Identity and access
- Authentication API
backend/routes/auth.js - Authentication handlers
backend/controllers/auth.js - Authentication service
backend/services/authService.js - Request access checks
backend/middleware/auth.js
Foundry records
- Department APIs
backend/routes - Record handlers
backend/controllers - Record services
backend/services - DISA report service
backend/services/disaReportService.js - DISA report repository
backend/repositories/disaReportRepository.js - Melting log service
backend/services/meltingLogService.js - Sand record service
backend/services/sandRecordService.js
API and persistence
- HTTP server
backend/server.js - PostgreSQL database
backend/database/prisma.js
Other components
- Department user
- Administrator
Connections 24
- Department user → Application routes: uses
frontend/app.jsx - Administrator → Application routes: uses
frontend/app.jsx - Application routes → Session context: provides session
frontend/app.jsx - Application routes → Department forms: routes to
frontend/app.jsx - Application routes → Department reports: routes to
frontend/app.jsx - Application routes → Admin dashboard: routes to
frontend/app.jsx - Application routes → Download log reports: routes to
frontend/app.jsx - Department forms → Department drafts: uses drafts
frontend/src/pages/Melting/MeltingLogSheet.jsx - Session context → Authentication API: requests session
frontend/src/context/AuthContext.jsx - HTTP server → Authentication API: mounts
backend/server.js - HTTP server → Department APIs: mounts
backend/server.js - HTTP server → Request access checks: protects requests
backend/server.js - Authentication API → Authentication handlers: dispatches
backend/routes/auth.js - Authentication handlers → Authentication service: calls
backend/controllers/auth.js - Request access checks → Authentication service: resolves user
backend/middleware/auth.js - Department APIs → Record handlers: dispatches
backend/routes/auth.js - Department APIs → Record services: routes operations
backend/routes/Melting-MeltingLogsheet.js - Record services → DISA report service: includes
- DISA report service → DISA report repository: calls
backend/services/disaReportService.js - DISA report repository → PostgreSQL database: queries
backend/repositories/disaReportRepository.js - Record services → Melting log service: includes
- Record services → Sand record service: includes
- Melting log service → PostgreSQL database: persists records
- Sand record service → PostgreSQL database: persists records