# funsol-projects/funsol-billing-helper architecture

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

- Interactive diagram: https://gitdiagram.com/funsol-projects/funsol-billing-helper
- Repository: https://github.com/funsol-projects/funsol-billing-helper

## Overview

This repository is a small Android sample app bundled with the Funsol Billing Helper as a prebuilt AAR. Its main workflow is an app Activity initializing the helper, presenting product and offer details, and starting purchases through Google Play; the helper also supports subscription changes, purchase handling, history, and premium checks. The helper’s implementation is opaque here, so its documented capabilities are represented without inferring internal calls or stages. The README identifies Room as the purchase-history dependency, but its integration is not visible in source.

Main entry points: [`app/src/main/java/com/billing/funsolbillinghelper/MainActivity.kt`](https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/src/main/java/com/billing/funsolbillinghelper/MainActivity.kt) (Main Activity), [`app/libs/FunsolBillingLibrary.aar`](https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar) (Billing helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sample["Sample app"]
  node_activity["Main Activity<br/>[MainActivity.kt]"]
end

subgraph group_billing["Billing capabilities"]
  node_helper["Billing helper"]
  node_product_info["Product prices"]
  node_purchase_ops["Purchase operations"]
  node_purchase_history[("Purchase history")]
  node_premium["Premium status"]
end

subgraph group_services["External services"]
  node_play["Google Play Billing"]
  node_room[("Room storage")]
end

node_user(("App user"))

node_user -->|"uses"| node_activity
node_activity -->|"initializes"| node_helper
node_activity -->|"requests prices"| node_product_info
node_activity -->|"starts purchases"| node_purchase_ops
node_helper -->|"uses billing"| node_play
node_helper -->|"maintains history"| node_purchase_history
node_purchase_history -.->|"uses storage"| node_room
node_activity -->|"checks status"| node_premium

click node_activity "https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/src/main/java/com/billing/funsolbillinghelper/MainActivity.kt"
click node_helper "https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar"
click node_product_info "https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar"
click node_purchase_ops "https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar"
click node_purchase_history "https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar"
click node_premium "https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar"

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_activity,node_user toneBlue
class node_helper,node_product_info,node_purchase_ops,node_purchase_history,node_premium toneAmber
class node_play,node_room toneMint
```

## Components

### Sample app

- [Main Activity](https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/src/main/java/com/billing/funsolbillinghelper/MainActivity.kt): `app/src/main/java/com/billing/funsolbillinghelper/MainActivity.kt`

### Billing capabilities

- [Billing helper](https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar): `app/libs/FunsolBillingLibrary.aar`
- [Product prices](https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar): `app/libs/FunsolBillingLibrary.aar`
- [Purchase operations](https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar): `app/libs/FunsolBillingLibrary.aar`
- [Purchase history](https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar): `app/libs/FunsolBillingLibrary.aar`
- [Premium status](https://github.com/funsol-projects/funsol-billing-helper/blob/master/app/libs/FunsolBillingLibrary.aar): `app/libs/FunsolBillingLibrary.aar`

### External services

- **Google Play Billing**
- **Room storage**

### Other components

- **App user**

## Connections

- App user → Main Activity: uses (evidence: `README.md`)
- Main Activity → Billing helper: initializes (evidence: `app/src/main/java/com/billing/funsolbillinghelper/MainActivity.kt`)
- Main Activity → Product prices: requests prices (evidence: `README.md`)
- Main Activity → Purchase operations: starts purchases (evidence: `README.md`)
- Billing helper → Google Play Billing: uses billing (evidence: `README.md`)
- Billing helper → Purchase history: maintains history (evidence: `README.md`)
- Purchase history → Room storage: uses storage (evidence: `README.md`)
- Main Activity → Premium status: checks status (evidence: `README.md`)
