Core Internals

Contributor-focused engine notes — build, discovery, Bun runtime.

Core Internals

This section is for framework contributors and engineers who want a precise mental model of how Manic turns app/ conventions into a Bun-hosted SPA (and optional Hono API). Every article maps to packages/manic/src.


Stack overview

Initializing diagram...

Speed & perceived performance


Topics


Architectural principles

PrincipleWhat it means in practice
Bun-native I/OBun.serve, Bun.build, Bun.Glob, Bun.spawn, Bun.file — no dual Node compatibility shim layer inside the framework core
OXC vertical sliceoxc-transform, oxc-minify, oxlint, oxfmt share toolchain assumptions (OXC)
Filesystem conventionsRoutes + APIs discovered by scanning app/, not manual registration lists (Discovery)
Explicit tradeoffsType stripping without tsc, lint parity quirks, plugin apiRoutes: [] during build() — documented under Caveats

Repository layout

PathResponsibility
packages/manic/src/climanic commands · build.ts orchestrates production graphs
packages/manic/src/servercreateManicServer · discovery.ts manifest helpers
packages/manic/src/routerClient SPA router Link navigate matcher scoring
packages/manic/src/configdefineConfig loadConfig createPlugin
packages/manic/src/pluginsapiLoaderPlugin fileImporterPlugin
packages/providersDeployment adapters consumed after provider.build

Where to start reading

GoalPage
Understand speed end-to-endUnderstanding speed · Performance model · Benchmarks
Understand manic build orderingBuild pipeline
Understand createManicServer branchesServer runtime
Ship reliable pluginsFramework plugins + Caveats

On this page