🚀 Developer Manifest: Dashboard Connection Engine
Protocol for bridging React 19 Frontend with Express.js Service Layers.
1. System Objective
Establish a real-time "Pulse" between the Executive Dashboard and the Autonomous Backend. Transition from static HTML to dynamic JSON ingestion via RESTful endpoints.
2. API Endpoint Requirements
| Service Layer | Logic Path | Required Output |
|---|---|---|
| Inquest | src/services/inquest/ |
Scraper Heartbeat & Lead Velocity |
| SI Intelligence | src/ai/intent.js |
High-Intent Threshold Counts |
| Payments | src/payments/mpesa.js |
Lipa na M-Pesa Hash Verification |
3. Security & Privilege Gates
- Middleware: All POST requests (Killswitches) must pass through
CEO_PRIORITYvalidation. - Encryption: JWT-based authentication required for all
/api/v1/executive/*routes. - Polling: Implement 30s auto-refresh via TanStack Query to prevent stale data.
📋 Copy/Paste Developer Prompt
"Implement the Backend-to-Frontend Data Bridge for the HTS Executive Dashboard. Objective: Connect React 19 to Express logic in src/api/routes/. Requirements: Use TanStack Query for 30s polling of /api/v1/executive/pulse. Map SI Intent scoring to Amber alerts. Secure the Killswitch with CEO_PRIORITY middleware and JWT validation. Deliverable: dashboard.controller.js and useExecutivePulse.js hook."
No comments:
Post a Comment