How graduation-team-2027/backend works
This repository provides a backend API for smoking-detection operations: staff authentication and administration, participant enrollment, camera/location management, and face-reference uploads. The runtime path is an API request routed to a controller, which uses the EF Core context to read or change SQL-backed records; face uploads also write image files to local storage. Startup configures the API and seeds demo records. The tree and excerpts show no detection/inference or review-result pipeline, so none is represented. Camera controller behavior is only partially evidenced by the source index.
Main entry points: AppDbContext.cs EF context · Program.cs API runtime · FaceReferenceController.cs Face references · StaffController.cs Staff accounts
Components 15
API and access
- API runtime
AISmokingDetection/Program.cs - Staff accounts
AISmokingDetection/Controllers/StaffController.cs - Participants
AISmokingDetection/Controllers/ParticipantController.cs - Cameras
AISmokingDetection/Controllers/CameraController.cs - Face references
AISmokingDetection/Controllers/FaceReferenceController.cs
Operational records
- Staff record
AISmokingDetection/Entities/Staff.cs - Participant record
AISmokingDetection/Entities/Participant.cs - Face metadata
AISmokingDetection/Entities/FaceReferenceMetadata.cs - Camera record
AISmokingDetection/Entities/Camera.cs - Location record
AISmokingDetection/Entities/Location.cs
Persistence
- EF context
AISmokingDetection/Data/AppDbContext.cs - Demo seeding
AISmokingDetection/Data/DbInitializer.cs - SQL database
- Local image files
Other components
- Staff
Connections 22
- Staff → API runtime: sends requests
AISmokingDetection/Program.cs - API runtime → Staff accounts: routes controllers
AISmokingDetection/Program.cs - API runtime → Participants: routes controllers
AISmokingDetection/Program.cs - API runtime → Cameras: routes controllers
AISmokingDetection/Program.cs - API runtime → Face references: routes controllers
AISmokingDetection/Program.cs - Staff accounts → EF context: queries and saves
AISmokingDetection/Controllers/StaffController.cs - Participants → EF context: queries and saves
AISmokingDetection/Controllers/ParticipantController.cs - Cameras → EF context: uses context
AISmokingDetection/Controllers/CameraController.cs - Face references → EF context: checks and saves metadata
AISmokingDetection/Controllers/FaceReferenceController.cs - Face references → Local image files: writes images
AISmokingDetection/Controllers/FaceReferenceController.cs - API runtime → EF context: registers context
AISmokingDetection/Program.cs - API runtime → Demo seeding: runs seeding
AISmokingDetection/Program.cs - API runtime → SQL database: configures SQL Server
AISmokingDetection/Program.cs - EF context → SQL database: persists records
- EF context → Staff record: maps records
AISmokingDetection/Data/AppDbContext.cs - EF context → Participant record: maps records
AISmokingDetection/Data/AppDbContext.cs - EF context → Face metadata: maps records
AISmokingDetection/Data/AppDbContext.cs - EF context → Camera record: maps records
AISmokingDetection/Data/AppDbContext.cs - EF context → Location record: maps records
AISmokingDetection/Data/AppDbContext.cs - Demo seeding → EF context: seeds records
AISmokingDetection/Data/DbInitializer.cs - Face metadata → Participant record: belongs to
AISmokingDetection/Entities/FaceReferenceMetadata.cs - Camera record → Location record: belongs to
AISmokingDetection/Entities/Camera.cs