# prooflinedev/ai-review-benchmarks architecture

> Architecture diagram of the GitHub repository prooflinedev/ai-review-benchmarks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prooflinedev/ai-review-benchmarks
- Repository: https://github.com/prooflinedev/ai-review-benchmarks

## Overview

This repository is a small report-scheduling and delivery service, provided with a CLI and an AWS Lambda adapter. A user schedules reports, processes due deliveries, and inspects history, exports, or summary counts. The shared reports module owns those operations; SQLite holds delivery and receipt state, with numbered SQL migrations. The README also describes the benchmark and deployment exercise, but the graph focuses on the implemented runtime. Relationships are limited to calls and database operations shown in the excerpts; the migration’s schema details were not sampled.

Main entry points: [`reports.py`](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py) (Report Service), [`console.py`](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/console.py) (CLI Console), [`aws/handler.py`](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/aws/handler.py) (Lambda Handler), [`migrations/001_initial.sql`](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/migrations/001_initial.sql) (Initial Migration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Service Interfaces"]
  node_console["CLI Console<br/>[console.py]"]
  node_lambda["Lambda Handler<br/>[handler.py]"]
end

subgraph group_core["Report Operations"]
  node_reports["Report Service<br/>[reports.py]"]
  node_scheduling["Scheduling<br/>[reports.py]"]
  node_delivery["Due Delivery<br/>[reports.py]"]
  node_history["History Paging<br/>[reports.py]"]
  node_exports["CSV and Archive<br/>[reports.py]"]
  node_summary["Delivery Summary<br/>[reports.py]"]
end

subgraph group_storage["Persistence"]
  node_database[("SQLite Database")]
  node_migration["Initial Migration<br/>[001_initial.sql]"]
end

node_user(("Operator"))

node_user -->|"runs commands"| node_console
node_console -->|"calls operations"| node_reports
node_lambda -->|"calls operations"| node_reports
node_reports -->|"schedules jobs"| node_scheduling
node_reports -->|"processes due jobs"| node_delivery
node_reports -->|"pages history"| node_history
node_reports -->|"writes or batches"| node_exports
node_reports -->|"counts deliveries"| node_summary
node_reports -->|"reads and writes"| node_database
node_reports -->|"loads SQL migrations"| node_migration
node_console -->|"opens SQLite"| node_database
node_lambda -->|"opens in-memory SQLite"| node_database

click node_console "https://github.com/prooflinedev/ai-review-benchmarks/blob/main/console.py"
click node_lambda "https://github.com/prooflinedev/ai-review-benchmarks/blob/main/aws/handler.py"
click node_reports "https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py"
click node_scheduling "https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py"
click node_delivery "https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py"
click node_history "https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py"
click node_exports "https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py"
click node_summary "https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py"
click node_migration "https://github.com/prooflinedev/ai-review-benchmarks/blob/main/migrations/001_initial.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_console,node_lambda toneBlue
class node_reports,node_scheduling,node_delivery,node_history,node_exports,node_summary toneAmber
class node_database,node_migration toneMint
class node_user toneIndigo
```

## Components

### Service Interfaces

- [CLI Console](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/console.py): `console.py`
- [Lambda Handler](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/aws/handler.py): `aws/handler.py`

### Report Operations

- [Report Service](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py): `reports.py`
- [Scheduling](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py): `reports.py`
- [Due Delivery](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py): `reports.py`
- [History Paging](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py): `reports.py`
- [CSV and Archive](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py): `reports.py`
- [Delivery Summary](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/reports.py): `reports.py`

### Persistence

- **SQLite Database**
- [Initial Migration](https://github.com/prooflinedev/ai-review-benchmarks/blob/main/migrations/001_initial.sql): `migrations/001_initial.sql`

### Other components

- **Operator**

## Connections

- Operator → CLI Console: runs commands (evidence: `console.py`)
- CLI Console → Report Service: calls operations (evidence: `console.py`)
- Lambda Handler → Report Service: calls operations (evidence: `aws/handler.py`)
- Report Service → Scheduling: schedules jobs (evidence: `reports.py`)
- Report Service → Due Delivery: processes due jobs (evidence: `reports.py`)
- Report Service → History Paging: pages history (evidence: `reports.py`)
- Report Service → CSV and Archive: writes or batches (evidence: `reports.py`)
- Report Service → Delivery Summary: counts deliveries (evidence: `reports.py`)
- Report Service → SQLite Database: reads and writes (evidence: `reports.py`)
- Report Service → Initial Migration: loads SQL migrations (evidence: `reports.py`)
- CLI Console → SQLite Database: opens SQLite (evidence: `console.py`)
- Lambda Handler → SQLite Database: opens in-memory SQLite (evidence: `aws/handler.py`)
