Documentation is work in progress and not completeEditor
FlashCC/Orientation/Section 3 of 29

The invariants

Five rules the codebase is built on: nothing is derived, presets run once, one painter, pure modules stay DOM-free, and two colour systems never mix.

Five rules the codebase is built on. Breaking one is how this gets slowly worse.

Nothing is derived

What is stored is what renders. A layer a preset created and a layer you drew are the same object with the same handles. There is no template engine, no roles, no blocks.

Presets run once

presets.ts, compositions.ts and styles.ts return plain layers and are then gone. There is no live template to fight with.

LayerView is the only painter

Canvas, filmstrip thumbnails, previews, the print portal and the server-side export all render through it. Export works by serialising LayerView’s own output and screenshotting it — a second renderer would drift within a week.

Pure modules are DOM-free and tested

geometry.ts, text.ts, colour.ts, gradient.ts, reflow.ts, insights.ts, preflight.ts, search.ts, sync.ts. That is where the reasoning lives and where the tests point.

Two colour systems never mix

App chrome uses the FlashFX tokens; slide content uses the document’s own palette. An app colour inside a slide is a bug.