# vignana-jyothi/easyfind architecture

> Architecture diagram of the GitHub repository vignana-jyothi/easyfind, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vignana-jyothi/easyfind
- Repository: https://github.com/vignana-jyothi/easyfind

## Overview

EasyFind is a campus lost-and-found product with separate student and administrator web apps, an Express/MongoDB backend, and a separate authentication service. Students sign in, report lost items, search found-item listings, and view reports or notifications; administrators manage found items and complete verified handovers. The backend also matches lost and found reports and dispatches email and in-app notifications. Some frontend-to-backend wiring is not shown in the excerpts, so those relationships are omitted or marked unverified.

Main entry points: [`backend/be9-easyfind/utils/emailDispatcher.js`](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/utils/emailDispatcher.js) (Match and email dispatch), [`backend/be9-easyfind/server.js`](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/server.js) (API server), [`frontend/fe9-easyfind-child/src/App/App.jsx`](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/App/App.jsx) (Student routes), [`backend/be9-easyfind/routes/admin.route.js`](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/routes/admin.route.js) (Admin item routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_student["Student app"]
  node_student_app["Student routes<br/>[App.jsx]"]
  node_student_auth["Student auth state<br/>[AuthContext.jsx]"]
  node_student_home["Dashboard<br/>[UserHome.jsx]"]
  node_item_search["Search found items<br/>[SearchItem.jsx]"]
  node_item_report["Report lost item<br/>[ReportItem.jsx]"]
  node_my_reports["My reports<br/>[MyReports.jsx]"]
  node_date_helper["Date formatting<br/>[dateHelper.js]"]
end

subgraph group_admin["Admin app"]
  node_admin_app["Admin routes<br/>[App.jsx]"]
  node_admin_manage["Manage items<br/>[ManageItems.jsx]"]
  node_admin_edit["Edit found item<br/>[EditItem.jsx]"]
  node_admin_handover["Student handover<br/>[GiveToStudent.jsx]"]
end

subgraph group_backend["EasyFind backend"]
  node_api_server["API server<br/>[server.js]"]
  node_auth_routes["Authentication routes<br/>[auth.route.js]"]
  node_user_routes["Student item routes<br/>[user.route.js]"]
  node_admin_routes["Admin item routes<br/>[admin.route.js]"]
  node_notification_routes["Notification routes"]
  node_user_auth["Student authorization<br/>[user-auth.js]"]
  node_email_dispatch["Match and email dispatch<br/>[emailDispatcher.js]"]
  node_matching["Item matching"]
end

subgraph group_services["Data and integrations"]
  node_lost_model[("Lost item records<br/>[LostItem.js]")]
  node_found_model[("Found item records<br/>[FoundItem.js]")]
  node_user_model[("User records<br/>[User.js]")]
  node_notification_model[("Notifications<br/>[Notification.js]")]
  node_email_model[("Email queue")]
  node_mailer["Email delivery<br/>[notifications.js]"]
end

node_student_actor(("Student"))
node_admin_actor(("Administrator"))
node_auth_service["Google auth service<br/>[server.js]"]
node_mongodb[("MongoDB")]
node_cloudinary[("Cloudinary")]

node_student_actor -->|"uses"| node_student_app
node_student_app -->|"provides auth"| node_student_auth
node_student_app -->|"routes to"| node_student_home
node_student_app -->|"routes to"| node_item_search
node_student_app -->|"routes to"| node_item_report
node_student_app -->|"routes to"| node_my_reports
node_my_reports -->|"formats dates"| node_date_helper
node_student_auth -->|"checks login"| node_auth_service
node_item_search -->|"fetches listings"| node_user_routes
node_admin_actor -->|"uses"| node_admin_app
node_admin_app -->|"routes to"| node_admin_manage
node_admin_app -->|"routes to"| node_admin_edit
node_admin_app -->|"routes to"| node_admin_handover
node_api_server -->|"mounts"| node_auth_routes
node_api_server -->|"mounts"| node_user_routes
node_api_server -->|"mounts"| node_admin_routes
node_api_server -->|"mounts"| node_notification_routes
node_auth_routes -->|"proxies login"| node_auth_service
node_user_routes -->|"authorizes requests"| node_user_auth
node_user_auth -->|"syncs user"| node_user_model
node_user_routes -->|"reads and writes"| node_lost_model
node_user_routes -->|"reads and writes"| node_found_model
node_admin_routes -->|"accesses reports"| node_lost_model
node_admin_routes -->|"manages items"| node_found_model
node_admin_routes -->|"creates notices"| node_notification_model
node_notification_routes -->|"reads notices"| node_notification_model
node_email_dispatch -->|"loads reports"| node_lost_model
node_email_dispatch -->|"loads found items"| node_found_model
node_email_dispatch -->|"scores matches"| node_matching
node_email_dispatch -->|"processes queue"| node_email_model
node_email_dispatch -->|"creates notices"| node_notification_model
node_email_dispatch -->|"sends email"| node_mailer
node_api_server -->|"starts scheduler"| node_email_dispatch
node_api_server -->|"connects"| node_mongodb
node_admin_routes -.->|"uploads images"| node_cloudinary

click node_student_app "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/App/App.jsx"
click node_student_auth "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/contexts/AuthContext.jsx"
click node_student_home "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/components/UserHome.jsx"
click node_item_search "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/components/SearchItem.jsx"
click node_item_report "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/components/ReportItem.jsx"
click node_my_reports "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/components/MyReports.jsx"
click node_date_helper "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/utils/dateHelper.js"
click node_admin_app "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-admin/src/App.jsx"
click node_admin_manage "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-admin/src/components/ManageItems.jsx"
click node_admin_edit "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-admin/src/components/EditItem.jsx"
click node_admin_handover "https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-admin/src/components/GiveToStudent.jsx"
click node_api_server "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/server.js"
click node_auth_routes "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/routes/auth.route.js"
click node_user_routes "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/routes/user.route.js"
click node_admin_routes "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/routes/admin.route.js"
click node_notification_routes "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/routes/notification.route.js"
click node_user_auth "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/middlewares/user-auth.js"
click node_lost_model "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/LostItem.js"
click node_found_model "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/FoundItem.js"
click node_user_model "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/User.js"
click node_notification_model "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/Notification.js"
click node_email_dispatch "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/utils/emailDispatcher.js"
click node_matching "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/utils/matchingAlgorithm.js"
click node_email_model "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/EmailNotification.js"
click node_mailer "https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/utils/notifications.js"
click node_auth_service "https://github.com/vignana-jyothi/easyfind/blob/main/backend/auth-server/server.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_student_app,node_student_auth,node_student_home,node_item_search,node_item_report,node_my_reports,node_date_helper toneBlue
class node_admin_app,node_admin_manage,node_admin_edit,node_admin_handover,node_mongodb,node_cloudinary toneAmber
class node_api_server,node_auth_routes,node_user_routes,node_admin_routes,node_notification_routes,node_user_auth,node_email_dispatch,node_matching toneMint
class node_lost_model,node_found_model,node_user_model,node_notification_model,node_email_model,node_mailer toneRose
class node_student_actor,node_admin_actor toneIndigo
class node_auth_service toneTeal
```

## Components

### Student app

- [Student routes](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/App/App.jsx): `frontend/fe9-easyfind-child/src/App/App.jsx`
- [Student auth state](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/contexts/AuthContext.jsx): `frontend/fe9-easyfind-child/src/contexts/AuthContext.jsx`
- [Dashboard](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/components/UserHome.jsx): `frontend/fe9-easyfind-child/src/components/UserHome.jsx`
- [Search found items](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/components/SearchItem.jsx): `frontend/fe9-easyfind-child/src/components/SearchItem.jsx`
- [Report lost item](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/components/ReportItem.jsx): `frontend/fe9-easyfind-child/src/components/ReportItem.jsx`
- [My reports](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/components/MyReports.jsx): `frontend/fe9-easyfind-child/src/components/MyReports.jsx`
- [Date formatting](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-child/src/utils/dateHelper.js): `frontend/fe9-easyfind-child/src/utils/dateHelper.js`

### Admin app

- [Admin routes](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-admin/src/App.jsx): `frontend/fe9-easyfind-admin/src/App.jsx`
- [Manage items](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-admin/src/components/ManageItems.jsx): `frontend/fe9-easyfind-admin/src/components/ManageItems.jsx`
- [Edit found item](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-admin/src/components/EditItem.jsx): `frontend/fe9-easyfind-admin/src/components/EditItem.jsx`
- [Student handover](https://github.com/vignana-jyothi/easyfind/blob/main/frontend/fe9-easyfind-admin/src/components/GiveToStudent.jsx): `frontend/fe9-easyfind-admin/src/components/GiveToStudent.jsx`

### EasyFind backend

- [API server](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/server.js): `backend/be9-easyfind/server.js`
- [Authentication routes](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/routes/auth.route.js): `backend/be9-easyfind/routes/auth.route.js`
- [Student item routes](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/routes/user.route.js): `backend/be9-easyfind/routes/user.route.js`
- [Admin item routes](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/routes/admin.route.js): `backend/be9-easyfind/routes/admin.route.js`
- [Notification routes](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/routes/notification.route.js): `backend/be9-easyfind/routes/notification.route.js`
- [Student authorization](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/middlewares/user-auth.js): `backend/be9-easyfind/middlewares/user-auth.js`
- [Match and email dispatch](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/utils/emailDispatcher.js): `backend/be9-easyfind/utils/emailDispatcher.js`
- [Item matching](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/utils/matchingAlgorithm.js): `backend/be9-easyfind/utils/matchingAlgorithm.js`

### Data and integrations

- [Lost item records](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/LostItem.js): `backend/be9-easyfind/models/LostItem.js`
- [Found item records](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/FoundItem.js): `backend/be9-easyfind/models/FoundItem.js`
- [User records](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/User.js): `backend/be9-easyfind/models/User.js`
- [Notifications](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/Notification.js): `backend/be9-easyfind/models/Notification.js`
- [Email queue](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/models/EmailNotification.js): `backend/be9-easyfind/models/EmailNotification.js`
- [Email delivery](https://github.com/vignana-jyothi/easyfind/blob/main/backend/be9-easyfind/utils/notifications.js): `backend/be9-easyfind/utils/notifications.js`

### Other components

- **Student**
- **Administrator**
- [Google auth service](https://github.com/vignana-jyothi/easyfind/blob/main/backend/auth-server/server.js): `backend/auth-server/server.js`
- **MongoDB**
- **Cloudinary**

## Connections

- Student → Student routes: uses (evidence: `frontend/fe9-easyfind-child/src/App/App.jsx`)
- Student routes → Student auth state: provides auth (evidence: `frontend/fe9-easyfind-child/src/App/App.jsx`)
- Student routes → Dashboard: routes to (evidence: `frontend/fe9-easyfind-child/src/App/App.jsx`)
- Student routes → Search found items: routes to (evidence: `frontend/fe9-easyfind-child/src/App/App.jsx`)
- Student routes → Report lost item: routes to (evidence: `frontend/fe9-easyfind-child/src/App/App.jsx`)
- Student routes → My reports: routes to (evidence: `frontend/fe9-easyfind-child/src/App/App.jsx`)
- My reports → Date formatting: formats dates (evidence: `frontend/fe9-easyfind-child/src/components/MyReports.jsx`)
- Student auth state → Google auth service: checks login (evidence: `frontend/fe9-easyfind-child/src/contexts/AuthContext.jsx`)
- Search found items → Student item routes: fetches listings (evidence: `frontend/fe9-easyfind-child/src/components/SearchItem.jsx`)
- Administrator → Admin routes: uses (evidence: `frontend/fe9-easyfind-admin/src/App.jsx`)
- Admin routes → Manage items: routes to (evidence: `frontend/fe9-easyfind-admin/src/App.jsx`)
- Admin routes → Edit found item: routes to (evidence: `frontend/fe9-easyfind-admin/src/App.jsx`)
- Admin routes → Student handover: routes to (evidence: `frontend/fe9-easyfind-admin/src/App.jsx`)
- API server → Authentication routes: mounts (evidence: `backend/be9-easyfind/server.js`)
- API server → Student item routes: mounts (evidence: `backend/be9-easyfind/server.js`)
- API server → Admin item routes: mounts (evidence: `backend/be9-easyfind/server.js`)
- API server → Notification routes: mounts (evidence: `backend/be9-easyfind/server.js`)
- Authentication routes → Google auth service: proxies login (evidence: `backend/be9-easyfind/routes/auth.route.js`)
- Student item routes → Student authorization: authorizes requests (evidence: `backend/be9-easyfind/routes/user.route.js`)
- Student authorization → User records: syncs user (evidence: `backend/be9-easyfind/middlewares/user-auth.js`)
- Student item routes → Lost item records: reads and writes (evidence: `backend/be9-easyfind/routes/user.route.js`)
- Student item routes → Found item records: reads and writes (evidence: `backend/be9-easyfind/routes/user.route.js`)
- Admin item routes → Lost item records: accesses reports (evidence: `backend/be9-easyfind/routes/admin.route.js`)
- Admin item routes → Found item records: manages items (evidence: `backend/be9-easyfind/routes/admin.route.js`)
- Admin item routes → Notifications: creates notices (evidence: `backend/be9-easyfind/routes/admin.route.js`)
- Notification routes → Notifications: reads notices (evidence: `backend/be9-easyfind/routes/notification.route.js`)
- Match and email dispatch → Lost item records: loads reports (evidence: `backend/be9-easyfind/utils/emailDispatcher.js`)
- Match and email dispatch → Found item records: loads found items (evidence: `backend/be9-easyfind/utils/emailDispatcher.js`)
- Match and email dispatch → Item matching: scores matches (evidence: `backend/be9-easyfind/utils/emailDispatcher.js`)
- Match and email dispatch → Email queue: processes queue (evidence: `backend/be9-easyfind/utils/emailDispatcher.js`)
- Match and email dispatch → Notifications: creates notices (evidence: `backend/be9-easyfind/utils/emailDispatcher.js`)
- Match and email dispatch → Email delivery: sends email (evidence: `backend/be9-easyfind/utils/emailDispatcher.js`)
- API server → Match and email dispatch: starts scheduler (evidence: `backend/be9-easyfind/server.js`)
- API server → MongoDB: connects (evidence: `backend/be9-easyfind/server.js`)
- Admin item routes → Cloudinary: uploads images
