System Architecture

Six-Layer Design

Modular, self-contained architecture spanning document processing through perimeter security.

Architecture Diagram


┌─────────────────────────────────────────────────────────┐
│                   CLOUDFLARE EDGE                       │
│              Zero Trust · Rate Limiting                 │
│              Webhook Validation · Tunnel                │
└───────────────────────┬─────────────────────────────────┘
                        │ Encrypted Tunnel
┌───────────────────────┴─────────────────────────────────┐
│                  PERIMETER LAYER                        │
│         tunnelManager · rateLimiter · webhookValidator   │
│         perimeterLedger · cloudflareConfig               │
└───────────────────────┬─────────────────────────────────┘
                        │
        ┌───────────────┼───────────────┬─────────────────┐
        │               │               │                 │
        ▼               ▼               ▼                 ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│   DOCUMENT   │ │   SIGNING    │ │     SDC      │ │   TELECOM    │
│   ENGINE     │ │   GATEWAY    │ │   VIEWER     │ │     SCA      │
│   :3001      │ │   :3002      │ │   :3003      │ │   :3004      │
│              │ │              │ │              │ │              │
│ Ingest       │ │ Sessions     │ │ Viewer       │ │ Inbound      │
│ Parse        │ │ Multi-sig    │ │ Tokens       │ │ AI Intent    │
│ Canonicalize │ │ OTP Engine   │ │ Export Ctrl  │ │ Compliance   │
│ Transform    │ │ Certificates │ │ Watermark    │ │ Conversation │
│ Export       │ │ Distribute   │ │ Access Log   │ │ Action       │
│ Fingerprint  │ │              │ │              │ │ Outbound     │
└──────┬───────┘ └──────────────┘ └──────────────┘ └──────────────┘
       │
       ▼
┌──────────────────────────────────────────────────────────┐
│                 SOVEREIGNTY LAYER                        │
│    IPFS/Kubo · CID Registry · Hash Chain · Signatures   │
│    QR Generator · Audit Trail · SKU Engine               │
└──────────────────────────────────────────────────────────┘
       │
       ▼
┌──────────────────────────────────────────────────────────┐
│              OPERATIONS LAYER  :3005                     │
│         Monitoring Dashboard · Backup Agent              │
│         Docker Compose · Health Checks                   │
└──────────────────────────────────────────────────────────┘
    

Document Processing Pipeline

Stage Module Description
1IngestAccept PDF, DOCX, PNG, JPG, HTML, TXT, MD via CLI or API
2ParseFormat-specific extraction to canonical JSON
3CanonicalizeDeterministic normalization (whitespace, encoding, structure)
4TransformGovernance, compliance, and brand transforms applied
5ExportTemplate-based rendering to target format
6FingerprintSHA-256 hash + metadata fingerprint generation
7SignDigital signature with ESIGN/UETA certificate
8EncryptAES-256-GCM encryption for at-rest storage
9StoreIPFS push via Kubo with CID registration
10AnchorHash-chain ledger anchoring with lifecycle tracking

Module Inventory

Document Engine — 14 Modules

Core processing pipeline: format detection, parsing (PDF, DOCX, HTML, image OCR, text), canonical engine, governance/compliance/brand transforms, template export, and fingerprinting.

Sovereignty Layer — 12 Modules

IPFS client, Kubo node management, CID registry, event log, ledger anchor, document fingerprint, signature engine, QR generator, audit trail, SKU engine, lifecycle registry, research/publication OS.

Signing Gateway — 5 Modules

Gateway server (:3002), session manager, OTP engine, signature certificate generator, distribution engine.

Secure Document Control — 7 Modules

SDC server (:3003), viewer protection engine, access token manager, export policy enforcer, forensic watermark, access ledger, SDC configuration.

Sovereign Comms Agent — 6 Modules

SCA server (:3004), inbound router, AI intent engine, action engine, outbound composer, conversation ledger.

Perimeter Security — 5 Modules

Tunnel manager, rate limiter, webhook validator, perimeter ledger, Cloudflare configuration.

Service Ports

Port Service Access
3001Document Engine PortalInternal only
3002Signing GatewayInternal only
3003SDC ViewerInternal only
3004SCA WebhookInternal only
3005Monitoring DashboardInternal only
5001IPFS / Kubo APIInternal only
8081IPFS GatewayInternal only

All ports are internal. External access is exclusively through Cloudflare Zero Trust tunnels.