Architecting Federated Trust: The Developer Portal
Build, extend, and deploy secure decentralized solutions on the spatial-semantic fabric.
Deep-Dive Technical Stories
Jamii Sovereign OS replaces conventional centralized API hubs with a schema-enforced, spatial-semantic truth graph built on SurrealDB v3.0.5. These stories detail the core architectural mechanisms that guarantee absolute sovereignty and blazing-fast local performance.
Story 1: User-Context-Based Dynamic Path Caching
In a federated mesh, network latencies rise when resolving nested relationships. Jamii solves this via the resolved_view_cache table. Views are calculated dynamically based on the caller's specific cryptographic token and active application scopes, then cached for high-performance localized reads.
# Automatically evicts pre-computed views upon user profile updates
DEFINE EVENT event_evict_cache_on_profile_update ON TABLE client_user_profile
WHEN $before.preferences != $after.preferences
THEN {
DELETE resolved_view_cache WHERE node_id = $after.user_id;
};
Story 2: Personal PII Indirection & Vault Claim Pointers
To strictly satisfy global privacy regulations (such as GDPR, CCPA, and regional mandates), user records within user_address, user_email_registry, and user_phone_registry do not contain raw text. Instead, fields store an indirect record reference pointer pointing securely to cryptographic claim records (record<claim>) inside isolated private vaults.
DEFINE TABLE user_address SCHEMAFULL;
DEFINE FIELD user_id ON TABLE user_address TYPE record<user>;
DEFINE FIELD label ON TABLE user_address TYPE string;
DEFINE FIELD reference_pointer ON TABLE user_address TYPE option<record<claim>>;
DEFINE FIELD location_point ON TABLE user_address TYPE option<geometry<point>>;
Story 3: Proximity-Based Lease Grants & Active Evictions
PII data access is regulated by temporary proximity leases. When an emergency response unit (e.g., MARS dispatch) requires clinical history or physical coordinates, a short-lived lease is granted. If the lease expires or is revoked, SurrealDB triggers immediately purge all downstream caches, publishing a zero-leak audit event.
DEFINE EVENT event_evict_cache_on_lease_expiry ON TABLE proximity_lease
WHEN $before.is_active = true AND $after.is_active = false
THEN {
DELETE resolved_view_cache WHERE lease_id = $before.id;
CREATE audit_log SET
action = "lease_eviction",
actor_id = $before.accessor_id,
target_id = $before.target_user_id,
timestamp = time::now();
};
Story 4: E.164 Registries & Seamless JSON Data Portability
To guarantee individual data sovereignty, Jamii enforces clean schema rules for importing and exporting user details. The fn::export_user_details(userId) custom function extracts the entire identity graph (emails, phones, credentials, settings) into a single transportable JSON payload. Upon calling fn::import_user_details(payload), the DB resolves conflicts, validates E.164 phone formats, and seeds the registries.
DEFINE FUNCTION fn::export_user_details($user_id: record<user>) {
LET $profile = (SELECT * FROM client_user_profile WHERE user_id = $user_id);
LET $emails = (SELECT * FROM user_email_registry WHERE user_id = $user_id);
LET $phones = (SELECT * FROM user_phone_registry WHERE user_id = $user_id);
RETURN {
identity_id: $user_id,
profile: $profile[0],
emails: $emails,
phones: $phones
};
};
Client SDK Specification
The official @jamii/sovereign-client provides premium type-safe boundaries around the Hono BFF. It supports REST-like query builders and fully typings-aware dynamic RPC queries to SurrealDB custom functions.
import { createClient } from "@jamii/sovereign-client";
// Initialize Client
const client = createClient("https://api.jamii.sovereign.os", "your-secret-api-key");
// 1. Exposing dynamic custom DB functions via typings-aware RPC
const { data: exportedData, error } = await client.rpc<any>("fn::export_user_details", {
userId: "user:howard_james"
});
console.log("Sovereign identity backup:", exportedData);
// 2. Dynamic multi-tenant isolated profile queries
const profiles = await client
.from("client_user_profile")
.select("user_id, client_id, preferences")
.eq("client_id", "application:mars_dispatch")
.execute();
Interactive Developer Roadmap
Explore our W0–W5 engineering timeline. Click on any wave to drill down into the low-level deliverables, milestones, and release statuses.
Building the secure local SurrealDB schemas, decoupled Express/Hono BFF REST proxies, and zero-knowledge identity registries.
- Unique E.164 Phone registries
- PII indirection pointers
- Hono BFF Rest routes
- 100% test isolation suite
Plugging the truth graph triggers into a durable NATS jetstream bus with dynamic topic mapping and predictive event channels.
- Predictive NATS outbox events
- HNSW vector indexing
- Automatic retries event sweep
- Cross-plane edge sync
Enabling declarative zero-copy application blueprint deployments alongside hierarchical jurisdictional governance rule sets.
-
fn::blueprint::install - Declarative scope rules engine
- Multi-tenant isolation gates
- Dynamic overlay views
Scaling the mesh across dedicated instances, shared namespaces, and globally federated sovereign peer cells.
- Multi-cell peer federation protocol
- Distributed CNS directories
- Zero-copy cross-cell proxies
- Proximity lease handovers
Integrating commercial billing models, secure Stripe webhooks, subscription gates, and sovereign invoicing ledgers.
- Sovereign commercial invoices
- Stripe billing sync bridge
- Subscription-scoped gateways
- Multi-party payment settlements
Unlocking the full potential of multi-agent AI planning, dynamic dialog sessions, and predictive city workflows.
- Akili agentic dialog sessions
- Multi-agent planning engines
- Zero-prompt smart city routing
- Dynamic FSM binding execution