# pravaragarwal/automation-ops-platform architecture

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

- Interactive diagram: https://gitdiagram.com/pravaragarwal/automation-ops-platform
- Repository: https://github.com/pravaragarwal/automation-ops-platform

## Overview

The product is a FastAPI service for managing automation scripts and asynchronously running them while persisting lifecycle state and captured output. The principal workflow is: a client creates a job, requests execution, receives a pending execution ID, and later queries its status and results. The graph includes job management, execution tracking, persistence, validation, and health checking. Relationships are based on the README and provided source excerpts; unsampled components are not inferred beyond documented behavior.

Main entry points: [`app/routers/executions.py`](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/routers/executions.py) (Execution Endpoints), [`app/database.py`](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/database.py) (Database Sessions), [`app/main.py`](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/main.py) (FastAPI Application), [`app/routers/jobs.py`](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/routers/jobs.py) (Job Endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_application["FastAPI Application<br/>[main.py]"]
  node_job_routes["Job Endpoints<br/>[jobs.py]"]
  node_execution_routes["Execution Endpoints<br/>[executions.py]"]
  node_health_routes["Health Endpoint<br/>[health.py]"]
  node_schemas["Request Responses<br/>[schemas.py]"]
end

subgraph group_data["Jobs And State"]
  node_job_models["Job And Execution Models<br/>[models.py]"]
  node_database["Database Sessions<br/>[database.py]"]
  node_persistent_store[("SQLite Job Store")]
end

subgraph group_runtime["Execution Runtime"]
  node_executor["Execution Worker<br/>[executor.py]"]
  node_script_process["Python Or Bash Process"]
end

subgraph group_platform["Application Setup"]
  node_configuration["Settings And Logging<br/>[config.py]"]
end

node_client(("API Client"))

node_client -->|"sends HTTP"| node_application
node_application -->|"registers routes"| node_job_routes
node_application -->|"registers routes"| node_execution_routes
node_application -->|"registers routes"| node_health_routes
node_application -->|"creates tables"| node_database
node_job_routes -->|"validates responses"| node_schemas
node_execution_routes -->|"validates responses"| node_schemas
node_schemas -->|"maps ORM data"| node_job_models
node_job_routes -->|"queries and mutates"| node_job_models
node_job_routes -->|"gets sessions"| node_database
node_execution_routes -->|"queries and creates"| node_job_models
node_execution_routes -->|"gets sessions"| node_database
node_execution_routes -->|"schedules task"| node_executor
node_job_models -->|"uses ORM base"| node_database
node_database -->|"loads database URL"| node_configuration
node_database -->|"connects to"| node_persistent_store
node_job_routes -->|"reads and writes jobs"| node_persistent_store
node_execution_routes -->|"reads and writes executions"| node_persistent_store
node_executor -->|"updates execution state"| node_job_models
node_executor -->|"runs script"| node_script_process
node_executor -->|"logs execution"| node_configuration
node_executor -->|"reads and saves results"| node_persistent_store

click node_application "https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/main.py"
click node_job_routes "https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/routers/jobs.py"
click node_execution_routes "https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/routers/executions.py"
click node_health_routes "https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/routers/health.py"
click node_schemas "https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/schemas.py"
click node_job_models "https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/models.py"
click node_database "https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/database.py"
click node_executor "https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/services/executor.py"
click node_configuration "https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/config.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_application,node_job_routes,node_execution_routes,node_health_routes,node_schemas,node_client toneBlue
class node_job_models,node_database,node_persistent_store toneAmber
class node_executor,node_script_process toneMint
class node_configuration toneRose
```

## Components

### HTTP API

- [FastAPI Application](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/main.py): `app/main.py`
- [Job Endpoints](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/routers/jobs.py): `app/routers/jobs.py`
- [Execution Endpoints](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/routers/executions.py): `app/routers/executions.py`
- [Health Endpoint](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/routers/health.py): `app/routers/health.py`
- [Request Responses](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/schemas.py): `app/schemas.py`

### Jobs And State

- [Job And Execution Models](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/models.py): `app/models.py`
- [Database Sessions](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/database.py): `app/database.py`
- **SQLite Job Store**

### Execution Runtime

- [Execution Worker](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/services/executor.py): `app/services/executor.py`
- **Python Or Bash Process**

### Application Setup

- [Settings And Logging](https://github.com/pravaragarwal/automation-ops-platform/blob/main/app/config.py): `app/config.py`

### Other components

- **API Client**

## Connections

- API Client → FastAPI Application: sends HTTP (evidence: `README.md`)
- FastAPI Application → Job Endpoints: registers routes (evidence: `app/main.py`)
- FastAPI Application → Execution Endpoints: registers routes (evidence: `app/main.py`)
- FastAPI Application → Health Endpoint: registers routes (evidence: `app/main.py`)
- FastAPI Application → Database Sessions: creates tables (evidence: `app/main.py`)
- Job Endpoints → Request Responses: validates responses (evidence: `app/routers/jobs.py`)
- Execution Endpoints → Request Responses: validates responses (evidence: `app/routers/executions.py`)
- Request Responses → Job And Execution Models: maps ORM data (evidence: `app/schemas.py`)
- Job Endpoints → Job And Execution Models: queries and mutates (evidence: `app/routers/jobs.py`)
- Job Endpoints → Database Sessions: gets sessions (evidence: `app/routers/jobs.py`)
- Execution Endpoints → Job And Execution Models: queries and creates (evidence: `app/routers/executions.py`)
- Execution Endpoints → Database Sessions: gets sessions (evidence: `app/routers/executions.py`)
- Execution Endpoints → Execution Worker: schedules task (evidence: `app/routers/executions.py`)
- Job And Execution Models → Database Sessions: uses ORM base (evidence: `app/models.py`)
- Database Sessions → Settings And Logging: loads database URL (evidence: `app/database.py`)
- Database Sessions → SQLite Job Store: connects to (evidence: `README.md`)
- Job Endpoints → SQLite Job Store: reads and writes jobs (evidence: `app/routers/jobs.py`)
- Execution Endpoints → SQLite Job Store: reads and writes executions (evidence: `app/routers/executions.py`)
- Execution Worker → Job And Execution Models: updates execution state (evidence: `app/services/executor.py`)
- Execution Worker → Python Or Bash Process: runs script (evidence: `app/services/executor.py`)
- Execution Worker → Settings And Logging: logs execution (evidence: `app/services/executor.py`)
- Execution Worker → SQLite Job Store: reads and saves results (evidence: `app/services/executor.py`)
