# sparsh88/lost-and-found-campus architecture

> Architecture diagram of the GitHub repository sparsh88/lost-and-found-campus, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sparsh88/lost-and-found-campus
- Repository: https://github.com/sparsh88/lost-and-found-campus

## Overview

Campus Lost & Found is a Next.js campus reporting and recovery application. Students and staff browse or report lost and found belongings; found-item records can be searched, viewed, edited, and administered through status and deletion controls, while the documented claims and verification module is marked in progress. Lost records use browser localStorage; found records use an in-memory store initialized from sample data. The README describes MongoDB as integration-ready, but the sampled code does not show it backing these workflows. Claims and some page behavior are documented but not fully evidenced by sampled calls.

Main entry points: [`src/components/Navbar.jsx`](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/Navbar.jsx) (Navigation and auth), [`src/modules/found/store.js`](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/modules/found/store.js) (Found item store), [`src/app/found/page.js`](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/found/page.js) (Found listings), [`src/app/dashboard/page.js`](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/dashboard/page.js) (Admin dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and navigation"]
  node_home["Home page<br/>[page.js]"]
  node_shell["Shared layout<br/>[layout.js]"]
  node_nav["Navigation and auth<br/>[Navbar.jsx]"]
  node_footer["Footer links<br/>[Footer.jsx]"]
  node_login["Login page<br/>[page.js]"]
end

subgraph group_lost["Lost item service"]
  node_lost_list["Lost listings<br/>[page.js]"]
  node_lost_forms["Lost reporting<br/>[page.js]"]
  node_lost_detail["Lost details<br/>[page.js]"]
  node_lost_logic["Lost item logic<br/>[index.js]"]
end

subgraph group_found["Found item service"]
  node_found_list["Found listings<br/>[page.js]"]
  node_found_forms["Found reporting and editing<br/>[page.js]"]
  node_found_detail["Found details<br/>[page.js]"]
  node_found_store["Found item store<br/>[store.js]"]
  node_found_data["Found data and categories<br/>[data.js]"]
  node_found_card["Found item card<br/>[FoundItemCard.jsx]"]
  node_status_badge["Status badge<br/>[StatusBadge.jsx]"]
  node_category_badge["Category badge<br/>[CategoryBadge.jsx]"]
end

subgraph group_recovery["Claims and administration"]
  node_claims_page["Claims and verification<br/>[page.js]"]
  node_claims_logic["Claims module logic<br/>[index.js]"]
  node_dashboard["Admin dashboard<br/>[page.js]"]
end

node_visitor(("Campus user"))

node_visitor -.->|"opens"| node_home
node_shell -->|"renders"| node_nav
node_shell -->|"renders"| node_footer
node_nav -->|"links to"| node_home
node_nav -->|"links to"| node_lost_list
node_nav -->|"links to"| node_found_list
node_nav -->|"links to"| node_claims_page
node_nav -->|"links to"| node_login
node_nav -->|"admin link"| node_dashboard
node_lost_list -->|"reads items"| node_lost_logic
node_lost_forms -->|"uses item logic"| node_lost_logic
node_lost_detail -->|"reads details"| node_lost_logic
node_found_list -->|"reads items"| node_found_store
node_found_list -->|"reads categories"| node_found_data
node_found_list -->|"renders cards"| node_found_card
node_found_card -->|"renders"| node_status_badge
node_found_card -->|"renders"| node_category_badge
node_found_store -->|"initializes from"| node_found_data
node_found_forms -->|"writes items"| node_found_store
node_found_detail -->|"reads details"| node_found_store
node_dashboard -->|"manages records"| node_found_store
node_dashboard -->|"renders"| node_status_badge
node_dashboard -->|"renders"| node_category_badge
node_claims_page -.->|"implements module"| node_claims_logic

click node_home "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/page.js"
click node_shell "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/layout.js"
click node_nav "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/Navbar.jsx"
click node_footer "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/Footer.jsx"
click node_login "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/login/page.js"
click node_lost_list "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/lost/page.js"
click node_lost_forms "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/lost/add/page.js"
click node_lost_detail "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/lost/%5Bid%5D/page.js"
click node_lost_logic "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/modules/lost/index.js"
click node_found_list "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/found/page.js"
click node_found_forms "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/found/add/page.js"
click node_found_detail "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/found/%5Bid%5D/page.js"
click node_found_store "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/modules/found/store.js"
click node_found_data "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/modules/found/data.js"
click node_found_card "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/ui/FoundItemCard.jsx"
click node_status_badge "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/ui/StatusBadge.jsx"
click node_category_badge "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/ui/CategoryBadge.jsx"
click node_claims_page "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/claims/page.js"
click node_claims_logic "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/modules/claims/index.js"
click node_dashboard "https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/dashboard/page.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_home,node_shell,node_nav,node_footer,node_login,node_visitor toneBlue
class node_lost_list,node_lost_forms,node_lost_detail,node_lost_logic toneAmber
class node_found_list,node_found_forms,node_found_detail,node_found_store,node_found_data,node_found_card,node_status_badge,node_category_badge toneMint
class node_claims_page,node_claims_logic,node_dashboard toneRose
```

## Components

### App entry and navigation

- [Home page](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/page.js): `src/app/page.js`
- [Shared layout](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/layout.js): `src/app/layout.js`
- [Navigation and auth](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Footer links](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`
- [Login page](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/login/page.js): `src/app/login/page.js`

### Lost item service

- [Lost listings](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/lost/page.js): `src/app/lost/page.js`
- [Lost reporting](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/lost/add/page.js): `src/app/lost/add/page.js`
- [Lost details](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/lost/%5Bid%5D/page.js): `src/app/lost/[id]/page.js`
- [Lost item logic](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/modules/lost/index.js): `src/modules/lost/index.js`

### Found item service

- [Found listings](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/found/page.js): `src/app/found/page.js`
- [Found reporting and editing](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/found/add/page.js): `src/app/found/add/page.js`
- [Found details](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/found/%5Bid%5D/page.js): `src/app/found/[id]/page.js`
- [Found item store](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/modules/found/store.js): `src/modules/found/store.js`
- [Found data and categories](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/modules/found/data.js): `src/modules/found/data.js`
- [Found item card](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/ui/FoundItemCard.jsx): `src/components/ui/FoundItemCard.jsx`
- [Status badge](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/ui/StatusBadge.jsx): `src/components/ui/StatusBadge.jsx`
- [Category badge](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/components/ui/CategoryBadge.jsx): `src/components/ui/CategoryBadge.jsx`

### Claims and administration

- [Claims and verification](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/claims/page.js): `src/app/claims/page.js`
- [Claims module logic](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/modules/claims/index.js): `src/modules/claims/index.js`
- [Admin dashboard](https://github.com/sparsh88/lost-and-found-campus/blob/main/src/app/dashboard/page.js): `src/app/dashboard/page.js`

### Other components

- **Campus user**

## Connections

- Campus user → Home page: opens
- Shared layout → Navigation and auth: renders (evidence: `src/app/layout.js`)
- Shared layout → Footer links: renders (evidence: `src/app/layout.js`)
- Navigation and auth → Home page: links to (evidence: `src/components/Navbar.jsx`)
- Navigation and auth → Lost listings: links to (evidence: `src/components/Navbar.jsx`)
- Navigation and auth → Found listings: links to (evidence: `src/components/Navbar.jsx`)
- Navigation and auth → Claims and verification: links to (evidence: `src/components/Navbar.jsx`)
- Navigation and auth → Login page: links to (evidence: `src/components/Navbar.jsx`)
- Navigation and auth → Admin dashboard: admin link (evidence: `src/components/Navbar.jsx`)
- Lost listings → Lost item logic: reads items (evidence: `src/app/lost/page.js`)
- Lost reporting → Lost item logic: uses item logic (evidence: `src/app/lost/add/page.js`)
- Lost details → Lost item logic: reads details (evidence: `src/app/lost/[id]/page.js`)
- Found listings → Found item store: reads items (evidence: `src/app/found/page.js`)
- Found listings → Found data and categories: reads categories (evidence: `src/app/found/page.js`)
- Found listings → Found item card: renders cards (evidence: `src/app/found/page.js`)
- Found item card → Status badge: renders (evidence: `src/components/ui/FoundItemCard.jsx`)
- Found item card → Category badge: renders (evidence: `src/components/ui/FoundItemCard.jsx`)
- Found item store → Found data and categories: initializes from (evidence: `src/modules/found/store.js`)
- Found reporting and editing → Found item store: writes items (evidence: `src/app/found/add/page.js`)
- Found details → Found item store: reads details (evidence: `src/app/found/[id]/page.js`)
- Admin dashboard → Found item store: manages records (evidence: `src/app/dashboard/page.js`)
- Admin dashboard → Status badge: renders (evidence: `src/app/dashboard/page.js`)
- Admin dashboard → Category badge: renders (evidence: `src/app/dashboard/page.js`)
- Claims and verification → Claims module logic: implements module
