Logo Lanfrica

Mdia92/pulse-dashboard

Domain:

socioeconomic

Record type:

software
Creator:
Mdi
Host:
Live Demand Intelligence for African Informal Commerce # Pulse — Live Demand Intelligence B2B dashboard for West African mobile-money merchants. Next.js frontend with **DynamoDB** (transaction event stream) and **Aurora DSQL** (merchant directory, subscriptions, agent drafts). ## Architectural Highlights 1. **Dual-DB Engine** — **DynamoDB** ingests high-throughput mobile-money transaction event streams via single-table design (`merchant_zone#hour` + `txn_id`, GSI on `category#hour`). **Aurora DSQL** holds multi-region active-active relational state: merchant directory, subscriptions, and agent message approval queue — the right database for each access pattern, not a one-size-fits-all Postgres dump. 2. **Sub-Second Lookbacks** — Live demand and anomaly detection run **parallel partition and GSI-backed hour lookbacks** across the last 3 hour buckets. Queries execute in **under 310ms** end-to-end, computing hour-over-hour `deltaPct` spikes (e.g. beverages +240%) without mock data or hardcoded rules. 3. **Production-Ready Multimodal Pipeline** — Paper ledger → structured transactions is fully scaffolded via **Amazon Bedrock Nova Lite** (`amazon.nova-lite-v1:0`, vision extraction → DynamoDB `PutItem`). The pipeline is code-complete in `src/lib/ingest_ledger.ts`; deployment is gated on **AWS enterprise concurrency allotment** (Bedrock quota increase), not application architecture. ## Local development **Port:** Pulse always runs on **3001** (avoids conflicts with other projects on 3000). ```bash cd pulse-dashboard cp .env.example .env.local # fill in AWS credentials npm install npm run init:aws # create DynamoDB table + GSI, seed DSQL npm run dev ``` Open localhost. ## AWS setup | Script | Purpose | |--------|---------| | `npm run init:dynamodb` | Create `pulse_event_stream` table + `category-hour-index` GSI | | `npm run init:dsql` | Create `agent_messages`, `merchant_directory`, `subscriptions` | ## API routes | Route | Method | Description | |-------|--------|-------------| | `/api/he …