Living Document Notice Published 2026-09-21. The evolving architecture and connected notes for this dispatch live in the Stax Digital Garden.

Embers Architecture - Node and SQLite Media Engine

Embers Architecture - Node and SQLite Media Engine: Warm sepia-white phosphor P4/P20 vector CRT macro showing three-tier media engine architecture: client wireframe, logic bus, and storage blocks

Overview

Self-hosted media platforms often fail under operational maintenance overhead. Systems requiring clustered databases, message queues, and external caching layers routinely degrade when host nodes reboot or network namespaces drift.

┌─────────────────────────────────────────────────────────────┐
│                    EMBERS RUNTIME ENGINE                    │
│                                                             │
│  [Client Interface] ──HTTP/REST──> [API Server (Node/TS)]   │
│                                            │                │
│                                    ┌───────┴──────┐         │
│                                    ▼              ▼         │
│                              [SQLite / WAL]  [Storage VFS]  │
│                                (hold.db)          │         │
│                                            ┌──────┴──────┐  │
│                                            ▼             ▼  │
│                                        POSIX Disk     S3 API │
└─────────────────────────────────────────────────────────────┘

Runtime Components

  • API Core (Node.js & TypeScript): A single Node service manages route handling, session validation, upload ingestion, and asset conversion, exposing a typed REST API directly to the browser.
  • Frontend Lens (React): A responsive interface optimized for browsing and media ingestion, supporting desktop masonry and mobile interfaces without native application dependencies.
  • Relational Persistence (SQLite): System state lives in an embedded SQLite database running in Write-Ahead Logging (WAL) mode. SQLite eliminates external database processes, enables simple single-file backups, and provides sub-millisecond query performance over the local filesystem.
  • Storage Abstraction: Media persistence is decoupled from application logic via an abstract storage interface. Assets can target local POSIX disk directories or private S3-compatible endpoints without code modifications.
export interface StorageAdapter {
  put(key: string, stream: NodeJS.ReadableStream, mimeType: string): Promise<void>;
  get(key: string): Promise<NodeJS.ReadableStream>;
  delete(key: string): Promise<void>;
  getUrl(key: string): string | null;
}
LayerTraditional Self-Hosted Media SuitesEmbers Minimal Engine
Relational CoreClustered PostgreSQL or MySQL containerEmbedded SQLite (single local file)
Job QueueRedis or RabbitMQ brokerIn-process asynchronous task pipeline
Asset StorageTightly coupled POSIX volume pathsPluggable driver (POSIX mount or S3 API)
Deployment FootprintMulti-container Docker Compose meshSingle container (Node + SQLite + assets)

Architectural Invariants

  • Deterministic Execution: Operations execute within deterministic memory bounds without external side effects.
  • Sovereignty: Storage and state replication guarantee zero unauthenticated telemetry or vendor lock-in.
Invariant PropertyOperational Guarantee
System InvariantEmbers rejects all public bearer links and automated facial indexing; access is strictly confined to authenticated household sessions and explicit PIN gates.
# Verify guest access PIN requirement and zero public bearer URLs
curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3000/media/stream/circle_01

  • Directus Target: embers
  • Garden Source Reference: MOC - The Digital Necropolis and Cold Decadal Storage, MOC - Bosun PKM Tools
  • Garden Source Reference: EMB-1012 - Embers Architecture - Node and SQLite Media Engine, BSN-1001 - The Bosun Architecture Manifesto