Skip to content
Amer Khorsheed
All work

Case 02Sovereign institutional AI

An institution’s AI that never touches the internet.منظومة OSS للذكاء الاصطناعي

Year
2026
Status
Desktop demo
Discipline
Sovereign institutional AI
Shaheen sign-in to the sovereign AI platform
21/21
audit checks passed
100%
offline
1-click
Windows install

01 — The problem

Public institutions want what modern assistants offer — drafting, analysis, search over their own documents — but cannot let a single byte leave their network, and cannot accept answers that are invented.

A 100% air-gapped AI platform for government knowledge work: local LLMs, clearance-aware document handling, a cryptographic registry for official exports and an Arabic interface dressed in the national visual identity.

02 — What I built

  1. 01

    Local inference through LM Studio with a dynamic multi-model auto-router that picks the right model per request.

  2. 02

    Institutional categories and clearance levels, so what a person can ask about follows what they are allowed to read.

  3. 03

    A composable system charter and prompt library that governs every conversation.

  4. 04

    A statistical profiler for spreadsheets that computes answers instead of guessing them, plus ingestion for office documents and PDFs.

  5. 05

    A cryptographic document registry for official exports, and user management with immediate session revocation.

  6. 06

    One-click Windows packaging and a Docker Compose path, published as a downloadable desktop demo.

03 — Architecture

How the pieces fit.

  1. L1Client
    • React 19 + Vite 6
    • Syrian national identity UI
    • Streaming chat with markdown & code
  2. L2Server
    • Node.js + Express 5
    • Layered services
    • REST + streaming endpoints
  3. L3Inference
    • LM Studio, local HTTP only
    • Multi-model auto-router
    • Tabular statistics engine
  4. L4Data
    • PostgreSQL 16 + pgvector
    • Encrypted storage
    • Document registry

Requests flow top to bottom · each layer depends only on the one beneath

04 — Decisions that matter

Decisions

D01

Zero fabrication as a contract

Answers about data are computed by a profiler, not generated — the model explains numbers it was handed, it never invents them.

D02

Air-gap first, not air-gap later

The platform binds to inference on localhost only; there is no code path that reaches the internet to remove.

D03

Break-glass, documented

Recovery of the administrator account is a written, tested procedure rather than a backdoor.

05 — Security & trust

  • Independent audit: 21 of 21 checks passed.
  • Clearance-scoped access and immediate revocation of sessions.
  • Cryptographically registered official exports.
  • Local-only by default; LAN access opened by an explicit, scripted firewall rule.

06 — Stack

  • Node.js
  • Express 5
  • React 19
  • Vite
  • PostgreSQL 16
  • pgvector
  • LM Studio
  • Docker
  • Electron

07 — In the product

Shaheen desktop download interface
The desktop demo packaging interface.

Next case · 03

Mentanora

Arithmetic confidence for children, visible to parents.