Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

143 changes: 124 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,133 @@
# NIYAH Sovereign AI Engine v3.0
# BURHĀN — Sovereign AI Hub

## The Technical Miracle
NIYAH is not just another wrapper. It is a **Sovereign Inference Engine** built from the ground up in pure C99/C++17 with zero external dependencies. While Big Tech relies on bloated, censored, and emotionally manipulative models, NIYAH focuses on **Objective Logic** and **Mathematical Determinism**.
> **فَذَانِكَ بُرْهَانَانِ مِن رَّبِّكَ** — *سورة القصص: 32*

### Core Capabilities
- **Pure C99 Kernel**: Zero-dependency inference engine for maximum portability and security.
- **SIMD Optimized**: Hand-crafted AVX2/FMA (x86) and NEON (ARM64) kernels for peak performance on local hardware.
- **Sovereign Memory Pool**: Custom single-pool allocator to prevent fragmentation and ensure 100% predictable memory usage.
- **Advanced Architecture**: Implements RMSNorm, RoPE (Rotary Position Embeddings), and SwiGLU FFN — the same architecture used by the world's most powerful open models (LLaMA/Mistral).
- **Arabic-First NLP**: Native support for Arabic dialects (Najdi, Hijazi, Levantine, etc.) and Classical Arabic with a custom-built tokenizer.
Saudi Arabia's strategic Sovereign AI Hub orchestrating **Operation Black Hole** — the forensic dismantling of the **DRAGON403** fraudulent network targeting Saudi and GCC users.

## Why NIYAH?
1. **No Hallucinations**: Our logic-first approach ensures that the model provides objective analysis based on forensic data, not "emotional guesses".
2. **100% Local**: Your data never leaves your sovereign node. We provide a "Zero-Trust Cloud" architecture where even when using cloud relays, PII is scrubbed locally.
3. **Mathematical Proof**: As proven in our `logic-proof` module, the core logic of NIYAH cannot contradict itself. It is mathematically impossible for the core to "lie" — any bias is an external filter, which we have removed.
**Case Reference:** `EPID0011034` · **IC3:** `RF26030165360C` · **FTC:** `#199332032`

---

## What is BURHĀN?

BURHĀN (Arabic: *قاطع الدليل* — "decisive proof") is a sovereign forensic command surface that fuses three layers:

| Layer | Stack | Purpose |
|---|---|---|
| **Inference Core** | Pure C99/C++17, AVX2/NEON SIMD, optional CUDA | Local, deterministic LLM inference with mathematical guarantees |
| **Symbolic Reasoner** | C11, Robinson unification + backward chaining | Provable logic over forensic facts; zero hallucination |
| **Proof Generator** | SHA-256 (FIPS 180-4) from scratch | Cryptographic anchoring of every conclusion |
| **Sovereign UI** | React 19 · Vite 6 · TypeScript 5.8 · Tailwind v4 | Cinematic forensic command center |
| **Phalanx Guard** | Rust | Real-time PII scrubbing and threat surface monitoring |

This is not a wrapper. The C99 core stands alone — same architecture family as LLaMA / Mistral (RMSNorm + RoPE + SwiGLU) but with zero external dependencies and zero telemetry.

---

## Core Capabilities

- **Pure C99 Inference Kernel** — zero-dependency engine for portability and audit.
- **SIMD-Optimized** — hand-crafted AVX2/FMA (x86) and NEON (ARM64) kernels.
- **Sovereign Memory Pool** — single-pool allocator, predictable memory, no fragmentation.
- **Quantization** — F32, Q8_0, Q4_0 weight formats.
- **Arabic-First NLP** — native Najdi, Hijazi, Levantine, and Classical Arabic tokenization.
- **Hybrid Reasoning** — symbolic Prolog-like engine alongside neural inference.
- **Cryptographic Proof** — every output is hash-anchored against rule-set + input + output.
- **Three-Lobe Architecture** — Sensory · Cognitive · Executive separation of concerns.

---

## Why BURHĀN?

1. **Objective logic, not emotional approximation.** The hybrid layer constrains neural output against a symbolic rule base. Outputs that cannot be proven are not emitted.
2. **100 % local execution.** Your forensic data never leaves your sovereign node. The Phalanx scrubber pre-filters PII even when remote relays are used.
3. **Mathematically provable.** The `proof_generator` SHA-anchors prompt, output, and rule-file content. The chain is auditable and tamper-evident.
4. **Built for evidentiary use.** Every UI artifact maps to a forensic artifact (IOC, wallet, hash, AS-number) referenced in the DRAGON403 master brief.

---

## Repository Layout

