# mishravaibhavn-tech/foundit architecture

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

- Interactive diagram: https://gitdiagram.com/mishravaibhavn-tech/foundit
- Repository: https://github.com/mishravaibhavn-tech/foundit

## Overview

FoundIt is a web application for reporting lost and found items, browsing listings, submitting claims, and letting item owners review them. The user flow runs from browser pages and JavaScript requests through authentication, item, and claim servlets to MySQL; database initialization creates the application tables. The sampled source supports the browser-to-servlet calls and servlet-to-database dependencies shown here. Claims and account features are represented from sampled servlet behavior; the HTML page wiring was not excerpted.

Main entry points: [`FoundItApp/src/main/java/com/foundit/DBConnection.java`](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/DBConnection.java) (DB connection), [`FoundItApp/WebContent/js/app.js`](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/WebContent/js/app.js) (Request helpers), [`FoundItApp/src/main/java/com/foundit/AuthServlet.java`](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/AuthServlet.java) (Authentication), [`FoundItApp/src/main/java/com/foundit/DbInit.java`](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/DbInit.java) (Schema setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_pages["App pages"]
  node_browser["Request helpers<br/>[app.js]"]
end

subgraph group_services["Application services"]
  node_auth["Authentication<br/>[AuthServlet.java]"]
  node_password["Password hashing<br/>[PasswordUtil.java]"]
  node_items["Item listings<br/>[ItemServlet.java]"]
  node_claims["Claim workflow<br/>[ClaimServlet.java]"]
end

subgraph group_persistence["Persistence"]
  node_dbinit["Schema setup<br/>[DbInit.java]"]
  node_connection["DB connection<br/>[DBConnection.java]"]
  node_mysql[("MySQL database")]
end

node_visitor(("User"))

node_visitor -->|"uses"| node_pages
node_pages -.->|"loads"| node_browser
node_browser -->|"requests"| node_auth
node_browser -.->|"requests"| node_items
node_browser -.->|"requests"| node_claims
node_auth -->|"hashes passwords"| node_password
node_auth -->|"opens connection"| node_connection
node_items -->|"opens connection"| node_connection
node_claims -->|"opens connection"| node_connection
node_dbinit -->|"opens connection"| node_connection
node_connection -->|"connects"| node_mysql
node_dbinit -->|"creates schema"| node_mysql

click node_pages "https://github.com/mishravaibhavn-tech/foundit/tree/master/FoundItApp/WebContent"
click node_browser "https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/WebContent/js/app.js"
click node_auth "https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/AuthServlet.java"
click node_password "https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/PasswordUtil.java"
click node_items "https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/ItemServlet.java"
click node_claims "https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/ClaimServlet.java"
click node_dbinit "https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/DbInit.java"
click node_connection "https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/DBConnection.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_pages,node_browser,node_visitor toneBlue
class node_auth,node_password,node_items,node_claims toneAmber
class node_dbinit,node_connection,node_mysql toneMint
```

## Components

### Web interface

- [App pages](https://github.com/mishravaibhavn-tech/foundit/tree/master/FoundItApp/WebContent): `FoundItApp/WebContent`
- [Request helpers](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/WebContent/js/app.js): `FoundItApp/WebContent/js/app.js`

### Application services

- [Authentication](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/AuthServlet.java): `FoundItApp/src/main/java/com/foundit/AuthServlet.java`
- [Password hashing](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/PasswordUtil.java): `FoundItApp/src/main/java/com/foundit/PasswordUtil.java`
- [Item listings](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/ItemServlet.java): `FoundItApp/src/main/java/com/foundit/ItemServlet.java`
- [Claim workflow](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/ClaimServlet.java): `FoundItApp/src/main/java/com/foundit/ClaimServlet.java`

### Persistence

- [Schema setup](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/DbInit.java): `FoundItApp/src/main/java/com/foundit/DbInit.java`
- [DB connection](https://github.com/mishravaibhavn-tech/foundit/blob/master/FoundItApp/src/main/java/com/foundit/DBConnection.java): `FoundItApp/src/main/java/com/foundit/DBConnection.java`
- **MySQL database**

### Other components

- **User**

## Connections

- User → App pages: uses
- App pages → Request helpers: loads
- Request helpers → Authentication: requests (evidence: `FoundItApp/WebContent/js/app.js`)
- Request helpers → Item listings: requests
- Request helpers → Claim workflow: requests
- Authentication → Password hashing: hashes passwords (evidence: `FoundItApp/src/main/java/com/foundit/AuthServlet.java`)
- Authentication → DB connection: opens connection (evidence: `FoundItApp/src/main/java/com/foundit/AuthServlet.java`)
- Item listings → DB connection: opens connection (evidence: `FoundItApp/src/main/java/com/foundit/ItemServlet.java`)
- Claim workflow → DB connection: opens connection (evidence: `FoundItApp/src/main/java/com/foundit/ClaimServlet.java`)
- Schema setup → DB connection: opens connection (evidence: `FoundItApp/src/main/java/com/foundit/DbInit.java`)
- DB connection → MySQL database: connects (evidence: `FoundItApp/src/main/java/com/foundit/DBConnection.java`)
- Schema setup → MySQL database: creates schema (evidence: `FoundItApp/src/main/java/com/foundit/DbInit.java`)
