# abdullah001butt/lostfoundsystem architecture

> Architecture diagram of the GitHub repository abdullah001butt/lostfoundsystem, 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/abdullah001butt/lostfoundsystem
- Repository: https://github.com/abdullah001butt/lostfoundsystem

## Overview

Lost & Found Campus System is a SQL Server database project for recording campus lost/found items, suggesting matches, handling ownership claims, and recording claim outcomes. Its documented workflow spans item reporting, matching, claim submission, and admin review, with triggers enforcing status changes and audit logging. The graph reflects README-documented responsibilities and relationships; no source excerpts were available, so it does not infer unshown procedure calls or query behavior.

Main entry points: [`01_schema.sql`](https://github.com/abdullah001butt/lostfoundsystem/blob/main/01_schema.sql) (Core tables), [`04_triggers.sql`](https://github.com/abdullah001butt/lostfoundsystem/blob/main/04_triggers.sql) (Claim triggers), [`05_procedures.sql`](https://github.com/abdullah001butt/lostfoundsystem/blob/main/05_procedures.sql) (Item reporting), [`03_joins.sql`](https://github.com/abdullah001butt/lostfoundsystem/blob/main/03_joins.sql) (Join queries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Database model"]
  node_schema[("Core tables<br/>[01_schema.sql]")]
  node_audit_log[("Audit log<br/>[01_schema.sql]")]
  node_join_queries["Join queries<br/>[03_joins.sql]"]
end

subgraph group_workflow["Lost-found workflow"]
  node_reporting["Item reporting<br/>[05_procedures.sql]"]
  node_matching["Item matching<br/>[05_procedures.sql]"]
  node_claim_requests["Claim requests<br/>[01_schema.sql]"]
  node_claim_review["Claim review<br/>[05_procedures.sql]"]
end

subgraph group_rules["Claim rules"]
  node_claim_triggers["Claim triggers<br/>[04_triggers.sql]"]
end

node_students(("Students / staff"))
node_admins(("Admins"))

node_students -->|"report items"| node_reporting
node_reporting -->|"inserts reports"| node_schema
node_matching -->|"matches open items"| node_schema
node_students -->|"submit claims"| node_claim_requests
node_claim_requests -->|"fires on insert"| node_claim_triggers
node_claim_triggers -->|"updates item status"| node_schema
node_claim_triggers -->|"logs claims"| node_audit_log
node_admins -->|"review claims"| node_claim_review
node_claim_review -->|"approves or rejects"| node_claim_requests
node_join_queries -->|"queries tables"| node_schema

click node_schema "https://github.com/abdullah001butt/lostfoundsystem/blob/main/01_schema.sql"
click node_reporting "https://github.com/abdullah001butt/lostfoundsystem/blob/main/05_procedures.sql"
click node_matching "https://github.com/abdullah001butt/lostfoundsystem/blob/main/05_procedures.sql"
click node_claim_requests "https://github.com/abdullah001butt/lostfoundsystem/blob/main/01_schema.sql"
click node_claim_review "https://github.com/abdullah001butt/lostfoundsystem/blob/main/05_procedures.sql"
click node_claim_triggers "https://github.com/abdullah001butt/lostfoundsystem/blob/main/04_triggers.sql"
click node_audit_log "https://github.com/abdullah001butt/lostfoundsystem/blob/main/01_schema.sql"
click node_join_queries "https://github.com/abdullah001butt/lostfoundsystem/blob/main/03_joins.sql"

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_schema,node_audit_log,node_join_queries toneBlue
class node_reporting,node_matching,node_claim_requests,node_claim_review toneAmber
class node_claim_triggers toneMint
class node_students,node_admins toneIndigo
```

## Components

### Database model

- [Core tables](https://github.com/abdullah001butt/lostfoundsystem/blob/main/01_schema.sql): `01_schema.sql`
- [Audit log](https://github.com/abdullah001butt/lostfoundsystem/blob/main/01_schema.sql): `01_schema.sql`
- [Join queries](https://github.com/abdullah001butt/lostfoundsystem/blob/main/03_joins.sql): `03_joins.sql`

### Lost-found workflow

- [Item reporting](https://github.com/abdullah001butt/lostfoundsystem/blob/main/05_procedures.sql): `05_procedures.sql`
- [Item matching](https://github.com/abdullah001butt/lostfoundsystem/blob/main/05_procedures.sql): `05_procedures.sql`
- [Claim requests](https://github.com/abdullah001butt/lostfoundsystem/blob/main/01_schema.sql): `01_schema.sql`
- [Claim review](https://github.com/abdullah001butt/lostfoundsystem/blob/main/05_procedures.sql): `05_procedures.sql`

### Claim rules

- [Claim triggers](https://github.com/abdullah001butt/lostfoundsystem/blob/main/04_triggers.sql): `04_triggers.sql`

### Other components

- **Students / staff**
- **Admins**

## Connections

- Students / staff → Item reporting: report items (evidence: `README.md`)
- Item reporting → Core tables: inserts reports (evidence: `README.md`)
- Item matching → Core tables: matches open items (evidence: `README.md`)
- Students / staff → Claim requests: submit claims (evidence: `README.md`)
- Claim requests → Claim triggers: fires on insert (evidence: `README.md`)
- Claim triggers → Core tables: updates item status (evidence: `README.md`)
- Claim triggers → Audit log: logs claims (evidence: `README.md`)
- Admins → Claim review: review claims (evidence: `README.md`)
- Claim review → Claim requests: approves or rejects (evidence: `README.md`)
- Join queries → Core tables: queries tables (evidence: `README.md`)
