Skip to content

GrAxOS/haven-sovereign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

24 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

HAVEN-Sovereign

License Stars Arabic Zero Telemetry Ollama

Sovereign IDE with Arabic-First NLP, Three-Lobe Architecture, and Zero Cloud Dependency

Built by Sulaiman Alshammari (@Dragon403) in Riyadh, Saudi Arabia. Powered by KHAWRIZM โ€” the sovereign technology framework.


Human-First Charter

HAVEN is built to serve humans before markets.

  • It must serve any person, not only Arabs, not only locals, and not only people with money.
  • Privacy, dignity, and access are defaults, not premium features.
  • Arabic matters deeply here, but the product must remain multilingual and globally useful.
  • We aim for honest, local, inspectable intelligence rather than theatrical claims.

Read the full charter here:

Project identity:

  • Maintainer: Sulaiman Alshammari
  • Primary email: iqd@hotmail.com
  • Backup email: shammar403@gmail.com

๐Ÿ—๏ธ Three-Lobe Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    HAVEN-Sovereign                           โ”‚
โ”‚                   (Desktop IDE + Runtime)                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚              โ”‚              โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ COGNITIVE  โ”‚ โ”‚ EXECUTIVE   โ”‚ โ”‚  SENSORY    โ”‚
    โ”‚ LOBE       โ”‚ โ”‚ LOBE        โ”‚ โ”‚  LOBE       โ”‚
    โ”‚            โ”‚ โ”‚             โ”‚ โ”‚             โ”‚
    โ”‚ Analysis   โ”‚ โ”‚ Decision    โ”‚ โ”‚ Perception  โ”‚
    โ”‚ Reasoning  โ”‚ โ”‚ Making      โ”‚ โ”‚ Feedback    โ”‚
    โ”‚ Planning   โ”‚ โ”‚ Execution   โ”‚ โ”‚ Response    โ”‚
    โ”‚            โ”‚ โ”‚             โ”‚ โ”‚             โ”‚
    โ”‚deepseek-r1 โ”‚ โ”‚ niyah:latestโ”‚ โ”‚niyah:writer โ”‚
    โ”‚  :8b       โ”‚ โ”‚             โ”‚ โ”‚             โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚              โ”‚              โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚  NIYAH Intent       โ”‚
              โ”‚  Router             โ”‚
              โ”‚  (Arabic Root Lex)  โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚  Ollama Local       โ”‚
              โ”‚  127.0.0.1:11434    โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“Š Comparison: HAVEN vs VSCode vs Cursor

Feature HAVEN-Sovereign VSCode Cursor
Language TypeScript + Rust C/C++ C/C++
AI Model Local Ollama Cloud (GitHub Copilot) Cloud (OpenAI)
Privacy โœ… 100% Local โŒ Proprietary โŒ Proprietary
Arabic NLP โœ… Native โŒ No โŒ No
Three-Lobe Architecture โœ… Yes โŒ No โŒ No
Telemetry โœ… None โš ๏ธ Microsoft โš ๏ธ Anthropic
Cost Free Free ($4/mo Pro) $20/mo
Offline Mode โœ… Full โš ๏ธ Limited โŒ No
Model Routing โœ… Automatic N/A N/A
Desktop Runtime โœ… Tauri N/A N/A

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+ or Bun
  • Ollama (local)
  • Rust 1.70+ (for Tauri desktop build)

Installation

  1. Clone the repository

    git clone https://github.com/khawrizm/haven-sovereign.git
    cd haven-sovereign
  2. Install Ollama (if not already installed)

    # macOS
    brew install ollama
    
    # Linux
    curl -fsSL https://ollama.ai/install.sh | sh
    
    # Windows
    # Download from https://ollama.ai
  3. Pull required models

    ollama pull deepseek-r1:8b
    ollama pull niyah:latest
    ollama pull niyah:writer
  4. Install dependencies

    npm install
    # or
    bun install
  5. Start Ollama daemon

    ollama serve
  6. Run HAVEN IDE (Web)

    npm run dev
    # Opens http://localhost:5173
  7. Build Desktop App (Tauri)

    npm run tauri dev

๐Ÿ“‹ Project Structure

