# whoevenisshubham/transactx architecture

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

- Interactive diagram: https://gitdiagram.com/whoevenisshubham/transactx
- Repository: https://github.com/whoevenisshubham/transactx

## Overview

TransactX is a distributed-payment reliability product: customers and merchants initiate or inspect simulated transfers, while operators examine outcomes and evidence. The principal path spans the React workspaces, Go API, central payment kernel, independent bank participants, and durable recovery; operator workflows add reconciliation, integrity proofs, projections, and grounded investigations. The README documents these domain relationships, but most implementation excerpts are absent, so the graph keeps those links at documented subsystem level rather than asserting unobserved internal calls.

Main entry points: [`backend/internal/payments/service.go`](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/payments/service.go) (Payment Service), [`frontend/src/console.tsx`](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/frontend/src/console.tsx) (React Workspaces), [`backend/internal/bankservice/service.go`](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/bankservice/service.go) (Bank Participants), [`backend/internal/http/handler.go`](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/http/handler.go) (HTTP API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User Workspaces"]
  node_frontend["React Workspaces<br/>[console.tsx]"]
  node_offline["Offline Intents<br/>[offlineQueue.ts]"]
end

subgraph group_payment["Payment Kernel"]
  node_api["HTTP API<br/>[handler.go]"]
  node_payments["Payment Service<br/>[service.go]"]
  node_routing["Bank Routing<br/>[routing.go]"]
  node_participants["Bank Participants<br/>[service.go]"]
end

subgraph group_reliability["Recovery and Evidence"]
  node_recovery["Durable Recovery<br/>[scheduler.go]"]
  node_outbox["Event Outbox<br/>[dispatcher.go]"]
  node_projections["Operator Projections<br/>[projector.go]"]
  node_reconciliation["Reconciliation<br/>[engine.go]"]
  node_integrity["Integrity and Merkle<br/>[merkle.go]"]
end

subgraph group_operator["Operator Intelligence"]
  node_investigator["Grounded Investigations<br/>[service.go]"]
  node_analytics["Analytics and Anomaly<br/>[repository.go]"]
  node_experiments["Reliability Experiments<br/>[main.go]"]
end

subgraph group_persistence["Financial Records"]
  node_postgres[("PostgreSQL<br/>[database.go]")]
  node_ledger[("Double-Entry Ledger<br/>[repository.go]")]
end

node_customer(("Customer"))
node_merchant(("Merchant"))
node_operator_user(("Operator"))

node_customer -->|"uses"| node_frontend
node_merchant -->|"uses"| node_frontend
node_operator_user -->|"uses"| node_frontend
node_frontend -->|"requests"| node_api
node_frontend -->|"queues intents"| node_offline
node_api -->|"handles payments"| node_payments
node_payments -->|"routes payments"| node_routing
node_payments -->|"coordinates"| node_participants
node_participants -->|"provides observations"| node_recovery
node_recovery -->|"checks operations"| node_participants
node_payments -->|"records entries"| node_ledger
node_payments -->|"persists state"| node_postgres
node_payments -->|"records events"| node_outbox
node_outbox -->|"feeds events"| node_projections
node_operator_user -->|"inspects comparisons"| node_reconciliation
node_operator_user -->|"checks proofs"| node_integrity
node_operator_user -->|"asks questions"| node_investigator
node_investigator -->|"stores reports"| node_postgres
node_operator_user -->|"reviews analytics"| node_analytics
node_experiments -->|"simulates failures"| node_participants

click node_frontend "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/frontend/src/console.tsx"
click node_offline "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/frontend/src/offlineQueue.ts"
click node_api "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/http/handler.go"
click node_payments "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/payments/service.go"
click node_routing "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/payments/routing.go"
click node_participants "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/bankservice/service.go"
click node_recovery "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/recovery/scheduler.go"
click node_outbox "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/outbox/dispatcher.go"
click node_projections "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/projections/projector.go"
click node_reconciliation "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/reconciliation/engine.go"
click node_integrity "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/reconciliation/merkle.go"
click node_investigator "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/investigator/service.go"
click node_analytics "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/analytics/repository.go"
click node_experiments "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/cmd/experiments/main.go"
click node_postgres "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/database/database.go"
click node_ledger "https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/ledger/repository.go"

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_frontend,node_offline toneBlue
class node_api,node_payments,node_routing,node_participants toneAmber
class node_recovery,node_outbox,node_projections,node_reconciliation,node_integrity toneMint
class node_investigator,node_analytics,node_experiments toneRose
class node_postgres,node_ledger,node_customer,node_merchant,node_operator_user toneIndigo
```

## Components

### User Workspaces

- [React Workspaces](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/frontend/src/console.tsx): `frontend/src/console.tsx`
- [Offline Intents](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/frontend/src/offlineQueue.ts): `frontend/src/offlineQueue.ts`

### Payment Kernel

- [HTTP API](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/http/handler.go): `backend/internal/http/handler.go`
- [Payment Service](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/payments/service.go): `backend/internal/payments/service.go`
- [Bank Routing](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/payments/routing.go): `backend/internal/payments/routing.go`
- [Bank Participants](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/bankservice/service.go): `backend/internal/bankservice/service.go`

### Recovery and Evidence

- [Durable Recovery](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/recovery/scheduler.go): `backend/internal/recovery/scheduler.go`
- [Event Outbox](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/outbox/dispatcher.go): `backend/internal/outbox/dispatcher.go`
- [Operator Projections](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/projections/projector.go): `backend/internal/projections/projector.go`
- [Reconciliation](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/reconciliation/engine.go): `backend/internal/reconciliation/engine.go`
- [Integrity and Merkle](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/reconciliation/merkle.go): `backend/internal/reconciliation/merkle.go`

### Operator Intelligence

- [Grounded Investigations](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/investigator/service.go): `backend/internal/investigator/service.go`
- [Analytics and Anomaly](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/analytics/repository.go): `backend/internal/analytics/repository.go`
- [Reliability Experiments](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/cmd/experiments/main.go): `backend/cmd/experiments/main.go`

### Financial Records

- [PostgreSQL](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/database/database.go): `backend/internal/database/database.go`
- [Double-Entry Ledger](https://github.com/whoevenisshubham/transactx/blob/release/transactx-v2/backend/internal/ledger/repository.go): `backend/internal/ledger/repository.go`

### Other components

- **Customer**
- **Merchant**
- **Operator**

## Connections

- Customer → React Workspaces: uses (evidence: `README.md`)
- Merchant → React Workspaces: uses (evidence: `README.md`)
- Operator → React Workspaces: uses (evidence: `README.md`)
- React Workspaces → HTTP API: requests (evidence: `README.md`)
- React Workspaces → Offline Intents: queues intents (evidence: `README.md`)
- HTTP API → Payment Service: handles payments (evidence: `README.md`)
- Payment Service → Bank Routing: routes payments (evidence: `README.md`)
- Payment Service → Bank Participants: coordinates (evidence: `README.md`)
- Bank Participants → Durable Recovery: provides observations (evidence: `README.md`)
- Durable Recovery → Bank Participants: checks operations (evidence: `README.md`)
- Payment Service → Double-Entry Ledger: records entries (evidence: `README.md`)
- Payment Service → PostgreSQL: persists state (evidence: `README.md`)
- Payment Service → Event Outbox: records events (evidence: `README.md`)
- Event Outbox → Operator Projections: feeds events (evidence: `README.md`)
- Operator → Reconciliation: inspects comparisons (evidence: `README.md`)
- Operator → Integrity and Merkle: checks proofs (evidence: `README.md`)
- Operator → Grounded Investigations: asks questions (evidence: `README.md`)
- Grounded Investigations → PostgreSQL: stores reports (evidence: `README.md`)
- Operator → Analytics and Anomaly: reviews analytics (evidence: `README.md`)
- Reliability Experiments → Bank Participants: simulates failures (evidence: `backend/cmd/experiments/main.go`)
