Architecture
How the library, registry, and live docs are organized.
Source layers
src/components/ui— atoms.src/components/composed— components.src/components/blocks— blocks.src/state— the shared Jotai store and provider.
State model
Stateful components never add a second provider. They use instance-keyed Jotai atom families and expose read/write hooks from the same module:
use<Feature>State(id)reads the component state.use<Feature>Actions(id)writes without subscribing to unrelated changes.- unnamed instances are dropped on unmount; explicit ids survive route changes.
Documentation model
Fumapress renders .md and .mdx files in content/ as pages. Frontmatter supplies titles and descriptions; meta.json controls sidebar ordering.
content/atoms,content/composed, andcontent/blocksown component documentation, usage guidance, and prop notes.src/components/stories/*.story.tsxfiles define atom, composed-component, and block previews with TypeScript-derived prop controls.src/registry/demossupplies larger worked examples for composed components and blocks.src/pagesis reserved for custom designs that need a React route.
To document a component, add its MDX page and a story, then list the page in the category's meta.json. No TypeScript documentation registry is needed.
Last updated on