haven-sovereign/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/          # React + TSX UI components
โ”‚   โ”‚   โ”œโ”€โ”€ Hero.tsx         # Main interface
โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.tsx       # Navigation
โ”‚   โ”‚   โ””โ”€โ”€ Editor.tsx       # Code editor with syntax highlighting
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ OllamaService.ts # Ollama API integration
โ”‚   โ”‚   โ”œโ”€โ”€ NiyahEngine.ts   # Intent recognition + routing
โ”‚   โ”‚   โ””โ”€โ”€ ModelRouter.ts   # Three-lobe decision engine
โ”‚   โ”œโ”€โ”€ store/               # State management (Zustand/Pinia)
โ”‚   โ”œโ”€โ”€ App.tsx              # Main entry
โ”‚   โ””โ”€โ”€ main.tsx             # Bootstrap
โ”œโ”€โ”€ src-tauri/               # Rust backend (Tauri)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ main.rs          # Desktop app entry
โ”‚   โ”‚   โ”œโ”€โ”€ lib.rs           # Sovereign logic
โ”‚   โ”‚   โ””โ”€โ”€ ollama.rs        # Ollama bridge
โ”‚   โ””โ”€โ”€ Cargo.toml
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ vite.config.ts
โ”œโ”€โ”€ tauri.conf.json
โ””โ”€โ”€ README.md

๐Ÿง  How NIYAH Works

Intent Recognition (Arabic-First)

// Input: "ุงุดุฑุญ ู„ูŠ ูƒูŠููŠุฉ ุจู†ุงุก API ุจู€ Node.js"
// Intent detected: educational + technical

const intent = analyzeNiyah(userInput);
// {
//   type: 'COGNITIVE',
//   confidence: 0.92,
//   language: 'ar-gulf',
//   domain: 'backend'
// }

Model Routing

User Query
    โ†“
NIYAH Intent Analysis
    โ†“
    โ”œโ†’ COGNITIVE (analysis) โ†’ deepseek-r1:8b
    โ”œโ†’ EXECUTIVE (code gen) โ†’ niyah:latest
    โ””โ†’ SENSORY (feedback)   โ†’ niyah:writer
    โ†“
Aggregated Response

Temperature & Context Settings

  • Cognitive: temp=0.3, ctx=2048 (analytical, precise)
  • Executive: temp=0.5, ctx=4096 (balanced execution)
  • Sensory: temp=0.7, ctx=1024 (creative, responsive)

๐Ÿ” Security & Privacy

โœ… No cloud connectivity โ€” 100% local processing
โœ… No telemetry โ€” No data collection, no tracking
โœ… No API keys โ€” Runs entirely on your machine
โœ… Audit-grade code โ€” Fully open source, peer-reviewable
โœ… Sovereign jurisdiction โ€” Built in Saudi Arabia, owned by creators


๐ŸŒ ุงู„ุนุฑุจูŠุฉ

ู…ุง ู‡ูˆ HAVEN-SovereignุŸ

ู‡ูŠูู† -ุณูˆูุฑูŠู† ู‡ูŠ ุจูŠุฆุฉ ุชุทูˆูŠุฑ ู…ุชูƒุงู…ู„ุฉ ุชุฌู…ุน ุจูŠู†:

  • ู…ุญุฑุฑ ุฃูƒูˆุงุฏ ุฐูƒูŠ ู…ุน ุฅูƒู…ุงู„ ุชู„ู‚ุงุฆูŠ
  • ู…ุญุฑูƒ ู†ูŠุฉ ุนุฑุจูŠ ูŠูู‡ู… ุงู„ู†ุตูˆุต ุจู„ู‡ุฌุฉ ุงู„ุฎู„ูŠุฌ
  • ู…ุนู…ุงุฑูŠุฉ ุซู„ุงุซูŠุฉ ุงู„ูุตูˆุต (ู…ุนุฑููŠ + ุชู†ููŠุฐูŠ + ุญุณูŠ)
  • ู†ู…ุงุฐุฌ ู…ุญู„ูŠุฉ ุนุจุฑ Ollama ุจุฏูˆู† ุชุจุนูŠุฉ ุณุญุงุจูŠุฉ

