# revautomationid/catatan-keuangan architecture

> Architecture diagram of the GitHub repository revautomationid/catatan-keuangan, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/revautomationid/catatan-keuangan
- Repository: https://github.com/revautomationid/catatan-keuangan

## Overview

Catatan Keuangan is an n8n WhatsApp expense-tracking assistant: users send text or receipt photos, and receive concise replies after recording, reviewing, summarizing, or deleting expenses. The README documents WhatsApp, OpenAI, and PostgreSQL integrations. The workflow JSON is present, but its contents were not sampled, so internal node-level routing is not verified; the diagram shows only documented responsibilities and relationships.

Main entry points: [`catatan-keuangan-shared.json`](https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json) (n8n workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Message intake"]
  node_workflow["n8n workflow"]
end

subgraph group_processing["Expense handling"]
  node_text_capture["Text capture"]
  node_receipt_capture["Receipt capture"]
  node_summary["Period summary"]
  node_listing["Transaction listing"]
  node_deletion["Transaction deletion"]
end

subgraph group_storage["Expense data"]
  node_postgres[("PostgreSQL")]
end

subgraph group_integration["External services"]
  node_wa["WhatsApp API"]
  node_openai["OpenAI API"]
end

node_user(("WhatsApp user"))

node_user -->|"sends message"| node_wa
node_wa -->|"delivers webhook"| node_workflow
node_workflow -->|"handles text"| node_text_capture
node_workflow -->|"handles photo"| node_receipt_capture
node_workflow -->|"handles query"| node_summary
node_workflow -->|"handles query"| node_listing
node_workflow -->|"handles request"| node_deletion
node_workflow -->|"uses AI"| node_openai
node_text_capture -->|"records expense"| node_postgres
node_receipt_capture -->|"records expense"| node_postgres
node_summary -->|"reads totals"| node_postgres
node_listing -->|"reads transactions"| node_postgres
node_deletion -->|"deletes transaction"| node_postgres
node_workflow -->|"sends reply"| node_wa
node_wa -->|"delivers reply"| node_user

click node_workflow "https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json"
click node_text_capture "https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json"
click node_receipt_capture "https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json"
click node_summary "https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json"
click node_listing "https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json"
click node_deletion "https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json"

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_workflow,node_user toneBlue
class node_text_capture,node_receipt_capture,node_summary,node_listing,node_deletion toneAmber
class node_postgres toneMint
class node_wa,node_openai toneRose
```

## Components

### Message intake

- [n8n workflow](https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json): `catatan-keuangan-shared.json`

### Expense handling

- [Text capture](https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json): `catatan-keuangan-shared.json`
- [Receipt capture](https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json): `catatan-keuangan-shared.json`
- [Period summary](https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json): `catatan-keuangan-shared.json`
- [Transaction listing](https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json): `catatan-keuangan-shared.json`
- [Transaction deletion](https://github.com/revautomationid/catatan-keuangan/blob/main/catatan-keuangan-shared.json): `catatan-keuangan-shared.json`

### Expense data

- **PostgreSQL**

### External services

- **WhatsApp API**
- **OpenAI API**

### Other components

- **WhatsApp user**

## Connections

- WhatsApp user → WhatsApp API: sends message
- WhatsApp API → n8n workflow: delivers webhook
- n8n workflow → Text capture: handles text
- n8n workflow → Receipt capture: handles photo
- n8n workflow → Period summary: handles query
- n8n workflow → Transaction listing: handles query
- n8n workflow → Transaction deletion: handles request
- n8n workflow → OpenAI API: uses AI
- Text capture → PostgreSQL: records expense
- Receipt capture → PostgreSQL: records expense
- Period summary → PostgreSQL: reads totals
- Transaction listing → PostgreSQL: reads transactions
- Transaction deletion → PostgreSQL: deletes transaction
- n8n workflow → WhatsApp API: sends reply
- WhatsApp API → WhatsApp user: delivers reply
