# ujwalamaithreyi-stack/issuehub architecture

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

- Interactive diagram: https://gitdiagram.com/ujwalamaithreyi-stack/issuehub
- Repository: https://github.com/ujwalamaithreyi-stack/issuehub

## Overview

IssueHub is a browser-based issue reporting and management app. Users load and search/filter the issue list, create reports, change status, and delete issues; the UI also derives dashboard analytics from loaded issues. The browser client calls Express API routes, which validate and query PostgreSQL through a shared pool; server startup initializes the schema. README capabilities are represented, though the source excerpt is partial, so unshown UI wiring is not inferred beyond the documented features.

Main entry points: [`public/script.js`](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/script.js) (Client interactions), [`server.js`](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/server.js) (Issue API routes), [`db.js`](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/db.js) (PostgreSQL pool), [`public/index.html`](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/index.html) (IssueHub page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["IssueHub client"]
  node_page["IssueHub page<br/>[index.html]"]
  node_clientlogic["Client interactions<br/>[script.js]"]
  node_dashboard["Dashboard analytics<br/>[script.js]"]
  node_issueviews["Issue search and views<br/>[script.js]"]
end

subgraph group_api["Issue API"]
  node_express["Express server<br/>[server.js]"]
  node_issueapi["Issue API routes<br/>[server.js]"]
end

subgraph group_persistence["Persistence"]
  node_schema["Issue schema setup<br/>[db.js]"]
  node_pool["PostgreSQL pool<br/>[db.js]"]
  node_postgres[("PostgreSQL database")]
end

node_user(("IssueHub user"))

node_user -->|"uses"| node_page
node_page -.->|"loads interactions"| node_clientlogic
node_clientlogic -->|"renders issues"| node_issueviews
node_clientlogic -->|"renders analytics"| node_dashboard
node_clientlogic -->|"requests issues"| node_issueapi
node_express -->|"routes requests"| node_issueapi
node_issueapi -->|"queries"| node_pool
node_express -->|"initializes schema"| node_schema
node_schema -->|"creates table"| node_pool
node_pool -->|"reads and writes"| node_postgres

click node_page "https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/index.html"
click node_clientlogic "https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/script.js"
click node_dashboard "https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/script.js"
click node_issueviews "https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/script.js"
click node_express "https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/server.js"
click node_issueapi "https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/server.js"
click node_schema "https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/db.js"
click node_pool "https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/db.js"

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_page,node_clientlogic,node_dashboard,node_issueviews,node_user toneBlue
class node_express,node_issueapi toneAmber
class node_schema,node_pool,node_postgres toneMint
```

## Components

### IssueHub client

- [IssueHub page](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/index.html): `public/index.html`
- [Client interactions](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/script.js): `public/script.js`
- [Dashboard analytics](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/script.js): `public/script.js`
- [Issue search and views](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/public/script.js): `public/script.js`

### Issue API

- [Express server](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/server.js): `server.js`
- [Issue API routes](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/server.js): `server.js`

### Persistence

- [Issue schema setup](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/db.js): `db.js`
- [PostgreSQL pool](https://github.com/ujwalamaithreyi-stack/issuehub/blob/main/db.js): `db.js`
- **PostgreSQL database**

### Other components

- **IssueHub user**

## Connections

- IssueHub user → IssueHub page: uses (evidence: `readme.md`)
- IssueHub page → Client interactions: loads interactions
- Client interactions → Issue search and views: renders issues (evidence: `public/script.js`)
- Client interactions → Dashboard analytics: renders analytics (evidence: `public/script.js`)
- Client interactions → Issue API routes: requests issues (evidence: `public/script.js`)
- Express server → Issue API routes: routes requests (evidence: `server.js`)
- Issue API routes → PostgreSQL pool: queries (evidence: `server.js`)
- Express server → Issue schema setup: initializes schema (evidence: `server.js`)
- Issue schema setup → PostgreSQL pool: creates table (evidence: `db.js`)
- PostgreSQL pool → PostgreSQL database: reads and writes (evidence: `db.js`)
