Skip to content

mcalthrop/solid-pact-python-rest

Repository files navigation

solid-pact-python-rest

Monorepo for the bread recipes app (SolidJS, Python REST, OpenAPI, Pact).

This repository is designed to be used with Cursor (the VS Code–based editor with integrated AI).

Shared editor settings live under .vscode/, and Cursor-specific rules live under .cursor/.

You can work in other editors, but Cursor is the intended environment.

OpenAPI contract

The REST API is defined in packages/openapi/openapi.yaml (shared by the Python API and the front end). From the repository root, pnpm lint runs Redocly on that spec (via @solid-pact/openapi) together with the other workspace lint tasks.

The CI workflow (.github/workflows/ci.yml) runs pnpm lint, pnpm test, pnpm openapi:generate, and pnpm openapi:validate (among the other setup steps) on pushes to main and on every pull request.

When you add or upgrade Node dependencies, run pnpm install with the pnpm version pinned in packageManager (via Corepack). Using a different pnpm release can rewrite pnpm-lock.yaml in an incompatible way (for example changing the lockfile format).

Node.js

Use nvm so your runtime matches CI. The repo pins Node 24.14.0 in both .nvmrc and the root package.json engines.node field.

From the repository root:

nvm install

If your shell does not switch versions automatically after nvm install, run nvm use so node -v prints v24.14.0.

With engine-strict=true in .npmrc, pnpm will not run unless the active Node version satisfies engines.node.

Package manager

Use pnpm only. The root package.json declares:

  • packageManager: pnpm@10.18.1
  • engines.pnpm: >=10.18.1
  • engines.npm: a non-semver reminder (please-use-pnpm) so mistaken npm install attempts are visibly wrong

package-manager-strict in .npmrc enforces the declared package manager.

pnpm install

Install pnpm via Corepack if needed:

corepack enable && corepack prepare pnpm@10.18.1 --activate

See pnpm installation for other options.

Scripts (root delegates to workspaces)

All root package.json scripts delegate to Turborepo, which runs the matching script in each workspace (e.g. apps/web, apps/api). Run them from the repository root with pnpm only:

pnpm build
pnpm dev
pnpm lint
pnpm test
pnpm openapi:generate
pnpm openapi:validate

To run a script in a single workspace, use pnpm’s filter (examples):

pnpm --filter web build
pnpm --filter api test

Or use Turborepo’s filter directly:

pnpm turbo build --filter=web

About

A monorepo containing a SolidJS front end and Python REST API, contract-tested with Pact, driven by an OpenAPI spec.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors