Lumiverse

Published:

Lumiverse is a self-hostable AI chat application aimed at long-form, character-driven conversations. The substantive engineering is the runtime that sits underneath the chat UI: a small full-stack server plus a first-class extension system, with the goal of being something you can clone, launch, and write plugins for without standing up infrastructure.

Server. A single Bun process serves both the HTTP API and the real-time event bus:

  • Runtime: Bun (native TypeScript, no transpile step, built-in worker threads).
  • Router: Hono (Web Standards Request/Response).
  • Database: bun:sqlite directly, in WAL mode, prepared statements only, no ORM layer.
  • Auth: BetterAuth with username/password + role-based access control.
  • Secrets at rest: Web Crypto AES-256-GCM for any provider credentials stored in the DB.
  • WebSocket bus: Bun native WS via the Hono adapter; the same bus fans events out to extensions.
  • Image processing: sharp for WebP thumbnail generation.

Extension runtime (“Spindle”). Extensions are TypeScript bundles loaded into per-user worker processes with structured IPC. Each extension gets a typed RPC surface over the host: CRUD for chats / characters / world books / personas / images / variables / connections, streamed LLM generation, macro resolution, regex-script application, and per-event hook chains (registerInterceptor on prompt assembly, macroInterceptor on the macro evaluator, worldInfoInterceptor on world-info activation, plus a render-origin hook in the message-content processor). The host emits a stable event bus (GENERATION_STARTED / ENDED / STOPPED, CHAT_CHANGED with field-level diffs, MESSAGE_*, CHARACTER_*, WORLD_BOOK_*) that extensions subscribe to from inside their worker. Per-userId scoping is enforced at the IPC boundary so concurrent users don’t cross-attribute.

Deployment. A one-line launcher (start.sh / start.ps1) bootstraps Bun, runs a first-time setup wizard (admin account, port, extension storage), builds the frontend, and starts the backend with a visual terminal runner. The same Docker image is set up to run free on Hugging Face Spaces with persistent storage attached at /app/data.

I’m the second-highest contributor on the core suite with over 100k loc written.

~10000+ unique users

GitHub (Fork for Privacy)

Direct Link