# jensrot/meeting-minutes-send-summary-to-confluence architecture

> Architecture diagram of the GitHub repository jensrot/meeting-minutes-send-summary-to-confluence, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-03-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jensrot/meeting-minutes-send-summary-to-confluence
- Repository: https://github.com/jensrot/meeting-minutes-send-summary-to-confluence

## Overview

##### Project type & purpose (what you’re diagramming)
This is a **local automation/CLI tool** (single-node, not a distributed system) that:
- Reads meeting data directly from **Meetily’s local SQLite database** (no Meetily server involved).
- Optionally exports meeting summaries to **Atlassian Confluence** via Confluence REST APIs.
- Supports debugging/export to JSON.

So the “system” is best modeled as a **CLI-driven pipeline** with:
- Local filesystem + SQLite DB as the primary data source
- Optional external SaaS (Confluence) as the sink
- Env-based configuration and auth

##### File structure → architectural components
Top-level Python modules clearly map to responsibilities:

- `main.py` — **CLI entrypoint / orchestration** (commands: `init`, `list`, `scrape`, `export`)
- `config.py` — **configuration layer** (reads `.env`, holds constants, validates required config)
- `db_scraper.py` — **data access layer** to Meetily’s **SQLite** DB (queries, transforms into Python objects/dicts)
- `confluence_exporter.py` — **integration layer** for Confluence (HTTP client, auth via API token, create/update pages)
- `.env.example` — configuration template
- `requirements.txt` — runtime deps (likely `requests`, `python-dotenv`, etc.)
- `scripts/*` — **maintenance/test utilities** (template tests, token tests, zipping DB/recordings, replace recordings/DB)

This is basically a clean “ports & adapters” style even if not formalized:
- **Core workflow** in `main.py`
- **Ports**: “read meetings” (SQLite) and “export to Confluence” (HTTP API)
- **Adapters**: `db_scraper.py` and `confluence_exporter.py`

##### Meetily Automation CLI (this project) (the system)
3. **Meetily Local Data** (SQLite DB on disk; optionally also “recordings” if relevant to scripts)
##### Confluence Cloud (Atlassian Confluence REST API)

- User → CLI: runs commands (`list`, `scrape`, `export`, `init`)
- CLI → SQLite DB: read queries
- CLI → Local JSON file: writes JSON output (for `scrape`)
- CLI → Confluence API: HTTPS requests (create/update page content)
- CLI ← Confluence API: responses (page id, errors)

Annotate:
- “No Meetily server required”
- “Auth: Basic (email + API token) or token header (depending on implementation)”
- “Config from `.env`”

##### Level 2 — Container/Component (map to files)

- `main.py` (CLI / command router)
- `config.py` (env loader + validation)
- `db_scraper.py` (SQLite reader / query layer)
- `confluence_exporter.py` (Confluence client/service)

Relationships:
- `main.py` → `config.py` (loads config)
- `main.py` → `db_scraper.py` (fetch meetings list/details)
- `main.py` → `confluence_exporter.py` (export meeting summary)
- `db_scraper.py` → SQLite DB file (SQL queries)
- `confluence_exporter.py` → Confluence REST endpoints (HTTPS)

- filesystem (zip/replace DB/recordings)
- Confluence token test

##### list
1) User runs `python main.py list`
2) `main.py` loads env via `config.py`
3) `main.py` calls `db_scraper.py` to query meetings
4) CLI prints list to stdout

##### scrape
1) User runs `python main.py scrape`
2) Config load
3) DB scrape

##### export
1) User runs `python main.py export --meeting-id ...`
2) Config load (must include Confluence URL/username/token/space)
3) DB fetch meeting details/summary
4) `confluence_exporter.py` formats payload and calls Confluence API
5) CLI prints success/failure

##### Architectural patterns / key design principles
- **Single-node local execution** (no daemon/service)
- **Source-of-truth = SQLite file on disk**
- **Separation of concerns by module**: CLI orchestration vs data access vs external integration vs configuration
- **Side-effect boundaries**:
- Reads: SQLite
- Writes: Confluence (network) and local JSON (filesystem)
- **Config via environment** (twelve-factor style, but local)

