How swe2811/empty-container-inspection-monitoring-system works
This is an empty-container inspection web application for managing users, inspection jobs, container inspections, damage records, photos, and operational reports. The principal workflow is authenticated staff creating and assigning jobs, inspectors recording inspections and damage evidence, and staff reviewing or exporting results. The server serves the web pages and routes API requests to domain handlers backed by SQLite. The excerpts establish route-to-database and server-to-route wiring; client API relationships are only partially shown, so that link is marked unverified.
Main entry points: server.js HTTP server · db.js Database access · auth.js Token and roles · reports.js Reports and exports
Components 14
Web interface
- Web client
clg project 2.0/public - Client utilities
clg project 2.0/public/js/app.js
Application platform
- HTTP server
clg project 2.0/server.js - Authentication and users
clg project 2.0/routes/auth.js - Token and roles
clg project 2.0/middleware/auth.js
Inspection operations
- Job assignment
clg project 2.0/routes/jobs.js - Inspections
clg project 2.0/routes/inspections.js - Damage reports
clg project 2.0/routes/damages.js - Photo evidence
clg project 2.0/routes/photos.js
Reporting and persistence
- Reports and exports
clg project 2.0/routes/reports.js - Database access
clg project 2.0/database/db.js - SQLite database
clg project 2.0/database/container_inspection.db - PDF and spreadsheet output
clg project 2.0/routes/reports.js
Other components
- Staff users
Connections 25
- Staff users → Web client: uses
- Web client → Client utilities: loads
- Client utilities → HTTP server: calls API
- HTTP server → Web client: serves pages
clg project 2.0/server.js - HTTP server → Authentication and users: mounts routes
clg project 2.0/server.js - HTTP server → Inspections: mounts routes
clg project 2.0/server.js - HTTP server → Damage reports: mounts routes
clg project 2.0/server.js - HTTP server → Photo evidence: mounts routes
clg project 2.0/server.js - HTTP server → Reports and exports: mounts routes
clg project 2.0/server.js - HTTP server → Job assignment: mounts routes
clg project 2.0/server.js - HTTP server → Database access: queries
clg project 2.0/server.js - Authentication and users → Token and roles: uses
clg project 2.0/routes/auth.js - Authentication and users → Database access: queries
clg project 2.0/routes/auth.js - Job assignment → Token and roles: guards routes
clg project 2.0/routes/jobs.js - Job assignment → Database access: queries
clg project 2.0/routes/jobs.js - Inspections → Token and roles: guards routes
clg project 2.0/routes/inspections.js - Inspections → Database access: queries
clg project 2.0/routes/inspections.js - Damage reports → Token and roles: guards routes
clg project 2.0/routes/damages.js - Damage reports → Database access: queries
clg project 2.0/routes/damages.js - Photo evidence → Token and roles: guards routes
clg project 2.0/routes/photos.js - Photo evidence → Database access: queries
clg project 2.0/routes/photos.js - Reports and exports → Token and roles: guards routes
clg project 2.0/routes/reports.js - Reports and exports → Database access: queries
clg project 2.0/routes/reports.js - Reports and exports → PDF and spreadsheet output: generates
clg project 2.0/routes/reports.js - Database access → SQLite database: reads and writes
clg project 2.0/database/db.js