Status: architecture finalized · implementation starting. The Architecture Handbook is complete and reconciled (v1.1.0, ADR-0001…0007); packages are placeholders awaiting Phase 1 (see ROADMAP.md).
morpha is a Presentation Domain Engine — a framework-agnostic, format-agnostic core for creating, editing, rendering, importing, and exporting visual documents composed of positioned widgets on pages. It is the substrate that slide editors, pitch-deck builders, whiteboards, infographic tools, and resume builders can all be built on — the way React is not HTML and Figma is not PDF, this engine is not OOXML: external formats are translation targets, never the model.
Start with the handbook: docs/architecture/Architecture-Index.md.
docs/architecture/ The Architecture Handbook — the source of truth for DESIGN (+ adr/)
PLANS.md Master implementation plan — the source of truth for EXECUTION
TASKS.md Active backlog (task board)
MEMORY.md Durable project knowledge + session notes
packages/ 19 packages (@morpha/* scope, short dirs — ADR-0009)
examples/ Structure-only example workspaces (editor, viewer, plugins, …)
apps/ Future deployable apps (playground, docs site)
tests/ Cross-package integration tests, benchmarks, future e2e
tools/ Repo-local tooling packages (empty until needed)
scripts/ Plain maintenance scripts (incl. the package scaffolder)
configs/ Shared tsconfig presets, dependency-cruiser import law
Packages by ring (Clean Architecture Dependency Rule, mechanically enforced
by pnpm lint:deps):
- Ring 0:
@morpha/domain - Ring 1:
@morpha/{events,state,commands,runtime} - Ring 2:
@morpha/{widget-api,rendering,interaction,plugin-api,serialization,widgets-base},@morpha/renderer-{dom,canvas,ssr},@morpha/{export,import}-pptx - Ring 3:
@morpha/{react,devtools,testing}
Directory names are the short form (packages/commands); the handbook's
logical presentation-* names map 1:1 (ADR-0009). @morpha/ai and
@morpha/collaboration are catalogued by the handbook but
deliberately not scaffolded — those features are deferred
by explicit decision (Design Principle 7), and their seams are already
fixed by the architecture.
corepack enable # respects the pinned pnpm version
pnpm bootstrap # install + build all packages
pnpm check # format, lint, spell, import law, dead code,
# typecheck, test, build — the full CI gauntletTooling (each choice recorded in ADR-0008)
| Concern | Tool | Why |
|---|---|---|
| Package manager | pnpm | Strict node_modules isolation makes undeclared cross-package imports fail at resolution time — the import law's first line of defense |
| Task orchestration | Turborepo | Graph-aware caching with minimal config surface |
| Bundler | tsdown | Rolldown-based successor to tsup; fast ESM+CJS+dts dual builds |
| Type checking | tsc --build + project references |
Types are checked by the compiler, emitted by the bundler |
| Format + lint | Biome | One fast tool instead of ESLint+Prettier+import-order |
| Import law | dependency-cruiser | Package-Structure.md §6 as an executable, CI-gated config |
| Dead code / unused deps | knip | Monorepo-aware, three checks in one tool |
| Spelling / Markdown | cspell, markdownlint-cli2 | The handbook is load-bearing prose — protect it |
| Commits / hooks | commitlint + lefthook | Conventional Commits on commits and PR titles |
| Versioning | Changesets | Independent semver per package; publishing prepared, gated off |
| Tests | Vitest + fast-check | One runner for unit/integration/snapshot/bench; property tests for determinism invariants |
See CONTRIBUTING.md. The one rule above all others: the handbook wins. Code that contradicts a finalized architecture document's boundary tables is a bug even when it works — change the architecture first (via the governance process) or change the code.