##### Relevant technologies (labels matter)
- Python CLI (`main.py`)
- SQLite (Meetily DB file)
- Confluence REST API (HTTPS)
- `.env` / environment variables (credentials + space key)

##### Clear labels
- “CLI Orchestrator (`main.py`)”
- “SQLite Reader (`db_scraper.py`)”
- “Confluence Client (`confluence_exporter.py`)”
- “Config Loader (`config.py`)”
- Name artifacts precisely:
- “Meetily SQLite DB (`meeting_minutes.sqlite`)”
- “Local JSON output (debug)”
- “Confluence Space (SPACE_KEY)”

- “SQL (sqlite3)” to DB
- “HTTPS (REST)” to Confluence

##### “Separate into as many components as possible” (without overthinking)
Given the repo size, the maximum useful granularity is:
- Each top-level `.py` file as a component
- Each external boundary as its own node (SQLite file, filesystem outputs, Confluence API)
- Scripts grouped as a separate “tooling” area

- Split Confluence into: “Auth (API token)”, “Page create/update endpoint”, “Space”
- Split DB into: “Meetings table(s)”, “Transcripts/Summaries table(s)” (confirm names from `db_scraper.py`)

That combination will be the most accurate representation of this project’s “architecture” given it’s a CLI integration tool.

## Diagram (Mermaid)

