# lomocsojaymar-cmyk/lost-and-found-system architecture

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

- Interactive diagram: https://gitdiagram.com/lomocsojaymar-cmyk/lost-and-found-system
- Repository: https://github.com/lomocsojaymar-cmyk/lost-and-found-system

## Overview

Lost & Found is a multi-client campus reporting and recovery product: mobile users and administrators report and manage lost/found items, review matches, and coordinate claims and handovers. A shared Express API serves the web and mobile apps, with Supabase-backed data and a separate Python service for matching and forecasting. The README documents the main capabilities; some route and screen implementations were not sampled, so those subsystems are represented at their existing directory paths without speculative internal call chains.

Main entry points: [`server/app.js`](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/server/app.js) (Express API), [`mobile/App.js`](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/mobile/App.js) (Mobile app), [`ai-server/main.py`](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/main.py) (Matching inference), [`ai-server/analytics/routes.py`](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/analytics/routes.py) (Forecast endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User applications"]
  node_mobile_app["Mobile app<br/>[App.js]"]
  node_mobile_navigation["Mobile workflows<br/>[AppNavigator.js]"]
  node_web_app["Admin dashboard<br/>[App.jsx]"]
  node_web_api["Web API client<br/>[api.js]"]
end

subgraph group_api["Campus API"]
  node_express["Express API<br/>[app.js]"]
  node_auth_routes["Authentication<br/>[auth.js]"]
  node_communication_routes["Messages and alerts"]
  node_admin_routes["Admin operations"]
end

subgraph group_recovery["Matching and recovery"]
  node_report_routes["Lost and found reports"]
  node_claim_routes["Claims and handovers"]
  node_matching_routes["Matching workflows<br/>[ai.js]"]
end

subgraph group_insights["AI and analytics"]
  node_ai_client["AI service client<br/>[aiClient.js]"]
  node_ai_service["Matching inference<br/>[main.py]"]
  node_comparison["Model comparison"]
  node_forecast_routes["Forecast endpoints<br/>[routes.py]"]
  node_forecast_engine["Forecasting<br/>[forecasting.py]"]
  node_category_forecast["Category forecasts"]
end

subgraph group_state["Data and services"]
  node_supabase[("Supabase data store")]
  node_storage[("Supabase image storage")]
end

node_mobile_user(("Mobile user"))
node_admin_user(("Administrator"))

node_mobile_user -->|"uses"| node_mobile_app
node_mobile_app -->|"hosts workflows"| node_mobile_navigation
node_admin_user -->|"uses"| node_web_app
node_web_app -.->|"requests data"| node_web_api
node_web_api -.->|"calls API"| node_express
node_mobile_app -->|"uses shared API"| node_express
node_express -->|"registers"| node_auth_routes
node_express -->|"registers"| node_report_routes
node_express -->|"registers"| node_claim_routes
node_express -->|"registers"| node_matching_routes
node_express -->|"registers"| node_communication_routes
node_express -->|"registers"| node_admin_routes
node_matching_routes -->|"uses"| node_ai_client
node_ai_client -->|"requests inference"| node_ai_service
node_ai_service -->|"mounts comparison"| node_comparison
node_ai_service -.->|"serves analytics"| node_forecast_routes
node_forecast_routes -->|"generates forecasts"| node_forecast_engine
node_forecast_routes -->|"generates category forecasts"| node_category_forecast
node_express -.->|"stores application data"| node_supabase
node_report_routes -.->|"stores report photos"| node_storage

click node_mobile_app "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/mobile/App.js"
click node_mobile_navigation "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/mobile/src/navigation/AppNavigator.js"
click node_web_app "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/web/src/App.jsx"
click node_web_api "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/web/src/services/api.js"
click node_express "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/server/app.js"
click node_auth_routes "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/server/routes/auth.js"
click node_report_routes "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/tree/main/server/routes"
click node_claim_routes "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/tree/main/server/routes"
click node_matching_routes "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/server/routes/ai.js"
click node_communication_routes "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/tree/main/server/routes"
click node_admin_routes "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/tree/main/server/routes"
click node_ai_client "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/server/services/aiClient.js"
click node_ai_service "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/main.py"
click node_comparison "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/model_comparison.py"
click node_forecast_routes "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/analytics/routes.py"
click node_forecast_engine "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/analytics/forecasting.py"
click node_category_forecast "https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/analytics/category_forecasting.py"

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_mobile_app,node_mobile_navigation,node_web_app,node_web_api,node_mobile_user toneBlue
class node_express,node_auth_routes,node_communication_routes,node_admin_routes toneAmber
class node_report_routes,node_claim_routes,node_matching_routes toneMint
class node_ai_client,node_ai_service,node_comparison,node_forecast_routes,node_forecast_engine,node_category_forecast toneRose
class node_supabase,node_storage,node_admin_user toneIndigo
```

## Components

### User applications

- [Mobile app](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/mobile/App.js): `mobile/App.js`
- [Mobile workflows](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/mobile/src/navigation/AppNavigator.js): `mobile/src/navigation/AppNavigator.js`
- [Admin dashboard](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/web/src/App.jsx): `web/src/App.jsx`
- [Web API client](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/web/src/services/api.js): `web/src/services/api.js`

### Campus API

- [Express API](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/server/app.js): `server/app.js`
- [Authentication](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/server/routes/auth.js): `server/routes/auth.js`
- [Messages and alerts](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/tree/main/server/routes): `server/routes`
- [Admin operations](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/tree/main/server/routes): `server/routes`

### Matching and recovery

- [Lost and found reports](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/tree/main/server/routes): `server/routes`
- [Claims and handovers](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/tree/main/server/routes): `server/routes`
- [Matching workflows](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/server/routes/ai.js): `server/routes/ai.js`

### AI and analytics

- [AI service client](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/server/services/aiClient.js): `server/services/aiClient.js`
- [Matching inference](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/main.py): `ai-server/main.py`
- [Model comparison](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/model_comparison.py): `ai-server/model_comparison.py`
- [Forecast endpoints](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/analytics/routes.py): `ai-server/analytics/routes.py`
- [Forecasting](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/analytics/forecasting.py): `ai-server/analytics/forecasting.py`
- [Category forecasts](https://github.com/lomocsojaymar-cmyk/lost-and-found-system/blob/main/ai-server/analytics/category_forecasting.py): `ai-server/analytics/category_forecasting.py`

### Data and services

- **Supabase data store**
- **Supabase image storage**

### Other components

- **Mobile user**
- **Administrator**

## Connections

- Mobile user → Mobile app: uses (evidence: `README.md`)
- Mobile app → Mobile workflows: hosts workflows (evidence: `mobile/App.js`)
- Administrator → Admin dashboard: uses (evidence: `README.md`)
- Admin dashboard → Web API client: requests data
- Web API client → Express API: calls API
- Mobile app → Express API: uses shared API (evidence: `README.md`)
- Express API → Authentication: registers (evidence: `server/app.js`)
- Express API → Lost and found reports: registers (evidence: `server/app.js`)
- Express API → Claims and handovers: registers (evidence: `server/app.js`)
- Express API → Matching workflows: registers (evidence: `server/app.js`)
- Express API → Messages and alerts: registers (evidence: `server/app.js`)
- Express API → Admin operations: registers (evidence: `server/app.js`)
- Matching workflows → AI service client: uses (evidence: `server/routes/ai.js`)
- AI service client → Matching inference: requests inference (evidence: `README.md`)
- Matching inference → Model comparison: mounts comparison (evidence: `ai-server/main.py`)
- Matching inference → Forecast endpoints: serves analytics (evidence: `ai-server/main.py`)
- Forecast endpoints → Forecasting: generates forecasts (evidence: `ai-server/analytics/routes.py`)
- Forecast endpoints → Category forecasts: generates category forecasts (evidence: `ai-server/analytics/routes.py`)
- Express API → Supabase data store: stores application data
- Lost and found reports → Supabase image storage: stores report photos
