# shreegowda15/lost-and-found-system architecture

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

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

## Overview

This is a Java Swing/MySQL campus lost-and-found application, with a parallel console interface. The main user workflow is to report lost or found items, search or browse records, and claim an item; both interfaces access MySQL through JDBC. The graph separates these user-facing operations from the shared database, while retaining the standalone console utilities. The GUI excerpt is partial, so only visible dispatch and database interactions are connected; the README documents the broader feature set.

Main entry points: [`src/FinalMain.java`](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/FinalMain.java) (Console menu), [`src/LostAndFoundGUI.java`](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java) (Swing dashboard), [`src/AddLostItem.java`](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/AddLostItem.java) (Report lost item), [`src/AddFoundItem.java`](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/AddFoundItem.java) (Report found item)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interfaces"]
  node_gui["Swing dashboard"]
  node_cli["Console menu<br/>[FinalMain.java]"]
  node_connectivity["DB connection check<br/>[Main.java]"]
end

subgraph group_workflow["Item workflows"]
  node_lost["Report lost item<br/>[AddLostItem.java]"]
  node_found["Report found item<br/>[AddFoundItem.java]"]
  node_search["Search lost items<br/>[SearchItem.java]"]
  node_browse["Browse lost items<br/>[ViewLostItems.java]"]
  node_gui_lost["GUI lost reports"]
  node_gui_found["GUI found reports"]
  node_gui_search["GUI item search"]
  node_gui_browse["GUI lost listing"]
  node_claim["Claim item"]
  node_claims["View claims"]
end

subgraph group_persistence["Persistence"]
  node_mysql[("MySQL records")]
end

node_student(("Campus user"))

node_student -->|"uses"| node_gui
node_student -->|"uses"| node_cli
node_cli -->|"dispatches"| node_lost
node_cli -->|"dispatches"| node_found
node_cli -->|"dispatches"| node_search
node_cli -->|"dispatches"| node_browse
node_lost -->|"writes"| node_mysql
node_found -->|"writes"| node_mysql
node_search -->|"queries"| node_mysql
node_browse -->|"reads"| node_mysql
node_gui -->|"dispatches"| node_gui_search
node_gui -->|"dispatches"| node_claim
node_gui -->|"dispatches"| node_claims
node_gui_lost -->|"writes"| node_mysql
node_gui_found -->|"writes"| node_mysql
node_gui_search -->|"queries"| node_mysql
node_gui_browse -->|"reads"| node_mysql
node_claim -->|"updates"| node_mysql
node_claims -->|"reads"| node_mysql
node_connectivity -->|"connects"| node_mysql

click node_gui "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java"
click node_cli "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/FinalMain.java"
click node_connectivity "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/Main.java"
click node_lost "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/AddLostItem.java"
click node_found "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/AddFoundItem.java"
click node_search "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/SearchItem.java"
click node_browse "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/ViewLostItems.java"
click node_gui_lost "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java"
click node_gui_found "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java"
click node_gui_search "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java"
click node_gui_browse "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java"
click node_claim "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java"
click node_claims "https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java"

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_gui,node_cli,node_connectivity,node_student toneBlue
class node_lost,node_found,node_search,node_browse,node_gui_lost,node_gui_found,node_gui_search,node_gui_browse,node_claim,node_claims toneAmber
class node_mysql toneMint
```

## Components

### User interfaces

- [Swing dashboard](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java): `src/LostAndFoundGUI.java`
- [Console menu](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/FinalMain.java): `src/FinalMain.java`
- [DB connection check](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/Main.java): `src/Main.java`

### Item workflows

- [Report lost item](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/AddLostItem.java): `src/AddLostItem.java`
- [Report found item](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/AddFoundItem.java): `src/AddFoundItem.java`
- [Search lost items](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/SearchItem.java): `src/SearchItem.java`
- [Browse lost items](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/ViewLostItems.java): `src/ViewLostItems.java`
- [GUI lost reports](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java): `src/LostAndFoundGUI.java`
- [GUI found reports](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java): `src/LostAndFoundGUI.java`
- [GUI item search](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java): `src/LostAndFoundGUI.java`
- [GUI lost listing](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java): `src/LostAndFoundGUI.java`
- [Claim item](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java): `src/LostAndFoundGUI.java`
- [View claims](https://github.com/shreegowda15/lost-and-found-system/blob/main/src/LostAndFoundGUI.java): `src/LostAndFoundGUI.java`

### Persistence

- **MySQL records**

### Other components

- **Campus user**

## Connections

- Campus user → Swing dashboard: uses (evidence: `README.md`)
- Campus user → Console menu: uses (evidence: `README.md`)
- Console menu → Report lost item: dispatches (evidence: `src/FinalMain.java`)
- Console menu → Report found item: dispatches (evidence: `src/FinalMain.java`)
- Console menu → Search lost items: dispatches (evidence: `src/FinalMain.java`)
- Console menu → Browse lost items: dispatches (evidence: `src/FinalMain.java`)
- Report lost item → MySQL records: writes (evidence: `src/AddLostItem.java`)
- Report found item → MySQL records: writes (evidence: `src/AddFoundItem.java`)
- Search lost items → MySQL records: queries (evidence: `src/SearchItem.java`)
- Browse lost items → MySQL records: reads (evidence: `src/ViewLostItems.java`)
- Swing dashboard → GUI item search: dispatches (evidence: `src/LostAndFoundGUI.java`)
- Swing dashboard → Claim item: dispatches (evidence: `src/LostAndFoundGUI.java`)
- Swing dashboard → View claims: dispatches (evidence: `src/LostAndFoundGUI.java`)
- GUI lost reports → MySQL records: writes (evidence: `src/LostAndFoundGUI.java`)
- GUI found reports → MySQL records: writes (evidence: `src/LostAndFoundGUI.java`)
- GUI item search → MySQL records: queries (evidence: `src/LostAndFoundGUI.java`)
- GUI lost listing → MySQL records: reads (evidence: `src/LostAndFoundGUI.java`)
- Claim item → MySQL records: updates (evidence: `src/LostAndFoundGUI.java`)
- View claims → MySQL records: reads (evidence: `src/LostAndFoundGUI.java`)
- DB connection check → MySQL records: connects (evidence: `src/Main.java`)
