# prince-c11/lost-found-management architecture

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

- Interactive diagram: https://gitdiagram.com/prince-c11/lost-found-management
- Repository: https://github.com/prince-c11/lost-found-management

## Overview

This is a Flask college lost-and-found application. Users register and verify an account, then log in to report lost or found items, browse and filter listings, and manage their profiles; password recovery is a separate OTP flow. The route logic is concentrated in app.py, with SQLAlchemy entities in models.py and server-rendered templates. The README also describes email verification and recovery. Source excerpts are partial, so uncertain route-to-model wiring and the implementation of notifications or claims are not represented.

Main entry points: [`Lost-Found Management/app.py`](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py) (Flask routes), [`Lost-Found Management/models.py`](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/models.py) (ORM models), [`Lost-Found Management/static/images`](https://github.com/prince-c11/lost-found-management/tree/main/Lost-Found%20Management/static/images) (Image files), [`Lost-Found Management/instance/site.db`](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/instance/site.db) (Application database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Accounts and access"]
  node_auth["Registration and login<br/>[app.py]"]
  node_verification["OTP verification<br/>[app.py]"]
  node_recovery["Password recovery<br/>[app.py]"]
  node_sessions["Login sessions<br/>[app.py]"]
  node_profile["Profile management<br/>[app.py]"]
end

subgraph group_items["Lost and found"]
  node_listing["Item listings<br/>[app.py]"]
  node_item_changes["Item management<br/>[app.py]"]
  node_uploads["Image files"]
end

subgraph group_runtime["Application runtime"]
  node_routes["Flask routes<br/>[app.py]"]
  node_views["HTML views"]
  node_models["ORM models<br/>[models.py]"]
  node_database[("Application database<br/>[site.db]")]
  node_schema["SQL schema<br/>[dbs.sql]"]
end

node_user(("College user"))
node_mail["Email service"]
node_browser(("Web browser"))

node_user -->|"uses"| node_browser
node_browser -->|"submits requests"| node_routes
node_routes -->|"dispatches"| node_auth
node_routes -->|"dispatches"| node_listing
node_routes -->|"dispatches"| node_item_changes
node_routes -->|"dispatches"| node_profile
node_auth -->|"starts verification"| node_verification
node_auth -->|"logs in"| node_sessions
node_auth -->|"queries users"| node_models
node_verification -->|"creates user"| node_models
node_verification -->|"sends OTP"| node_mail
node_recovery -->|"stores reset token"| node_models
node_recovery -->|"sends OTP"| node_mail
node_routes -->|"dispatches"| node_recovery
node_listing -->|"queries items"| node_models
node_item_changes -->|"writes items"| node_models
node_item_changes -->|"saves images"| node_uploads
node_profile -->|"updates user"| node_models
node_profile -->|"saves image"| node_uploads
node_models -->|"persists records"| node_database
node_routes -->|"renders pages"| node_views
node_schema -.->|"describes schema"| node_database

click node_routes "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py"
click node_auth "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py"
click node_verification "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py"
click node_recovery "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py"
click node_sessions "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py"
click node_listing "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py"
click node_item_changes "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py"
click node_profile "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py"
click node_views "https://github.com/prince-c11/lost-found-management/tree/main/Lost-Found%20Management/templates"
click node_models "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/models.py"
click node_database "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/instance/site.db"
click node_schema "https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/dbs.sql"
click node_uploads "https://github.com/prince-c11/lost-found-management/tree/main/Lost-Found%20Management/static/images"

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_auth,node_verification,node_recovery,node_sessions,node_profile,node_user,node_browser toneBlue
class node_listing,node_item_changes,node_uploads toneAmber
class node_routes,node_views,node_models,node_database,node_schema toneMint
class node_mail toneIndigo
```

## Components

### Accounts and access

- [Registration and login](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py): `Lost-Found Management/app.py`
- [OTP verification](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py): `Lost-Found Management/app.py`
- [Password recovery](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py): `Lost-Found Management/app.py`
- [Login sessions](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py): `Lost-Found Management/app.py`
- [Profile management](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py): `Lost-Found Management/app.py`

### Lost and found

- [Item listings](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py): `Lost-Found Management/app.py`
- [Item management](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py): `Lost-Found Management/app.py`
- [Image files](https://github.com/prince-c11/lost-found-management/tree/main/Lost-Found%20Management/static/images): `Lost-Found Management/static/images`

### Application runtime

- [Flask routes](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/app.py): `Lost-Found Management/app.py`
- [HTML views](https://github.com/prince-c11/lost-found-management/tree/main/Lost-Found%20Management/templates): `Lost-Found Management/templates`
- [ORM models](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/models.py): `Lost-Found Management/models.py`
- [Application database](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/instance/site.db): `Lost-Found Management/instance/site.db`
- [SQL schema](https://github.com/prince-c11/lost-found-management/blob/main/Lost-Found%20Management/dbs.sql): `Lost-Found Management/dbs.sql`

### Other components

- **College user**
- **Email service**
- **Web browser**

## Connections

- College user → Web browser: uses
- Web browser → Flask routes: submits requests
- Flask routes → Registration and login: dispatches
- Flask routes → Item listings: dispatches
- Flask routes → Item management: dispatches
- Flask routes → Profile management: dispatches
- Registration and login → OTP verification: starts verification
- Registration and login → Login sessions: logs in
- Registration and login → ORM models: queries users
- OTP verification → ORM models: creates user
- OTP verification → Email service: sends OTP
- Password recovery → ORM models: stores reset token
- Password recovery → Email service: sends OTP
- Flask routes → Password recovery: dispatches
- Item listings → ORM models: queries items
- Item management → ORM models: writes items
- Item management → Image files: saves images
- Profile management → ORM models: updates user
- Profile management → Image files: saves image
- ORM models → Application database: persists records
- Flask routes → HTML views: renders pages
- SQL schema → Application database: describes schema
