Contributing
Guide to developing and contributing to the eSheet monorepo.
๐ค Repository Structureโ
mSheet/
|- apps/
| |- demo/ # Vite demo app (builder + renderer)
| `- docs/ # Docusaurus documentation site
|- packages/
| |- core/ # @esheet/core - types, stores, logic (vanilla TS)
| |- fields/ # @esheet/fields - 19 field components (React)
| |- builder/ # @esheet/builder - visual form editor (React)
| |- renderer/ # @esheet/renderer - form fill-out (React)
| |- renderer-standalone/ # @esheet/renderer-standalone - non-React mount API
| `- renderer-blaze/ # @esheet/renderer-blaze - Meteor Blaze integration
|- nx.json
|- tsconfig.base.json
`- package.json
๐ Dependency Graphโ
@esheet/core (no React dependency)
^
@esheet/fields (depends on core)
^
@esheet/builder (depends on core + fields)
@esheet/renderer (depends on core + fields)
^
@esheet/renderer-standalone (depends on renderer)
@esheet/renderer-blaze (depends on renderer)
๐ Development Workflowโ
Prerequisitesโ
- Node.js 20+
- npm (workspace-aware)
Installโ
npm install
Run the Demo Appโ
npx nx serve demo
Run the Docs Siteโ
npx nx serve docs
Build All Packagesโ
npx nx run-many -t build
Run Testsโ
npx nx run-many -t test
Lintโ
npx nx run-many -t lint
Run Affected (CI-friendly)โ
Only build/test/lint projects affected by your changes:
npx nx affected -t lint test build
๐ Code Styleโ
- TypeScript strict mode - no
anyunless unavoidable. Preferunknown+ narrowing. nodenextmodule resolution - use.jsextensions in relative imports- No enums - use
as constobjects or string literal unions readonlywhere appropriate - for immutable parameters and data- Interfaces over type aliases - for object shapes (unless union/intersection needed)
- Early returns over nested conditionals
- Keep functions short - under ~40 lines when possible
๐ Docs Styleโ
- Keep docs clear, technical, and concise.
- Use emoji sparingly for wayfinding in major headings only.
- Avoid dense or decorative emoji usage in body text.
- Prefer consistency: if one page uses heading emojis, keep them subtle and section-scoped.
๐งช Testingโ
- Tests use Vitest with
globals: true(no need to importdescribe/it/expect) - Test files live next to source:
foo.ts->foo.spec.ts - Run specific package tests:
npx nx test core
๐ ๏ธ Nx Commandsโ
All tasks should be run through Nx:
| Command | Description |
|---|---|
npx nx serve demo | Start demo app dev server |
npx nx serve docs | Start docs dev server |
npx nx run-many -t build | Build all packages |
npx nx run-many -t test | Run all tests |
npx nx run-many -t lint | Lint all packages |
npx nx affected -t build test lint | Run affected targets |
npx nx show project <name> --json | Show project configuration |
npx nx graph | Visualize dependency graph |