Offline-first fintech wallet & bookkeeping platform for African market traders đŹđ
# đŠ CashBridge Sandbox Portal
> **Production-Ready Offline-First Wallet & Bookkeeping App for African Informal Markets**
>
> CashBridge bridges Ghanaian market women, informal traders, and mobile money agents with stable payment rails (MTN MoMo, Paystack) and local-first data indexing, surviving any internet disruption gracefully.
---
## đïž Core Architecture Overview
CashBridge is structured intentionally into two completely independent projects to preserve separation of concerns, allow clean horizontal autoscaling, and target distinct deployment runtimes:
```
ââââââââââââââââââââââââââââââââââââââââââââââââ
â CASHBRIDGE CLIENT DESKTOP / PWA â
â (React 19 + Zustand state + IndexedDB local)â
ââââââââââââââââââââââââŹââââââââââââââââââââââââ
â
[Pushes Queued Local Transactions]
[Retrieves Real-time Mobile Balance]
â
âŒ
ââââââââââââââââââââââââââââââââââââââââââââââââ
â EXPRESS.JS BACKEND RUNTIME â
â (Secured by Helmet, Rate-Limit & JWT) â
ââââââââââââââââââââââââŹââââââââââââââââââââââââ
â
ââââââââââââââââââââââââŽâââââââââââââââââââââââ
⌠âŒ
ââââââââââââââââââââââââââââââââââââ ââââââââââââââââââââââââââââââââââââ
â SUPABASE POSTGRES DB â â THIRD-PARTY PAYMENT INGRESS â
â (RLS protection, triggers) â â (MTN MoMo Sandbox, Paystack) â
ââââââââââââââââââââââââââââââââââââ ââââââââââââââââââââââââââââââââââââ
```
---
## đ Separated Directory Layouts
### đą 1. CashBridge Frontend (`cashbridge-frontend`)
A lightweight, mobile-first PWA serving interface components instantly.
```
cashbridge-frontend/
âââ public/
â âââ sw.js # PWA Service Worker caching core assets & shell
â âââ manifest.json # Webapp installation parameters for mobile screens
âââ src/
â âââ db/
â â âââ localDb.ts # IndexedDB wrapper for local transaction queues
â âââ hooks/
â â âââ useOfflineSync.ts # Network stat âŠ