Contributing
The full guide lives in CONTRIBUTING.md. This page is the
short version for people already inside the docs site.
Setup
pnpm install
pnpm db:migrate:local
pnpm dev
Checks
pnpm format:check
pnpm lint
pnpm check-types
pnpm test
pnpm build:all
pnpm knip
pnpm db:migrate:check
pnpm docs:build
Conventions
- Keep route handlers thin; business logic in
services/, data access inrepositories/. - Validate external input with Zod schemas from
@caly/shared. - Enforce ownership in the service or, better, in an owner-scoped read.
- React imports resolve to
preact/compatthrough both Vite and TypeScript. Never addreactorreact-domas runtime dependencies. - Generate shadcn primitives into
packages/ui, never into the webapp. - Bump
SCHEDULER_VERSIONwhen the scheduler math changes. - Add a changeset with
pnpm changesetfor user-visible changes. All@caly/*packages share one fixed version and are never published to npm; do not edit versions or generated changelogs by hand. - A new MCP tool touches the name, schema, scope map, definitions, services interface, API binding, and dispatch switch. Update the scope tests too.
- After editing
packages/study-widget/src, runpnpm --filter @caly/study-widget buildand commit the regeneratedcompiled/v1.html.ts.
Documentation
- Pages live in
docs/as Markdown. pnpm docs:generatewritesdocs/manifest.json,docs/_sidebar.md, and the generated reference pages.pnpm docs:buildrenders the static site intopackages/docs/dist/.pnpm docs:devbuilds the static site and serves it on:3030.pnpm docs:previewserves the built static site frompackages/docs/dist/.pnpm docs:deploybuilds the site and deploys it to thetakhtabush-docsCloudflare Worker.
When you add a page, add it to the entry list in scripts/docs/manifest.ts so
it appears in the sidebar, search, and pager. Generated pages should not be
hand-edited; change the generator instead.
Screenshots
The screenshots used by the README and the landing page live in
docs/_media/screenshots/. Replace them at the same paths to refresh the docs.
License
Contributions are accepted under the MIT license. There is no CLA.