# gaganmanku96/finding-missing-person-using-ai architecture

> Architecture diagram of the GitHub repository gaganmanku96/finding-missing-person-using-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gaganmanku96/finding-missing-person-using-ai
- Repository: https://github.com/gaganmanku96/finding-missing-person-using-ai

## Overview

This is a Streamlit missing-person identification system with authenticated officer/admin workflows and a public sighting portal. A case flows from registration or public submission through MediaPipe landmark extraction, SQLite persistence, and admin-triggered KNN comparison. Successful matches update both records and optionally notify complainants by SMTP. The dashboard and map summarize case status by city. The graph reflects documented behavior and sampled source; some page wiring and unsampled model details are necessarily omitted.

Main entry points: [`pages/helper/db_queries.py`](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/db_queries.py) (SQLite Store), [`pages/3_Match Cases.py`](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/3_Match%20Cases.py) (Match Cases), [`Home.py`](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/Home.py) (Auth Dashboard), [`mobile_app.py`](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/mobile_app.py) (Public Submission)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access_ui["Access &amp; UI"]
  node_auth_dashboard["Auth Dashboard<br/>[Home.py]"]
  node_case_management["Case Management<br/>[2_All Cases.py]"]
  node_map_view["City Map<br/>[5_Map.py]"]
  node_credentials["Login Credentials<br/>[login_config.yml]"]
end

subgraph group_case_intake["Case Intake"]
  node_case_registration["Case Registration"]
  node_public_submission["Public Submission<br/>[mobile_app.py]"]
  node_face_processing["Face Processing<br/>[utils.py]"]
end

subgraph group_matching["Matching Engine"]
  node_model_training["Model Training<br/>[train_model.py]"]
  node_case_matching["Case Matching<br/>[match_algo.py]"]
  node_match_page["Match Cases<br/>[3_Match Cases.py]"]
end

subgraph group_storage["Storage"]
  node_case_records[("Case Records<br/>[data_models.py]")]
  node_sqlite_store[("SQLite Store<br/>[db_queries.py]")]
  node_image_store[("Image Store")]
end

subgraph group_outcomes["Outcomes"]
  node_email_notifications["Email Notifications<br/>[emailer.py]"]
  node_status_updates["Status Updates<br/>[db_queries.py]"]
end

node_officer_admin(("Officer / Admin"))
node_public_submitter(("Public Submitter"))
node_smtp_service(("SMTP Service"))

node_officer_admin -->|"opens portal"| node_auth_dashboard
node_public_submitter -->|"submits sighting"| node_public_submission
node_auth_dashboard -->|"reads credentials"| node_credentials
node_auth_dashboard -->|"reads counts"| node_sqlite_store
node_auth_dashboard -->|"shows dashboard"| node_map_view
node_case_registration -->|"extracts faces"| node_face_processing
node_case_registration -->|"writes image"| node_image_store
node_case_registration -->|"creates case"| node_case_records
node_public_submission -->|"extracts faces"| node_face_processing
node_public_submission -->|"writes image"| node_image_store
node_public_submission -->|"creates sighting"| node_case_records
node_case_records -->|"persists records"| node_sqlite_store
node_model_training -->|"reads training data"| node_sqlite_store
node_match_page -->|"trains model"| node_model_training
node_match_page -->|"runs matching"| node_case_matching
node_case_matching -->|"reads face data"| node_sqlite_store
node_match_page -->|"updates matches"| node_status_updates
node_status_updates -->|"writes statuses"| node_sqlite_store
node_match_page -->|"sends alerts"| node_email_notifications
node_case_management -->|"reads cases"| node_sqlite_store
node_case_management -->|"sends notifications"| node_email_notifications
node_email_notifications -.->|"delivers email"| node_smtp_service
node_map_view -->|"reads city counts"| node_sqlite_store

click node_auth_dashboard "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/Home.py"
click node_case_management "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/2_All%20Cases.py"
click node_map_view "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/5_Map.py"
click node_case_registration "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/1_Register%20New%20Case.py"
click node_public_submission "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/mobile_app.py"
click node_face_processing "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/utils.py"
click node_case_records "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/data_models.py"
click node_sqlite_store "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/db_queries.py"
click node_image_store "https://github.com/gaganmanku96/finding-missing-person-using-ai/tree/master/resources"
click node_model_training "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/train_model.py"
click node_case_matching "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/match_algo.py"
click node_match_page "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/3_Match%20Cases.py"
click node_email_notifications "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/emailer.py"
click node_status_updates "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/db_queries.py"
click node_credentials "https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/login_config.yml"

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_dashboard,node_case_management,node_map_view,node_credentials toneBlue
class node_case_registration,node_public_submission,node_face_processing toneAmber
class node_model_training,node_case_matching,node_match_page toneMint
class node_case_records,node_sqlite_store,node_image_store toneRose
class node_email_notifications,node_status_updates,node_officer_admin,node_public_submitter,node_smtp_service toneIndigo
```

## Components

### Access & UI

- [Auth Dashboard](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/Home.py): `Home.py`
- [Case Management](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/2_All%20Cases.py): `pages/2_All Cases.py`
- [City Map](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/5_Map.py): `pages/5_Map.py`
- [Login Credentials](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/login_config.yml): `login_config.yml`

### Case Intake

- [Case Registration](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/1_Register%20New%20Case.py): `pages/1_Register New Case.py`
- [Public Submission](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/mobile_app.py): `mobile_app.py`
- [Face Processing](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/utils.py): `pages/helper/utils.py`

### Matching Engine

- [Model Training](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/train_model.py): `pages/helper/train_model.py`
- [Case Matching](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/match_algo.py): `pages/helper/match_algo.py`
- [Match Cases](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/3_Match%20Cases.py): `pages/3_Match Cases.py`

### Storage

- [Case Records](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/data_models.py): `pages/helper/data_models.py`
- [SQLite Store](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/db_queries.py): `pages/helper/db_queries.py`
- [Image Store](https://github.com/gaganmanku96/finding-missing-person-using-ai/tree/master/resources): `resources`

### Outcomes

- [Email Notifications](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/emailer.py): `pages/helper/emailer.py`
- [Status Updates](https://github.com/gaganmanku96/finding-missing-person-using-ai/blob/master/pages/helper/db_queries.py): `pages/helper/db_queries.py`

### Other components

- **Officer / Admin**
- **Public Submitter**
- **SMTP Service**

## Connections

- Officer / Admin → Auth Dashboard: opens portal
- Public Submitter → Public Submission: submits sighting
- Auth Dashboard → Login Credentials: reads credentials
- Auth Dashboard → SQLite Store: reads counts
- Auth Dashboard → City Map: shows dashboard
- Case Registration → Face Processing: extracts faces
- Case Registration → Image Store: writes image
- Case Registration → Case Records: creates case
- Public Submission → Face Processing: extracts faces
- Public Submission → Image Store: writes image
- Public Submission → Case Records: creates sighting
- Case Records → SQLite Store: persists records
- Model Training → SQLite Store: reads training data
- Match Cases → Model Training: trains model
- Match Cases → Case Matching: runs matching
- Case Matching → SQLite Store: reads face data
- Match Cases → Status Updates: updates matches
- Status Updates → SQLite Store: writes statuses
- Match Cases → Email Notifications: sends alerts
- Case Management → SQLite Store: reads cases
- Case Management → Email Notifications: sends notifications
- Email Notifications → SMTP Service: delivers email
- City Map → SQLite Store: reads city counts
