# qure-kiran/poc-project architecture

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

- Interactive diagram: https://gitdiagram.com/qure-kiran/poc-project
- Repository: https://github.com/qure-kiran/poc-project

## Overview

Job Notifier accepts job requests, runs simulated multi-step workflows asynchronously, records job and step history in SQLite, and notifies a fixed recipient when a job completes or fails. Users can inspect jobs and recent notifications through a server-rendered dashboard. The graph separates request handling, workflow execution, persistence, and notification integration; it also shows logging as an internal operational layer. The README documents notification-service behavior and workflow capabilities; unsampled templates and integrations are represented only where their paths or relationships are supported.

Main entry points: [`app/jobs.py`](https://github.com/qure-kiran/poc-project/blob/main/app/jobs.py) (Job runner), [`app/routes/jobs.py`](https://github.com/qure-kiran/poc-project/blob/main/app/routes/jobs.py) (Job endpoints), [`app/routes/dashboard.py`](https://github.com/qure-kiran/poc-project/blob/main/app/routes/dashboard.py) (Dashboard endpoints), [`app/db.py`](https://github.com/qure-kiran/poc-project/blob/main/app/db.py) (History access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Web interface"]
  node_app["FastAPI app<br/>[main.py]"]
  node_job_routes["Job endpoints<br/>[jobs.py]"]
  node_dashboard_routes["Dashboard endpoints<br/>[dashboard.py]"]
  node_templates["HTML views"]
end

subgraph group_execution["Job execution"]
  node_job_types["Workflow definitions<br/>[job_templates.py]"]
  node_runner["Job runner<br/>[jobs.py]"]
end

subgraph group_state["Job history"]
  node_database_api["History access<br/>[db.py]"]
  node_sqlite[("Job history")]
end

subgraph group_integrations["Operations and alerts"]
  node_settings["Service settings<br/>[config.py]"]
  node_notifier["Notification client<br/>[notifier.py]"]
end

node_user(("User"))
node_notification_service["Notification service"]
node_logging_lib["Logging library"]

node_user -->|"submits jobs"| node_job_routes
node_user -->|"views status"| node_dashboard_routes
node_app -->|"registers routes"| node_job_routes
node_app -->|"registers routes"| node_dashboard_routes
node_app -->|"initializes database"| node_database_api
node_app -->|"configures logging"| node_logging_lib
node_job_routes -->|"creates job"| node_database_api
node_job_routes -->|"starts task"| node_runner
node_job_routes -->|"validates type"| node_job_types
node_runner -->|"loads steps"| node_job_types
node_runner -->|"updates history"| node_database_api
node_runner -->|"publishes result"| node_notifier
node_runner -->|"logs steps"| node_logging_lib
node_database_api -->|"reads and writes"| node_sqlite
node_dashboard_routes -->|"loads jobs"| node_database_api
node_dashboard_routes -->|"fetches notifications"| node_notifier
node_dashboard_routes -->|"renders views"| node_templates
node_notifier -->|"sends and fetches"| node_notification_service
node_notifier -->|"reads credentials"| node_settings

click node_app "https://github.com/qure-kiran/poc-project/blob/main/app/main.py"
click node_job_routes "https://github.com/qure-kiran/poc-project/blob/main/app/routes/jobs.py"
click node_dashboard_routes "https://github.com/qure-kiran/poc-project/blob/main/app/routes/dashboard.py"
click node_templates "https://github.com/qure-kiran/poc-project/tree/main/templates"
click node_job_types "https://github.com/qure-kiran/poc-project/blob/main/app/job_templates.py"
click node_runner "https://github.com/qure-kiran/poc-project/blob/main/app/jobs.py"
click node_database_api "https://github.com/qure-kiran/poc-project/blob/main/app/db.py"
click node_settings "https://github.com/qure-kiran/poc-project/blob/main/app/config.py"
click node_notifier "https://github.com/qure-kiran/poc-project/blob/main/app/notifier.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_app,node_job_routes,node_dashboard_routes,node_templates,node_user toneBlue
class node_job_types,node_runner toneAmber
class node_database_api,node_sqlite toneMint
class node_settings,node_notifier toneRose
class node_notification_service,node_logging_lib toneIndigo
```

## Components

### Web interface

- [FastAPI app](https://github.com/qure-kiran/poc-project/blob/main/app/main.py): `app/main.py`
- [Job endpoints](https://github.com/qure-kiran/poc-project/blob/main/app/routes/jobs.py): `app/routes/jobs.py`
- [Dashboard endpoints](https://github.com/qure-kiran/poc-project/blob/main/app/routes/dashboard.py): `app/routes/dashboard.py`
- [HTML views](https://github.com/qure-kiran/poc-project/tree/main/templates): `templates`

### Job execution

- [Workflow definitions](https://github.com/qure-kiran/poc-project/blob/main/app/job_templates.py): `app/job_templates.py`
- [Job runner](https://github.com/qure-kiran/poc-project/blob/main/app/jobs.py): `app/jobs.py`

### Job history

- [History access](https://github.com/qure-kiran/poc-project/blob/main/app/db.py): `app/db.py`
- **Job history**

### Operations and alerts

- [Service settings](https://github.com/qure-kiran/poc-project/blob/main/app/config.py): `app/config.py`
- [Notification client](https://github.com/qure-kiran/poc-project/blob/main/app/notifier.py): `app/notifier.py`

### Other components

- **User**
- **Notification service**
- **Logging library**

## Connections

- User → Job endpoints: submits jobs (evidence: `README.md`)
- User → Dashboard endpoints: views status (evidence: `README.md`)
- FastAPI app → Job endpoints: registers routes (evidence: `app/main.py`)
- FastAPI app → Dashboard endpoints: registers routes (evidence: `app/main.py`)
- FastAPI app → History access: initializes database (evidence: `app/main.py`)
- FastAPI app → Logging library: configures logging (evidence: `app/main.py`)
- Job endpoints → History access: creates job (evidence: `app/routes/jobs.py`)
- Job endpoints → Job runner: starts task (evidence: `app/routes/jobs.py`)
- Job endpoints → Workflow definitions: validates type (evidence: `app/routes/jobs.py`)
- Job runner → Workflow definitions: loads steps (evidence: `app/jobs.py`)
- Job runner → History access: updates history (evidence: `app/jobs.py`)
- Job runner → Notification client: publishes result (evidence: `app/jobs.py`)
- Job runner → Logging library: logs steps (evidence: `app/jobs.py`)
- History access → Job history: reads and writes (evidence: `app/db.py`)
- Dashboard endpoints → History access: loads jobs (evidence: `app/routes/dashboard.py`)
- Dashboard endpoints → Notification client: fetches notifications (evidence: `app/routes/dashboard.py`)
- Dashboard endpoints → HTML views: renders views (evidence: `app/routes/dashboard.py`)
- Notification client → Notification service: sends and fetches (evidence: `README.md`)
- Notification client → Service settings: reads credentials (evidence: `app/notifier.py`)
