Documentation site for StateMesh — transaction-first state for React.
# Install dependencies
npm install
# Start dev server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewdocs/
├── .vitepress/ # VitePress config, theme, and build output
│ ├── config.ts # Site configuration
│ ├── theme/ # Custom theme (components, styles)
│ └── versions.json # Version registry for docs versioning
├── guide/ # Getting started, core concepts, TypeScript
├── core/ # State, actions, selectors, transactions, undo/redo
├── data/ # Resources, mutations, API client, persistence
├── ui/ # Forms, URL state, error boundaries
├── router/ # Routes, navigation, guards, data loading, SEO
├── advanced/ # Middleware, guards, plugins, sync, devtools
├── testing/ # Test helpers and patterns
├── integration/ # Next.js, migration guides
├── reference/ # Errors, events, changelog
├── examples/ # Example applications
├── index.md # Landing page
├── contributing.md # Contribution guidelines
└── security.md # Security policy
Versions are managed via .vitepress/versions.json:
{
"latest": "1.0.0",
"versions": ["1.0.0"]
}To add a new version:
- Update
versions.jsonwith the new version - Run
npm run build:versioned - Deploy
The docs are deployed to GitHub Pages via the workflow in .github/workflows/docs.yml. Push to main or master triggers a build and deploy automatically.