Summary
A TypeScript/Bun CLI tool (sedekah) for developers to interact with the sedekah.je public API — search institutions, view details, render QR codes in the terminal, and onboard as a partner.
Phased Approach
Phase 1 — Minimal CLI
sedekah search "masjid" --state selangor --category masjid
sedekah random
sedekah info <slug>
sedekah qr <slug> # render QR code in terminal
Phase 2 — TUI (sedekah browse)
Two-pane OpenTUI interface:
- Left panel: Scrollable institution list with search + filter pills
- Right panel: Institution detail + inline QR code
- Live fuzzy search, keyboard nav (j/k), filter popup (state/category/payment)
o to open in browser, r for random, Tab to switch panes
TUI sketch: https://excalidraw.com/#json=4bfKTbIqWmy8m28aCbzoP,oZeSZNTD0FNpF3ZVwDZq2Q
Phase 3 — Partner Onboarding TUI (relates to #554)
Interactive wizard for partner registration and management:
sedekah partner register # step-by-step onboarding wizard
sedekah partner status # check registration/approval status
sedekah partner stats # view API usage, rate limits, request counts
sedekah partner key rotate # rotate API key
sedekah partner register wizard flow:
┌─────────────────────────────────────────────┐
│ sedekah — Partner Registration │
├─────────────────────────────────────────────┤
│ │
│ Step 1 of 4: About You │
│ │
│ App Name: SolatKini█ │
│ Email: dev@solatkini.my │
│ Website: https://solatkini.my │
│ │
│ ──────────────────────────────────────── │
│ Step 2 of 4: Use Case │
│ │
│ ○ Mosque finder / prayer app │
│ ● Donation aggregator │
│ ○ Community platform │
│ ○ Other │
│ │
│ Describe your integration: │
│ ┌─────────────────────────────────────┐ │
│ │ We want to add QR donations to our │ │
│ │ existing mosque directory... │ │
│ └─────────────────────────────────────┘ │
│ │
│ [Back] [Next] [Cancel] │
└─────────────────────────────────────────────┘
On approval, the CLI can store the API key locally (~/.config/sedekah/credentials.json) and unlock partner-only commands:
sedekah institutions --limit 200 # higher rate limits
sedekah bulk export # cursor-based full sync
sedekah submit <institution> # submit via partner API
API Surface (REST)
Tech Stack
Phase 1 — CLI
- Runtime: Bun (compile to single binary via
bun build --compile)
- Arg parsing:
commander or citty
- QR rendering:
qrcode-terminal
- HTTP: native
fetch
- Output:
--json flag for machine-readable output
Phase 2 & 3 — TUI
- Framework: OpenTUI with
@opentui/react
- Components: opentui-ui component library
- Scaffold:
bun create tui
Distribution
- GitHub Releases — single compiled binary per platform (linux/mac/windows)
- npm —
bunx sedekah / npx sedekah
- Homebrew tap —
brew install khrnchn/tap/sedekah (stretch goal)
References
Notes
- Hits the REST API (simpler than MCP JSON-RPC for a CLI client)
- No DB needed — stateless thin client over existing sedekah.je API
- The killer feature: scan and donate without leaving the terminal
- Partner onboarding via TUI gives devs a native-feeling registration experience
Summary
A TypeScript/Bun CLI tool (
sedekah) for developers to interact with the sedekah.je public API — search institutions, view details, render QR codes in the terminal, and onboard as a partner.Phased Approach
Phase 1 — Minimal CLI
Phase 2 — TUI (
sedekah browse)Two-pane OpenTUI interface:
oto open in browser,rfor random,Tabto switch panesTUI sketch: https://excalidraw.com/#json=4bfKTbIqWmy8m28aCbzoP,oZeSZNTD0FNpF3ZVwDZq2Q
Phase 3 — Partner Onboarding TUI (relates to #554)
Interactive wizard for partner registration and management:
sedekah partner registerwizard flow:On approval, the CLI can store the API key locally (
~/.config/sedekah/credentials.json) and unlock partner-only commands:API Surface (REST)
GET /api/institutions— paginated list with search, category, state filtersGET /api/random— random institutionTech Stack
Phase 1 — CLI
bun build --compile)commanderorcittyqrcode-terminalfetch--jsonflag for machine-readable outputPhase 2 & 3 — TUI
@opentui/reactbun create tuiDistribution
bunx sedekah/npx sedekahbrew install khrnchn/tap/sedekah(stretch goal)References
Notes