```
burhan/
├── Core_CPP/ # C99 / C++17 inference + reasoning core
│ ├── niyah_core.c # AVX2/NEON SIMD inference kernel
│ ├── hybrid_reasoner.c # Robinson unification, backward chaining
│ ├── constraint_solver.c
│ ├── proof_generator.c # SHA-256 forensic anchoring
│ ├── rule_parser.c
│ └── ...
├── niyah_engine/ # CUDA kernels + tokenizer
├── include/ # Public headers
├── bench/ # Benchmark harness
├── phalanx/ # Rust PII scrubber + threat monitor
├── scripts/ # Build scripts (GCC, training data prep)
├── src/ # React 19 + TypeScript UI
│ ├── components/ # Forensic dossier, mission control, panels
│ ├── lib/ # NiyahEngine, KSPIKEEngine, WathqClient
│ ├── services/ # forensicService
│ └── core/ # niyah-engine TS bindings
└── server.ts # Express + WebSocket sovereign uplink
```

---

## Build

### C/C++ inference core

## Build Instructions
```bash
# Compile for x86 (AVX2)
gcc -O3 -mavx2 -mfma niyah_core.c niyah_main.c -o niyah -lm
# x86 with AVX2 + FMA
gcc -O3 -mavx2 -mfma Core_CPP/niyah_core.c Core_CPP/niyah_main.c -o niyah -lm

# Compile for ARM64 (NEON)
gcc -O3 niyah_core.c niyah_main.c -o niyah -lm
# ARM64 with NEON
gcc -O3 Core_CPP/niyah_core.c Core_CPP/niyah_main.c -o niyah -lm
```

### Web UI

```bash
npm install
npm run dev # Dev server on :3000
npm run build # Production build to dist/
npm run preview # Preview build
npm run lint # tsc --noEmit
npm run test # vitest
```

---
*نحن ورثة الخوارزمي — لا يوجد مستحيل في الدنيا*

## Operation Black Hole / DRAGON403 — Forensic Anchors

| Indicator | Value |
|---|---|
| Forensic hash | `falla_admin.js` SHA-256 `71bf18bf6be88fc7afb4a0d5ae668148d0f75f080ec9e6a6956776bc865ad88d` |
| Cash-out wallet | `TCHFcsY7VqTq35c9zZPzKo7JtfNYVAryfu` |
| Mixer wallet | `Tf7rkg7L6TuTtyMGs5xe1dJEPsOyggnhLa` |
| CSAM-linked wallet | `TuSCebQRIvNR3qzAReKfJ7LtSjoUY8gqeJ` |
| Threat AS | `AS139341` (Tencent Cloud, Singapore) |
| Publisher | `com.iyinguo.*` |
| Apps in network | 70+ |
| TRC-20 wallets traced | 33 |
| IOCs across 7 categories | 50 |
| Per-victim loss range | SAR 300,000 – 1,500,000 (USD 80,000 – 400,000) |

These are the **authoritative numbers** in the federal master brief. Public-facing surfaces summarize them.

---

## License

AGPL-3.0. See `LICENSE`.

---

## Author

**Sulaiman Al-Shammari** (أبو خوارزم)
GraTech Solutions LLC (KHAWRIZM) · Riyadh
admin@gratech.sa · S@khawrizm.com

---

> *نحن ورثة الخوارزمي — البرهان لا يحتاج إذناً.*
13 changes: 10 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
<!doctype html>
<html lang="en">
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Google AI Studio App</title>
<meta name="theme-color" content="#0a0a0a" />
<meta name="description" content="BURHĀN — Sovereign AI Hub for Saudi Arabia. Operating DRAGON403 forensic command for the Black Hole investigation." />
<meta property="og:title" content="BURHĀN — Sovereign AI Hub" />
<meta property="og:description" content="فَذَانِكَ بُرْهَانَانِ مِن رَّبِّكَ — Sovereign forensic intelligence orchestrating Operation Black Hole." />
<meta property="og:type" content="website" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Amiri:wght@400;700&display=swap" rel="stylesheet" />
<title>BURHĀN — Sovereign AI Hub | DRAGON403</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "COIN MAX - Sovereign AI Command Center",
"description": "The strategic hub for Saudi Sovereign AI. Powering Project DRAGON403 with Niyah Engine v3.0, Three-Lobe architecture, and forensic surveillance of the Black Hole fraudulent networks.",
"name": "BURHĀN — Sovereign AI Hub",
"description": "Saudi Sovereign AI strategic hub. Powering Project DRAGON403 with the Niyah Engine v3.0, Three-Lobe architecture, and forensic surveillance of the Black Hole fraudulent networks. Reference: فَذَانِكَ بُرْهَانَانِ مِن رَّبِّكَ.",
"requestFramePermissions": [
"camera",
"microphone",
"geolocation"
]
}
}
Loading