# NaijaAgent Core (The Sovereign Empire Era)
A high-scale, multi-tenant AI Business Operating System built specifically for the Nigerian market. ๐ณ๐ฌ
## ๐ฐ Empire Architecture
* **WhatsApp Sidecar (`apps/whatsapp-sidecar`):** High-performance Go binary (`whatsmeow`) managing multi-tenant WhatsApp sessions and pushing events to Redis.
* **API Service (`@naija-agent/api`):** High-performance Fastify server handling WhatsApp/Paystack webhooks, SMS Bridge heartbeats, and Sovereign commands.
* **Zynux Worker (`@naija-agent/worker`):** BullMQ worker for business AI pipeline โ chat, commerce, onboarding, reporting, reminders.
* **Aelixxr Worker (`@naija-agent/worker-life`):** BullMQ worker for Life OS โ personal AI, vault, heartbeats, cron, tools.
* **Web Dashboard (`@naija-agent/web`):** Next.js 15 Sovereign Command Center and tenant portals.
* **AI Router (`@naija-agent/ai`):** Dynamic capability-based routing across Gemini, DeepSeek, and Qwen with automatic failover.
* **State:** PostgreSQL via Drizzle ORM (`@naija-agent/database`) + Redis (Queues/Idempotency/Locking). Firebase Firestore maintained for legacy sync during migration.
* **Identity:** WhatsApp-first MFA and Bcrypt-salted Admin PINs.
## ๐ Key Features (Empire Phase 10)
* ๐ฆ **Alajo Sovereign Finance:** Automated personal vaults with Monnify Virtual Accounts, bill payments, and goal-based savings.
* ๐ **Conversational Commerce:** Full Shopping Cart lifecycle (`add`, `view`, `remove`, `clear`) integrated into checkout.
* ๐ก๏ธ **Deterministic Price Guard:** Algorithmic verification of AI-quoted prices against live product data to prevent fraud.
* ๐๏ธ **Vision-First Verification:** Automated receipt scanning for instant payment confirmation (Manual fallback for high-value deals).
* ๐ **Proactive Pulse:** Daily morning sales reports for the Boss and automated appointment reminders for customers.
* ๐ฎ **Global Fraud Guard:** Shared blacklist of fraudulent numbers across the entire network. โฆ