# antiwork/gumroad architecture

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

- Interactive diagram: https://gitdiagram.com/antiwork/gumroad
- Repository: https://github.com/antiwork/gumroad

## Overview

Gumroad is a creator-commerce web application: creators offer products and consumers purchase and use them. The tree shows distinct product areas for checkout and charging, seller payment setup and payouts, tax calculation, product reviews, and audience messaging workflows. The principal purchase path is documented only at the product level in the README; sampled code does not show its full runtime orchestration. Review handling and workflow delivery have clearer local evidence, so only their demonstrated links are shown. Some capability links remain unverified because their controllers or integrations were not sampled.

Main entry points: [`app/controllers/checkout_controller.rb`](https://github.com/antiwork/gumroad/blob/main/app/controllers/checkout_controller.rb) (Checkout), [`app/controllers/application_controller.rb`](https://github.com/antiwork/gumroad/blob/main/app/controllers/application_controller.rb) (Gumroad app), [`app/business/payments/payouts/payouts.rb`](https://github.com/antiwork/gumroad/blob/main/app/business/payments/payouts/payouts.rb) (Payouts), [`app/services/save_installment_service.rb`](https://github.com/antiwork/gumroad/blob/main/app/services/save_installment_service.rb) (Installment editing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commerce["Selling products"]
  node_gumroad["Gumroad app"]
  node_checkout["Checkout"]
  node_catalog["Products and pages"]
  node_purchases["Purchases"]
  node_custom_html_preview["Agent page preview"]
end

subgraph group_payments["Payments and finance"]
  node_charging["Payment charging"]
  node_merchant_setup["Merchant setup"]
  node_payouts["Payouts<br/>[payouts.rb]"]
  node_sales_tax["Sales tax"]
  node_reports["Finance reports"]
end

subgraph group_audience["Audience engagement"]
  node_installment_editor["Installment editing"]
  node_workflow_editor["Workflow editing"]
  node_installment_search["Installment search"]
  node_workflow_delivery["Workflow delivery"]
end

subgraph group_reviews["Product reviews"]
  node_review_api["Review API"]
  node_review_page["Review submissions"]
  node_review_video["Review video capture"]
  node_review_reminders["Review reminders"]
end

node_creators(("Creators"))
node_consumers(("Consumers"))

node_creators -->|"sell products"| node_gumroad
node_consumers -->|"buy products"| node_gumroad
node_gumroad -.->|"offers checkout"| node_checkout
node_checkout -.->|"charges payment"| node_charging
node_checkout -.->|"calculates tax"| node_sales_tax
node_merchant_setup -.->|"enables payouts"| node_payouts
node_payouts -.->|"reports finance"| node_reports
node_installment_editor -.->|"searches installments"| node_installment_search
node_workflow_editor -.->|"schedules delivery"| node_workflow_delivery
node_workflow_delivery -->|"sends installment"| node_installment_editor
node_review_page -->|"fetches product"| node_catalog
node_review_video -.->|"submits video review"| node_review_page
node_review_reminders -.->|"updates opt-out"| node_consumers
node_custom_html_preview -->|"previews page edits"| node_creators

click node_gumroad "https://github.com/antiwork/gumroad/blob/main/app/controllers/application_controller.rb"
click node_checkout "https://github.com/antiwork/gumroad/blob/main/app/controllers/checkout_controller.rb"
click node_catalog "https://github.com/antiwork/gumroad/tree/main/app/controllers/products"
click node_purchases "https://github.com/antiwork/gumroad/blob/main/app/controllers/purchases_controller.rb"
click node_charging "https://github.com/antiwork/gumroad/tree/main/app/business/payments/charging"
click node_merchant_setup "https://github.com/antiwork/gumroad/blob/main/app/business/payments/merchant_registration/implementations/stripe/stripe_merchant_account_manager.rb"
click node_payouts "https://github.com/antiwork/gumroad/blob/main/app/business/payments/payouts/payouts.rb"
click node_sales_tax "https://github.com/antiwork/gumroad/blob/main/app/business/sales_tax/sales_tax_calculator.rb"
click node_reports "https://github.com/antiwork/gumroad/tree/main/app/business/payments/reports"
click node_installment_editor "https://github.com/antiwork/gumroad/blob/main/app/services/save_installment_service.rb"
click node_workflow_editor "https://github.com/antiwork/gumroad/blob/main/app/services/workflow/save_installments_service.rb"
click node_installment_search "https://github.com/antiwork/gumroad/blob/main/app/services/installment_search_service.rb"
click node_workflow_delivery "https://github.com/antiwork/gumroad/blob/main/app/sidekiq/send_workflow_installment_worker.rb"
click node_review_api "https://github.com/antiwork/gumroad/blob/main/app/controllers/api/v2/product_reviews_controller.rb"
click node_review_page "https://github.com/antiwork/gumroad/blob/main/app/controllers/product_reviews_controller.rb"
click node_review_video "https://github.com/antiwork/gumroad/blob/main/app/javascript/components/ReviewForm/ReviewVideoRecorderClientOnly.tsx"
click node_review_reminders "https://github.com/antiwork/gumroad/blob/main/app/controllers/users/review_reminders_controller.rb"
click node_custom_html_preview "https://github.com/antiwork/gumroad/blob/main/app/controllers/api/internal/agent_custom_html_previews_controller.rb"

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_gumroad,node_checkout,node_catalog,node_purchases,node_custom_html_preview toneBlue
class node_charging,node_merchant_setup,node_payouts,node_sales_tax,node_reports toneAmber
class node_installment_editor,node_workflow_editor,node_installment_search,node_workflow_delivery toneMint
class node_review_api,node_review_page,node_review_video,node_review_reminders toneRose
class node_creators,node_consumers toneIndigo
```

## Components

### Selling products

- [Gumroad app](https://github.com/antiwork/gumroad/blob/main/app/controllers/application_controller.rb): `app/controllers/application_controller.rb`
- [Checkout](https://github.com/antiwork/gumroad/blob/main/app/controllers/checkout_controller.rb): `app/controllers/checkout_controller.rb`
- [Products and pages](https://github.com/antiwork/gumroad/tree/main/app/controllers/products): `app/controllers/products`
- [Purchases](https://github.com/antiwork/gumroad/blob/main/app/controllers/purchases_controller.rb): `app/controllers/purchases_controller.rb`
- [Agent page preview](https://github.com/antiwork/gumroad/blob/main/app/controllers/api/internal/agent_custom_html_previews_controller.rb): `app/controllers/api/internal/agent_custom_html_previews_controller.rb`

### Payments and finance

- [Payment charging](https://github.com/antiwork/gumroad/tree/main/app/business/payments/charging): `app/business/payments/charging`
- [Merchant setup](https://github.com/antiwork/gumroad/blob/main/app/business/payments/merchant_registration/implementations/stripe/stripe_merchant_account_manager.rb): `app/business/payments/merchant_registration/implementations/stripe/stripe_merchant_account_manager.rb`
- [Payouts](https://github.com/antiwork/gumroad/blob/main/app/business/payments/payouts/payouts.rb): `app/business/payments/payouts/payouts.rb`
- [Sales tax](https://github.com/antiwork/gumroad/blob/main/app/business/sales_tax/sales_tax_calculator.rb): `app/business/sales_tax/sales_tax_calculator.rb`
- [Finance reports](https://github.com/antiwork/gumroad/tree/main/app/business/payments/reports): `app/business/payments/reports`

### Audience engagement

- [Installment editing](https://github.com/antiwork/gumroad/blob/main/app/services/save_installment_service.rb): `app/services/save_installment_service.rb`
- [Workflow editing](https://github.com/antiwork/gumroad/blob/main/app/services/workflow/save_installments_service.rb): `app/services/workflow/save_installments_service.rb`
- [Installment search](https://github.com/antiwork/gumroad/blob/main/app/services/installment_search_service.rb): `app/services/installment_search_service.rb`
- [Workflow delivery](https://github.com/antiwork/gumroad/blob/main/app/sidekiq/send_workflow_installment_worker.rb): `app/sidekiq/send_workflow_installment_worker.rb`

### Product reviews

- [Review API](https://github.com/antiwork/gumroad/blob/main/app/controllers/api/v2/product_reviews_controller.rb): `app/controllers/api/v2/product_reviews_controller.rb`
- [Review submissions](https://github.com/antiwork/gumroad/blob/main/app/controllers/product_reviews_controller.rb): `app/controllers/product_reviews_controller.rb`
- [Review video capture](https://github.com/antiwork/gumroad/blob/main/app/javascript/components/ReviewForm/ReviewVideoRecorderClientOnly.tsx): `app/javascript/components/ReviewForm/ReviewVideoRecorderClientOnly.tsx`
- [Review reminders](https://github.com/antiwork/gumroad/blob/main/app/controllers/users/review_reminders_controller.rb): `app/controllers/users/review_reminders_controller.rb`

### Other components

- **Creators**
- **Consumers**

## Connections

- Creators → Gumroad app: sell products (evidence: `README.md`)
- Consumers → Gumroad app: buy products (evidence: `README.md`)
- Gumroad app → Checkout: offers checkout
- Checkout → Payment charging: charges payment
- Checkout → Sales tax: calculates tax
- Merchant setup → Payouts: enables payouts
- Payouts → Finance reports: reports finance
- Installment editing → Installment search: searches installments
- Workflow editing → Workflow delivery: schedules delivery
- Workflow delivery → Installment editing: sends installment (evidence: `app/sidekiq/send_workflow_installment_worker.rb`)
- Review submissions → Products and pages: fetches product (evidence: `app/controllers/product_reviews_controller.rb`)
- Review video capture → Review submissions: submits video review
- Review reminders → Consumers: updates opt-out
- Agent page preview → Creators: previews page edits (evidence: `app/controllers/api/internal/agent_custom_html_previews_controller.rb`)
