# daws-90s/expense-mysql-v1 architecture

> Architecture diagram of the GitHub repository daws-90s/expense-mysql-v1, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/daws-90s/expense-mysql-v1
- Repository: https://github.com/daws-90s/expense-mysql-v1

## Overview

This repository supplies MySQL schema migrations and seed data for the Expense Tracker. Its documented workflow is container startup triggering the SQL files in numeric order; the README specifically describes the initial tables/indexes and default-category seed. Later migrations are represented by their filenames only, so their detailed behavior and relationships are not inferred. No source excerpts were provided.

Main entry points: [`migrations/001_init.sql`](https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/001_init.sql) (Core schema), [`migrations/002_seed_categories.sql`](https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/002_seed_categories.sql) (Default categories), [`migrations/003_metrics_user.sql`](https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/003_metrics_user.sql) (Metrics user), [`migrations/004_json_error_log.sql`](https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/004_json_error_log.sql) (JSON error log)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_mysql[("MySQL container")]
node_init["Core schema<br/>[001_init.sql]"]
node_categories["Default categories"]
node_metrics["Metrics user"]
node_jsonlog["JSON error log"]
node_rca["RCA read-only user"]

node_mysql -->|"applies on startup"| node_init
node_mysql -->|"applies on startup"| node_categories
node_mysql -->|"applies on startup"| node_metrics
node_mysql -->|"applies on startup"| node_jsonlog
node_mysql -->|"applies on startup"| node_rca

click node_init "https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/001_init.sql"
click node_categories "https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/002_seed_categories.sql"
click node_metrics "https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/003_metrics_user.sql"
click node_jsonlog "https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/004_json_error_log.sql"
click node_rca "https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/005_rca_readonly_user.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_mysql toneAmber
class node_init,node_categories,node_jsonlog toneTeal
class node_metrics,node_rca toneBlue
```

## Components

### Other components

- **MySQL container**
- [Core schema](https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/001_init.sql): `migrations/001_init.sql`
- [Default categories](https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/002_seed_categories.sql): `migrations/002_seed_categories.sql`
- [Metrics user](https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/003_metrics_user.sql): `migrations/003_metrics_user.sql`
- [JSON error log](https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/004_json_error_log.sql): `migrations/004_json_error_log.sql`
- [RCA read-only user](https://github.com/daws-90s/expense-mysql-v1/blob/main/migrations/005_rca_readonly_user.sql): `migrations/005_rca_readonly_user.sql`

## Connections

- MySQL container → Core schema: applies on startup (evidence: `README.md`)
- MySQL container → Default categories: applies on startup (evidence: `README.md`)
- MySQL container → Metrics user: applies on startup (evidence: `README.md`)
- MySQL container → JSON error log: applies on startup (evidence: `README.md`)
- MySQL container → RCA read-only user: applies on startup (evidence: `README.md`)
