Skip to content

Latest commit

 

History

History
120 lines (79 loc) · 4.07 KB

File metadata and controls

120 lines (79 loc) · 4.07 KB

Contributors

Thanks to everyone who has contributed to Catmint.

Maintainers

Contributing

Contributions are welcome. To get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Make your changes
  4. Run tests (pnpm test) and lint (pnpm lint)
  5. Submit a pull request

Please ensure all tests pass and code is formatted (pnpm format:check) before submitting.

Contributing to the Docs

The documentation site lives in the docs/ directory and is built with Catmint itself (mode: 'frontend'). It runs as a workspace package in the monorepo.

Structure

Each documentation page is a page.mdx file using the standard Catmint page.mdx convention (see PRD Section 24.2).

Pages are organized into four sections under docs/app/:

  • getting-started/ -- installation, quick start, project structure
  • guides/ -- feature-specific guides (routing, middleware, caching, etc.)
  • api/ -- API reference pages for each public export
  • adr/ -- architecture decision records

Running the docs site locally

pnpm install
pnpm --filter catmint-docs dev

The docs site runs on http://localhost:3001.

Adding a new page

  1. Create a directory under the appropriate section (e.g. docs/app/guides/my-topic/)
  2. Add a page.mdx file with the documentation content
  3. Add a navigation link in docs/app/layout.tsx under the appropriate sidebar section

Editing existing pages

Edit the page.mdx file in the relevant directory. The MDX files support standard Markdown, JSX expressions, and embedded React components.

Trying the Examples

The examples/ directory contains three projects that demonstrate Catmint with each deployment adapter. All three share the same set of demo pages (counter, todo, server data, forms, API explorer, server/client boundaries, server functions, static routes, cached routes, loading/error states, and async components) plus an API endpoint.

Example Adapter Filter name
examples/node @catmint/adapter-node example-node
examples/vercel @catmint/adapter-vercel example-vercel
examples/cloudflare @catmint/adapter-cloudflare example-cloudflare

Node

The Node example runs a standalone HTTP server. You can use it in dev mode and also build and start a production server locally:

# Dev mode (http://localhost:6468)
pnpm --filter example-node dev

# Production build + start
pnpm --filter example-node build
pnpm --filter example-node start

Vercel

The Vercel example produces Build Output API v3 artifacts (.vercel/output/). Dev mode works locally; the build output is intended for deployment to Vercel:

# Dev mode
pnpm --filter example-vercel dev

# Build (produces .vercel/output/)
pnpm --filter example-vercel build

To preview locally after building, use the Vercel CLI:

cd examples/vercel
npx vercel dev

Cloudflare

The Cloudflare example builds a Workers bundle. Dev mode works locally; the build output is intended for deployment with Wrangler:

# Dev mode
pnpm --filter example-cloudflare dev

# Build (produces dist/ with Workers bundle)
pnpm --filter example-cloudflare build

To preview locally after building, use Wrangler:

cd examples/cloudflare
npx wrangler dev

Notes

  • All examples are workspace packages, so pnpm install at the root links them to the local framework packages automatically.
  • Changes to framework source files under packages/ require rebuilding the relevant package (npx tsc --noEmit false --declaration --outDir dist in the package directory) before they take effect in the examples.
  • The demo pages in each example are identical and sourced from docs/app/examples/. When adding or updating an example page, apply the same change across all three projects.