الخوارزمية دائماً تعود للوطن The Algorithm Always Returns Home
┌─────────────────────┐
│ USER INPUT │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ SENSORY LOBE │
│ ───────────── │
│ • Arabic NLP │
│ • 2,976 word forms │
│ • Dialect detect │
│ • Intent scoring │
└──────────┬──────────┘
│
┌────────────────┼────────────────┐
│ │ │
┌─────────▼─────┐ ┌──────▼──────┐ ┌──────▼──────┐
│ EXECUTIVE │ │ COGNITIVE │ │ OLLAMA │
│ ──────── │ │ ───────── │ │ (Local) │
│ Model routing │ │ Anti-halluc │ │ niyah:v3 │
│ Tier select │ │ Confidence │ │ deepseek-r1 │
│ Fallback chain│ │ Memory │ │ llama3.2 │
└───────────────┘ └─────────────┘ └─────────────┘
# Clone
git clone https://github.com/Grar00t/haven-sovereign.git
cd haven-sovereign
# Install
npm install
# Run (development)
npm run dev
# → http://localhost:5173
# Build (production)
npm run build| Component | Lines | Description |
|---|---|---|
| NiyahEngine v3 | 949 | Core AI orchestration — Three-Lobe Architecture |
| SovereignBridge | 953 | QEMU sandboxing, process isolation, IPC |
| SovereignSessionCleaner | 534 | AES-256-GCM encrypted session management |
| CacheAndGraphImprovements | 988 | LRU Cache (256) + Intent Graph (100 sessions) |
| arabic-roots-expanded | 1,548 | 2,976 Arabic word forms, 283 roots |
| useNiyah.tsx | 305 | React hook with SSE streaming |
| niyah-route.ts | 164 | Next.js/Express API handlers |
| i18n.ts | 1,744 | 10-language support (Arabic-first) |
| Tests | 1,211 | 102 tests across 15 suites |
Total: 8,395+ lines of production TypeScript
| Feature | HAVEN | VSCode | Cursor | Copilot |
|---|---|---|---|---|
| Zero Telemetry | ✅ | ❌ | ❌ | ❌ |
| Local AI (Ollama) | ✅ | ❌ | ❌ | ❌ |
| Arabic NLP | ✅ | ❌ | ❌ | ❌ |
| Gulf Dialect | ✅ | ❌ | ❌ | ❌ |
| Multi-Model (11) | ✅ | ❌ | ✅ | ❌ |
| Offline Mode | ✅ | ✅ | ❌ | ❌ |
| Open Source | ✅ | Partial | ❌ | ❌ |
| Fraud Detection | ✅ | ❌ | ❌ | ❌ |
| Sovereign OS | ✅ | ❌ | ❌ | ❌ |
| PDPL Compliant | ✅ | ❌ | ❌ | ❌ |
خوارزم هو أول نظام بيئي سيادي للذكاء الاصطناعي من السعودية.
- HAVEN IDE — بيئة تطوير متكاملة تعمل محلياً بالكامل
- محرك النية (NiyahEngine) — معمارية ثلاثية الفصوص للذكاء الاصطناعي
- KhawrizmOS — نظام تشغيل سيادي ARM64
صفر تتبع. صفر سحابة. سيادة كاملة.
- AES-256-GCM session encryption
- Zero telemetry (no data leaves your machine)
- Phalanx Gate zero-trust firewall
- QEMU sandboxing for untrusted processes
- PDPL (Saudi Data Protection) compliant
- NCA-ECC compatible
AGPL-3.0 — see LICENSE
Commercial license available for enterprises: contact@khawrizm.com
- Website: khawrizm.com
- Live IDE: ide.khawrizm.com
- YouTube: @saudicyper
- X/Twitter: @khawrzm
- Company: Ghala Rafaa Al-Omari Co. (CR: 7050426415)
Built by Sulaiman Alshammari (Dragon403) in Riyadh, Saudi Arabia
From Baghdad's House of Wisdom (820 AD) to Riyadh's Sovereign AI (2026)
الخوارزمية دائماً تعود للوطن 🇸🇦