Nervous System
Platform-Wide Monitoring, Versioning, and Sync
Overview
The Nervous System is the central monitoring and synchronization layer for the entire Liana Banyan platform. It tracks changes, maintains version history, and ensures all systems stay in sync.
Core Components
1. Content Versioning
Every document, configuration, and data change is versioned:
CREATE TABLE content_versions (
id UUID PRIMARY KEY,
content_type TEXT NOT NULL,
content_id TEXT NOT NULL,
version_number INTEGER NOT NULL,
content_hash TEXT NOT NULL,
changes JSONB,
created_by UUID,
created_at TIMESTAMP WITH TIME ZONE
);
2. IP Ledger
Immutable, hash-chained records for critical data:
CREATE TABLE ip_ledger (
id UUID PRIMARY KEY,
sequence_number BIGINT NOT NULL,
entry_type TEXT NOT NULL,
entry_data JSONB NOT NULL,
previous_hash TEXT,
current_hash TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE
);
3. Platform Metrics
Real-time health and performance tracking:
CREATE TABLE platform_metrics (
id UUID PRIMARY KEY,
metric_name TEXT NOT NULL,
metric_value NUMERIC NOT NULL,
metric_unit TEXT,
context JSONB,
recorded_at TIMESTAMP WITH TIME ZONE
);
Sync Architecture
┌─────────────────────────────────────────────────────────┐
│ NERVOUS SYSTEM │
├─────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Main │ │ NERVE │ │ HexIsle │ │
│ │ Trunk │◄──►│ HUB │◄──►│ Trunk │ │
│ └─────────┘ └────┬────┘ └─────────┘ │
│ │ │
│ ┌─────────┐ │ ┌─────────┐ │
│ │ Santa │◄────────┼────────►│ Business│ │
│ │ Trunk │ │ │ Trunk │ │
│ └─────────┘ │ └─────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ IP LEDGER │ │
│ │ (Immutable Log) │ │
│ └─────────────────┘ │
│ │
└─────────────────────────────────────────────────────────┘
Deployment Coordination
Cephas deployments are manual by design and integrate with the broader Nervous System flow:
- GitHub backflow to Jarvis (Lovable.dev / MimicTrunk): push events preserve the source of truth for the Lovable template pipeline.
- CI build only: GitHub Actions builds Cephas for validation but does not deploy.
- Manual Firebase deploys:
- Staging:
deploy-staging.ps1(requires typingSTAGING) - Production:
deploy-production.ps1(requires typingDEPLOY)
- Staging:
This ensures human‑gated releases while still preserving automated consistency checks.
Event Types
| Event | Description | Logged To |
|---|---|---|
content.created | New content added | Versions |
content.updated | Content modified | Versions |
ip.registered | New innovation | IP Ledger |
medallion.minted | Badge created | IP Ledger |
metric.recorded | Performance data | Metrics |
Sync Functions
-- Add to IP Ledger with hash chain
CREATE FUNCTION add_to_ip_ledger(
p_entry_type TEXT,
p_entry_data JSONB
) RETURNS UUID;
-- Calculate innovation velocity
CREATE FUNCTION calculate_innovation_velocity(
p_days INTEGER DEFAULT 7
) RETURNS NUMERIC;
-- Detect work bursts
CREATE FUNCTION detect_work_bursts()
RETURNS TABLE (
burst_start TIMESTAMP,
burst_end TIMESTAMP,
innovations_count INTEGER
);
Blockchain Integration
Critical IP Ledger entries are also recorded on Base blockchain:
- Medallion minting
- Major innovations
- Governance decisions
This provides dual redundancy (database + blockchain) for the most important records.
Related Systems
- Observatory (analytics)
- Bifrost (events)
- Yggdrasil (architecture)