How sukanta116/ulab_lost_and_found works
ULAB Lost & Found is a community REST API for reporting lost items, registering found items, and managing ownership claims, with student, staff, and admin capabilities. The principal workflow runs from user authentication through item reporting or found-item registration to claim submission and staff review; admin user management is a separate branch. The graph includes the app’s route mounts and model interactions visible in sampled source. Some route-to-controller and authorization wiring is not shown in the excerpts, so those links are omitted.
Main entry points: app.js Express app · User.js User records · authRoute.js Auth routes · claimController.js Claim verification
Components 20
API entry
- Express app
app.js - Lost routes
routes/lostRoute.js - Found routes
routes/foundRoute.js - Claim routes
routes/claimRoute.js - Auth routes
routes/authRoute.js - Admin routes
routes/adminRoute.js
Identity and access
- Authentication
controllers/authController.js - JWT authentication
middleware/authenticate.js - Request validation
middleware/userValidation.js - Role authorization
middleware/roleMiddleware.js - User administration
controllers/adminController.js - User records
model/User.js
Item records
- Lost item management
controllers/lostController.js - Lost records
model/Lost.js - Found item management
controllers/foundController.js - Found records
model/Found.js
Claims and administration
- Claim verification
controllers/claimController.js - Claim records
model/Claim.js
Other components
- ULAB community
- MongoDB
Connections 19
- ULAB community → Express app: sends requests
- Express app → Lost routes: mounts /lost
- Express app → Found routes: mounts /found
- Express app → Claim routes: mounts /claim
- Express app → Auth routes: mounts /user
- Express app → Admin routes: mounts /admin/user
- Express app → MongoDB: connects
- Auth routes → Request validation: validates registration
- Auth routes → JWT authentication: protects logout
- Authentication → User records: creates and reads
- User administration → User records: manages users
- Lost item management → Lost records: reads and writes
- Found item management → Found records: reads and writes
- Claim verification → Claim records: reads and writes
- Claim verification → User records: imports user model
- User records → MongoDB: persists records
- Lost records → MongoDB: persists records
- Found records → MongoDB: persists records
- Claim records → MongoDB: persists records