ุงู„ู…ุชุทู„ุจุงุช

# ุชุซุจูŠุช Ollama
brew install ollama

# ุชุญู…ูŠู„ ุงู„ู†ู…ุงุฐุฌ
ollama pull deepseek-r1:8b
ollama pull niyah:latest

# ุชุดุบูŠู„ ุงู„ุจูŠุฆุฉ
npm install
npm run dev

ุงู„ู…ู…ูŠุฒุงุช

ุงู„ู…ูŠุฒุฉ ุงู„ุชูุงุตูŠู„
ุงู„ุฎุตูˆุตูŠุฉ 100% ู…ุญู„ูŠุŒ ู„ุง ุชูˆุฌุฏ ุจูŠุงู†ุงุช ุณุญุงุจูŠุฉ
ุงู„ูู‡ู… ุงู„ุนุฑุจูŠ ุชุญู„ูŠู„ ู†ุตูˆุต ุจุงู„ู„ู‡ุฌุฉ ุงู„ุฎู„ูŠุฌูŠุฉ
ุงู„ุฃุฏุงุก ุณุฑุนุฉ ูุงุฆู‚ุฉ (ู„ุง ุชูˆุฌุฏ ุชุฃุฎูŠุฑุงุช ุดุจูƒุฉ)
ุงู„ุชุญูƒู… ุงู„ูƒุงู…ู„ ู…ูุชูˆุญ ุงู„ู…ุตุฏุฑุŒ ู‚ุงุจู„ ู„ู„ุชุฎุตูŠุต

๐Ÿ› ๏ธ Configuration

.env (Optional)

OLLAMA_HOST=127.0.0.1:11434
OLLAMA_MODELS_DIR=/path/to/models
HAVEN_THEME=dark
NIYAH_TEMPERATURE=0.3

tauri.conf.json (Desktop)

{
  "build": {
    "beforeBuildCommand": "npm run build",
    "beforeDevCommand": "npm run dev",
    "devPath": "http://localhost:5173"
  },
  "app": {
    "windows": [{
      "title": "HAVEN-Sovereign",
      "width": 1200,
      "height": 800
    }]
  }
}

๐Ÿ“ฆ Available Commands

# Development
npm run dev              # Start web IDE (port 5173)
npm run tauri dev       # Start desktop app with live reload

# Building
npm run build           # Build web bundle
npm run tauri build     # Build standalone desktop EXE

# Testing & Quality
npm run lint            # Run ESLint
npm run type-check      # TypeScript validation
npm run test            # Unit tests

# Ollama Management
npm run ollama:pull     # Download models
npm run ollama:list     # List available models
npm run ollama:stop     # Stop Ollama daemon

๐Ÿ”— Technology Stack

Layer Technology
UI React 18 + TypeScript + Vite
Styling Tailwind CSS + Radix UI
State Zustand / Pinia
Desktop Tauri + Rust
AI/ML Ollama + deepseek-r1 + niyah
Backend Node.js (optional server)
Build Vite + SWC (lightning fast)

๐Ÿค Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code of Conduct: Be respectful, technical, and direct.


๐Ÿ“„ License

MIT License โ€” See LICENSE file for details.

Copyright ยฉ 2025 Sulaiman Alshammari (@Dragon403)
Built with ๐Ÿ‡ธ๐Ÿ‡ฆ in Riyadh, Saudi Arabia.


๐Ÿ“ž Support & Community


๐Ÿš€ Roadmap

  • Three-Lobe architecture core
  • Ollama integration & model routing
  • Arabic NLP intent engine
  • Desktop (Tauri) build
  • Mobile version (React Native)
  • K-Forge (P2P network layer)
  • VS Code extension
  • Plugin marketplace
  • Multi-language code analysis

Built by the people, for the people. Sovereign technology starts here. ๐Ÿ‡ธ๐Ÿ‡ฆโšก

About

HAVEN โ€” Sovereign AI IDE & Digital Forensics Platform. NiyahEngine v3, Zero Telemetry, Arabic-First. Three-Lobe Architecture. Built in Riyadh by Dragon403. ๐Ÿ‡ธ๐Ÿ‡ฆ

Topics

Resources

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
LICENSE.md

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors