# xindeip-ux/itemdepot architecture

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

- Interactive diagram: https://gitdiagram.com/xindeip-ux/itemdepot
- Repository: https://github.com/xindeip-ux/itemdepot

## Overview

ItemDepot is a lost-and-found web application: users report lost or found items, browse item listings, submit claims, and review their reports; administrators review reports and claims and manage item status. The PHP page handlers combine presentation with database operations, while shared helpers provide sessions, authentication, and notifications. The README is only a project title, so capability and relationship detail comes from the supplied source index and excerpts; unsampled subsystem links are omitted where their wiring is not shown.

Main entry points: [`ITEMDEPOT2/includes/db.php`](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/db.php) (Database connection), [`ITEMDEPOT2/includes/functions.php`](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/functions.php) (Session and helpers), [`ITEMDEPOT2/user_pages/view_item.php`](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/view_item.php) (Item details), [`ITEMDEPOT2/user_pages/profile.php`](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/profile.php) (Profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_user["User workflows"]
  node_dashboard["User dashboard<br/>[dashboard.php]"]
  node_listing["Recent items<br/>[recent_items.php]"]
  node_item_detail["Item details<br/>[view_item.php]"]
  node_item_report["Report item<br/>[report_items.php]"]
  node_my_reports["My reports<br/>[my_reports.php]"]
  node_found_reports["My found reports"]
  node_profile["Profile<br/>[profile.php]"]
  node_auth_pages["Account pages"]
end

subgraph group_admin["Administration"]
  node_admin_dash["Admin dashboard<br/>[admindash.php]"]
  node_item_admin["Item management<br/>[admin_manage.php]"]
  node_claim_admin["Claim review<br/>[admin_claims.php]"]
  node_found_admin["Found report review"]
  node_admin_user["User administration<br/>[admin_manage.php]"]
end

subgraph group_services["Shared services"]
  node_auth["Session and helpers<br/>[functions.php]"]
  node_admin_helpers["Admin helpers"]
  node_user_nav["User navigation<br/>[navbar.php]"]
  node_admin_nav["Admin navigation<br/>[navbar_admin.php]"]
end

subgraph group_data["Data and actions"]
  node_db[("Database connection<br/>[db.php]")]
  node_report_action["Item submission"]
  node_claim_action["Claim submission<br/>[submit_claim.php]"]
  node_found_action["Found report submission"]
  node_detail_actions["Detail lookups"]
  node_profile_actions["Profile actions"]
end

node_visitor(("User"))
node_admin_actor(("Administrator"))

node_visitor -.->|"uses"| node_dashboard
node_admin_actor -.->|"uses"| node_admin_dash
node_item_detail -->|"queries item"| node_db
node_item_detail -->|"includes"| node_user_nav
node_item_detail -->|"requires"| node_auth
node_item_detail -->|"links back"| node_listing
node_item_report -.->|"submits to"| node_report_action
node_report_action -->|"inserts item"| node_db
node_report_action -->|"checks login"| node_auth
node_found_reports -->|"queries reports"| node_db
node_found_reports -->|"requires"| node_auth
node_claim_action -->|"writes claim"| node_db
node_found_action -->|"writes report"| node_db
node_claim_admin -->|"queries claims"| node_db
node_claim_admin -->|"includes"| node_admin_nav
node_found_admin -->|"updates reports"| node_db
node_found_admin -->|"uses helpers"| node_auth
node_found_admin -->|"includes"| node_admin_nav
node_item_admin -->|"manages items"| node_db
node_item_admin -->|"sends notices"| node_auth
node_item_admin -->|"includes"| node_admin_nav
node_admin_dash -->|"uses"| node_admin_helpers
node_admin_dash -->|"queries"| node_db
node_admin_helpers -->|"queries"| node_db
node_profile -->|"requires"| node_auth
node_profile -->|"loads profile"| node_db
node_profile -->|"includes"| node_user_nav

click node_dashboard "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/dashboard.php"
click node_listing "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/recent_items.php"
click node_item_detail "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/view_item.php"
click node_item_report "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/report_items.php"
click node_my_reports "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/my_reports.php"
click node_found_reports "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/my_found_reports.php"
click node_profile "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/profile.php"
click node_auth_pages "https://github.com/xindeip-ux/itemdepot/tree/main/ITEMDEPOT2/user_pages"
click node_admin_dash "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admindash.php"
click node_item_admin "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admin_manage.php"
click node_claim_admin "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admin_claims.php"
click node_found_admin "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admin_found_reports.php"
click node_admin_user "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admin_manage.php"
click node_auth "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/functions.php"
click node_admin_helpers "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/admin_functions.php"
click node_user_nav "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/navbar.php"
click node_admin_nav "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/navbar_admin.php"
click node_db "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/db.php"
click node_report_action "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/process/report_item_process.php"
click node_claim_action "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/process/submit_claim.php"
click node_found_action "https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/process/submit_found_report.php"
click node_detail_actions "https://github.com/xindeip-ux/itemdepot/tree/main/ITEMDEPOT2/process"
click node_profile_actions "https://github.com/xindeip-ux/itemdepot/tree/main/ITEMDEPOT2/process"

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_dashboard,node_listing,node_item_detail,node_item_report,node_my_reports,node_found_reports,node_profile,node_auth_pages,node_visitor toneBlue
class node_admin_dash,node_item_admin,node_claim_admin,node_found_admin,node_admin_user toneAmber
class node_auth,node_admin_helpers,node_user_nav,node_admin_nav toneMint
class node_db,node_report_action,node_claim_action,node_found_action,node_detail_actions,node_profile_actions toneRose
class node_admin_actor toneIndigo
```

## Components

### User workflows

- [User dashboard](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/dashboard.php): `ITEMDEPOT2/user_pages/dashboard.php`
- [Recent items](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/recent_items.php): `ITEMDEPOT2/user_pages/recent_items.php`
- [Item details](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/view_item.php): `ITEMDEPOT2/user_pages/view_item.php`
- [Report item](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/report_items.php): `ITEMDEPOT2/user_pages/report_items.php`
- [My reports](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/my_reports.php): `ITEMDEPOT2/user_pages/my_reports.php`
- [My found reports](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/my_found_reports.php): `ITEMDEPOT2/user_pages/my_found_reports.php`
- [Profile](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/user_pages/profile.php): `ITEMDEPOT2/user_pages/profile.php`
- [Account pages](https://github.com/xindeip-ux/itemdepot/tree/main/ITEMDEPOT2/user_pages): `ITEMDEPOT2/user_pages`

### Administration

- [Admin dashboard](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admindash.php): `ITEMDEPOT2/admin_pages/admindash.php`
- [Item management](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admin_manage.php): `ITEMDEPOT2/admin_pages/admin_manage.php`
- [Claim review](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admin_claims.php): `ITEMDEPOT2/admin_pages/admin_claims.php`
- [Found report review](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admin_found_reports.php): `ITEMDEPOT2/admin_pages/admin_found_reports.php`
- [User administration](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/admin_pages/admin_manage.php): `ITEMDEPOT2/admin_pages/admin_manage.php`

### Shared services

- [Session and helpers](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/functions.php): `ITEMDEPOT2/includes/functions.php`
- [Admin helpers](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/admin_functions.php): `ITEMDEPOT2/includes/admin_functions.php`
- [User navigation](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/navbar.php): `ITEMDEPOT2/includes/navbar.php`
- [Admin navigation](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/navbar_admin.php): `ITEMDEPOT2/includes/navbar_admin.php`

### Data and actions

- [Database connection](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/includes/db.php): `ITEMDEPOT2/includes/db.php`
- [Item submission](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/process/report_item_process.php): `ITEMDEPOT2/process/report_item_process.php`
- [Claim submission](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/process/submit_claim.php): `ITEMDEPOT2/process/submit_claim.php`
- [Found report submission](https://github.com/xindeip-ux/itemdepot/blob/main/ITEMDEPOT2/process/submit_found_report.php): `ITEMDEPOT2/process/submit_found_report.php`
- [Detail lookups](https://github.com/xindeip-ux/itemdepot/tree/main/ITEMDEPOT2/process): `ITEMDEPOT2/process`
- [Profile actions](https://github.com/xindeip-ux/itemdepot/tree/main/ITEMDEPOT2/process): `ITEMDEPOT2/process`

### Other components

- **User**
- **Administrator**

## Connections

- User → User dashboard: uses
- Administrator → Admin dashboard: uses
- Item details → Database connection: queries item (evidence: `ITEMDEPOT2/user_pages/view_item.php`)
- Item details → User navigation: includes (evidence: `ITEMDEPOT2/user_pages/view_item.php`)
- Item details → Session and helpers: requires (evidence: `ITEMDEPOT2/user_pages/view_item.php`)
- Item details → Recent items: links back (evidence: `ITEMDEPOT2/user_pages/view_item.php`)
- Report item → Item submission: submits to
- Item submission → Database connection: inserts item (evidence: `ITEMDEPOT2/process/report_item_process.php`)
- Item submission → Session and helpers: checks login (evidence: `ITEMDEPOT2/process/report_item_process.php`)
- My found reports → Database connection: queries reports (evidence: `ITEMDEPOT2/user_pages/my_found_reports.php`)
- My found reports → Session and helpers: requires (evidence: `ITEMDEPOT2/user_pages/my_found_reports.php`)
- Claim submission → Database connection: writes claim (evidence: `ITEMDEPOT2/process/submit_claim.php`)
- Found report submission → Database connection: writes report (evidence: `ITEMDEPOT2/process/submit_found_report.php`)
- Claim review → Database connection: queries claims (evidence: `ITEMDEPOT2/admin_pages/admin_claims.php`)
- Claim review → Admin navigation: includes (evidence: `ITEMDEPOT2/admin_pages/admin_claims.php`)
- Found report review → Database connection: updates reports (evidence: `ITEMDEPOT2/admin_pages/admin_found_reports.php`)
- Found report review → Session and helpers: uses helpers (evidence: `ITEMDEPOT2/admin_pages/admin_found_reports.php`)
- Found report review → Admin navigation: includes (evidence: `ITEMDEPOT2/admin_pages/admin_found_reports.php`)
- Item management → Database connection: manages items (evidence: `ITEMDEPOT2/admin_pages/admin_manage.php`)
- Item management → Session and helpers: sends notices (evidence: `ITEMDEPOT2/admin_pages/admin_manage.php`)
- Item management → Admin navigation: includes (evidence: `ITEMDEPOT2/admin_pages/admin_manage.php`)
- Admin dashboard → Admin helpers: uses (evidence: `ITEMDEPOT2/admin_pages/admindash.php`)
- Admin dashboard → Database connection: queries (evidence: `ITEMDEPOT2/admin_pages/admindash.php`)
- Admin helpers → Database connection: queries (evidence: `ITEMDEPOT2/includes/admin_functions.php`)
- Profile → Session and helpers: requires (evidence: `ITEMDEPOT2/user_pages/profile.php`)
- Profile → Database connection: loads profile (evidence: `ITEMDEPOT2/user_pages/profile.php`)
- Profile → User navigation: includes (evidence: `ITEMDEPOT2/user_pages/profile.php`)