```mermaid
flowchart TD

%% =======================
%% Level 1: System Context
%% =======================
subgraph "System Context (Single-node CLI automation)"
direction TB

User["User / Operator"]:::actor

subgraph "Meetily Automation CLI (This Project)"
direction TB
CLI["CLI Tool (Python)"]:::internal
end

MeetilyDB[("Meetily Local SQLite DB\n(on disk; OS-specific path)")]:::datastore
LocalJSON["Local JSON Output\n(debug export from scrape)"]:::artifact
Confluence["Atlassian Confluence Cloud\n(REST API over HTTPS)"]:::external

User -->|"runs: init / list / scrape / export"| CLI
CLI -->|"SQL (sqlite3) read"| MeetilyDB
CLI -->|"writes: JSON (file)"| LocalJSON
CLI -->|"HTTPS (REST) create/update"| Confluence
Confluence -->|"responses: pageId/errors"| CLI

NoServerNote["Note: No Meetily server required\nSource-of-truth = local SQLite DB\nConfig from .env (env vars)"]:::note
CLI -.->|"design constraint"| NoServerNote
end

%% ======================================
%% Level 2: Container / Component Diagram
%% ======================================
subgraph "Container / Component View (Modules mapped 1:1 to files)"
direction TB

subgraph "Code Modules"
direction TB
Main["CLI Orchestrator\n(main.py)"]:::internal
Config["Config Loader + Validation\n(config.py)"]:::internal
DBScraper["SQLite Reader / Query Layer\n(db_scraper.py)"]:::internal
ConfluenceExporter["Confluence Client / Export Service\n(confluence_exporter.py)"]:::internal
end

subgraph "Local Artifacts"
direction TB
EnvFile[".env (from template)"]:::artifact
EnvTemplate[".env.example"]:::artifact
Reqs["requirements.txt\n(runtime deps)"]:::artifact
MeetilyDB2[("Meetily SQLite DB File")]:::datastore
JSONOut2["JSON Output File(s)"]:::artifact
end

subgraph "External Service"
direction TB
ConfluenceAPI["Confluence REST API\n(/content, /space, etc.)"]:::external
ConfluenceSpace["Target Space\n(SPACE_KEY)"]:::external
end

EnvFile -.->|"env vars: URL, user, token, SPACE_KEY"| Config
EnvTemplate -.->|"template for"| EnvFile
Reqs -.->|"installs libs: dotenv + http client"| Main

Main -->|"loads/validates"| Config
Main -->|"queries meetings"| DBScraper
DBScraper -->|"SQL read"| MeetilyDB2

Main -->|"export meeting summary"| ConfluenceExporter
ConfluenceExporter -->|"auth headers (token)"| ConfluenceAPI
ConfluenceExporter -->|"writes pages in"| ConfluenceSpace
ConfluenceAPI -->|"create/update page"| ConfluenceSpace

Main -->|"scrape writes"| JSONOut2
end

%% ==========================
%% Runtime Flows (Commands)
%% ==========================
subgraph "Runtime Flows (Command Pipelines)"
direction TB

subgraph "list"
direction TB
List1["1) user runs: python main.py list"]:::flow
List2["2) config load (.env)"]:::flow
List3["3) DB query meetings"]:::flow
List4["4) print to stdout"]:::flow
List1 --> List2 --> List3 --> List4
end

subgraph "scrape"
direction TB
Scrape1["1) user runs: python main.py scrape"]:::flow
Scrape2["2) config load (.env)"]:::flow
Scrape3["3) DB scrape meeting details"]:::flow
Scrape4["4) write JSON locally"]:::flow
Scrape1 --> Scrape2 --> Scrape3 --> Scrape4
end

subgraph "export"
direction TB
Export1["1) user runs: python main.py export --meeting-id ..."]:::flow
Export2["2) config load (Confluence URL/user/token/space)"]:::flow
Export3["3) DB fetch meeting summary"]:::flow
Export4["4) call Confluence API create/update"]:::flow
Export5["5) print success/failure"]:::flow
Export1 --> Export2 --> Export3 --> Export4 --> Export5
end

Main -.->|"drives"| List1
Main -.->|"drives"| Scrape1
Main -.->|"drives"| Export1
end

%% ==========================
%% Tooling / Scripts
%% ==========================
subgraph "Tooling (Not in normal runtime path)"
direction TB
ScriptsDir["scripts/ (maintenance & test utilities)"]:::tooling
ZipDBRec["zip recordings + DB\n(zip-recordings-and-db.py)"]:::tooling
ReplaceDBRec["replace recordings + DB file\n(replace-recordings-and-db-file.py)"]:::tooling
TestTemplates["test templates\n(test-all-templates.py)"]:::tooling
TestToken["test Confluence token/auth\n(test-api-token.py)"]:::tooling

ScriptsDir --> ZipDBRec
ScriptsDir --> ReplaceDBRec
ScriptsDir --> TestTemplates
ScriptsDir --> TestToken

ZipDBRec -->|"reads/writes"| MeetilyDB2
ReplaceDBRec -->|"modifies"| MeetilyDB2
TestToken -->|"HTTPS (auth check)"| ConfluenceAPI
end

%% =======================
%% Click Events (Mappings)
%% =======================
click Main "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/main.py"
click Config "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/config.py"
click DBScraper "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/db_scraper.py"
click ConfluenceExporter "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/confluence_exporter.py"
click EnvTemplate "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/.env.example"
click Reqs "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/requirements.txt"
click ScriptsDir "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/tree/main/scripts/"
click ReplaceDBRec "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/scripts/replace-recordings-and-db-file.py"
click TestTemplates "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/scripts/test-all-templates.py"
click TestToken "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/scripts/test-api-token.py"
click ZipDBRec "https://github.com/jensrot/meeting-minutes-send-summary-to-confluence/blob/main/scripts/zip-recordings-and-db.py"

%% =======================
%% Styles
%% =======================
classDef actor fill:#E8F1FF,stroke:#2B66C6,stroke-width:1.5px,color:#0B1F3B
classDef internal fill:#D7ECFF,stroke:#2B66C6,stroke-width:1.5px,color:#0B1F3B
classDef datastore fill:#E9EEF2,stroke:#5B6770,stroke-width:1.5px,color:#1F2A33
classDef artifact fill:#F2F4F7,stroke:#667085,stroke-width:1.5px,color:#111827
classDef external fill:#FFE7CC,stroke:#C05621,stroke-width:1.5px,color:#3B1D0B
classDef note fill:#FFF7CC,stroke:#B7791F,stroke-width:1.5px,color:#3B2F0B
classDef flow fill:#EAF7EF,stroke:#2F855A,stroke-width:1.5px,color:#0B2B1A
classDef tooling fill:#F3E8FF,stroke:#6B46C1,stroke-width:1.5px,color:#1F103F
```
