# edwinariesto/stellar-social-donation-and-reward architecture

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

- Interactive diagram: https://gitdiagram.com/edwinariesto/stellar-social-donation-and-reward
- Repository: https://github.com/edwinariesto/stellar-social-donation-and-reward

## Overview

StelDot is a Stellar/Soroban donation-and-loyalty dApp. Donors connect a wallet, browse and fund campaigns, then claim on-chain rewards after meeting the threshold; owners manage campaigns and treasury, and the app also supports referral rewards, vouchers, and VIP attendance. The React app coordinates contract calls through the Stellar utility layer, while the Rust contract owns campaign and reward state. The sampled excerpts show principal calls and event-reading behavior; some additional capabilities are included from the README, whose implementation details were not sampled.

Main entry points: [`src/App.jsx`](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx) (dApp interface), [`src/utils/stellar.js`](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/utils/stellar.js) (Stellar utilities), [`contracts/donation/src/lib.rs`](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/contracts/donation/src/lib.rs) (Donation contract), [`src/main.jsx`](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/main.jsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["dApp interface<br/>[App.jsx]"]
  node_campaigns["Campaign management<br/>[App.jsx]"]
  node_rewards["Donations and rewards<br/>[App.jsx]"]
  node_voucher["Voucher and VIP tools<br/>[App.jsx]"]
  node_history["Activity and analytics<br/>[App.jsx]"]
  node_language["Translations<br/>[i18n.js]"]
  node_splash["Splash screen<br/>[SplashScreen.jsx]"]
  node_clouds["Cloud background<br/>[AnimatedClouds.jsx]"]
end

subgraph group_chain["Soroban contract"]
  node_contract["Donation contract<br/>[lib.rs]"]
  node_state[("Contract state<br/>[lib.rs]")]
end

subgraph group_integration["Wallet and network"]
  node_sac["Native XLM SAC"]
  node_stellar["Stellar utilities<br/>[stellar.js]"]
  node_wallet["Freighter wallet"]
  node_stellar_network["Stellar RPC / Horizon"]
  node_google_translate["Google Translate"]
end

node_donor(("Donor"))
node_owner(("Owner / cashier"))

node_entry -->|"renders"| node_app
node_app -->|"renders"| node_splash
node_app -->|"renders"| node_clouds
node_app -->|"uses translations"| node_language
node_donor -->|"uses"| node_app
node_owner -->|"uses"| node_app
node_app -->|"presents"| node_campaigns
node_app -->|"presents"| node_rewards
node_app -->|"presents"| node_voucher
node_app -->|"presents"| node_history
node_campaigns -.->|"submits calls"| node_stellar
node_rewards -->|"submits calls"| node_stellar
node_voucher -->|"submits calls"| node_stellar
node_history -->|"fetches activity"| node_stellar
node_stellar -->|"requests access and signs"| node_wallet
node_stellar -->|"queries and submits"| node_stellar_network
node_stellar -->|"invokes contract"| node_contract
node_contract -->|"reads and writes"| node_state
node_contract -->|"checks balance and transfers"| node_sac
node_google_translate -.->|"translates campaign text"| node_app

click node_entry "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/main.jsx"
click node_app "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx"
click node_campaigns "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx"
click node_rewards "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx"
click node_voucher "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx"
click node_history "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx"
click node_language "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/utils/i18n.js"
click node_splash "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/components/SplashScreen.jsx"
click node_clouds "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/components/AnimatedClouds.jsx"
click node_contract "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/contracts/donation/src/lib.rs"
click node_state "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/contracts/donation/src/lib.rs"
click node_stellar "https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/utils/stellar.js"

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_entry,node_app,node_campaigns,node_rewards,node_voucher,node_history,node_language,node_splash,node_clouds toneBlue
class node_contract,node_state toneAmber
class node_sac,node_stellar,node_wallet,node_stellar_network,node_google_translate toneMint
class node_donor,node_owner toneIndigo
```

## Components

### Web application

- [React entry](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/main.jsx): `src/main.jsx`
- [dApp interface](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx): `src/App.jsx`
- [Campaign management](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx): `src/App.jsx`
- [Donations and rewards](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx): `src/App.jsx`
- [Voucher and VIP tools](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx): `src/App.jsx`
- [Activity and analytics](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/App.jsx): `src/App.jsx`
- [Translations](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/utils/i18n.js): `src/utils/i18n.js`
- [Splash screen](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/components/SplashScreen.jsx): `src/components/SplashScreen.jsx`
- [Cloud background](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/components/AnimatedClouds.jsx): `src/components/AnimatedClouds.jsx`

### Soroban contract

- [Donation contract](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/contracts/donation/src/lib.rs): `contracts/donation/src/lib.rs`
- [Contract state](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/contracts/donation/src/lib.rs): `contracts/donation/src/lib.rs`

### Wallet and network

- **Native XLM SAC**
- [Stellar utilities](https://github.com/edwinariesto/stellar-social-donation-and-reward/blob/main/src/utils/stellar.js): `src/utils/stellar.js`
- **Freighter wallet**
- **Stellar RPC / Horizon**
- **Google Translate**

### Other components

- **Donor**
- **Owner / cashier**

## Connections

- React entry → dApp interface: renders (evidence: `src/main.jsx`)
- dApp interface → Splash screen: renders (evidence: `src/App.jsx`)
- dApp interface → Cloud background: renders (evidence: `src/App.jsx`)
- dApp interface → Translations: uses translations (evidence: `src/App.jsx`)
- Donor → dApp interface: uses (evidence: `README.md`)
- Owner / cashier → dApp interface: uses (evidence: `README.md`)
- dApp interface → Campaign management: presents (evidence: `README.md`)
- dApp interface → Donations and rewards: presents (evidence: `README.md`)
- dApp interface → Voucher and VIP tools: presents (evidence: `README.md`)
- dApp interface → Activity and analytics: presents (evidence: `README.md`)
- Campaign management → Stellar utilities: submits calls (evidence: `src/App.jsx`)
- Donations and rewards → Stellar utilities: submits calls (evidence: `src/App.jsx`)
- Voucher and VIP tools → Stellar utilities: submits calls (evidence: `src/App.jsx`)
- Activity and analytics → Stellar utilities: fetches activity (evidence: `src/App.jsx`)
- Stellar utilities → Freighter wallet: requests access and signs (evidence: `src/utils/stellar.js`)
- Stellar utilities → Stellar RPC / Horizon: queries and submits (evidence: `src/utils/stellar.js`)
- Stellar utilities → Donation contract: invokes contract (evidence: `src/utils/stellar.js`)
- Donation contract → Contract state: reads and writes (evidence: `contracts/donation/src/lib.rs`)
- Donation contract → Native XLM SAC: checks balance and transfers (evidence: `contracts/donation/src/lib.rs`)
- Google Translate → dApp interface: translates campaign text (evidence: `README.md`)
