Docs
Repository map

Repository map

Where HTTP routes, schemas, contracts, workers, and tests live in the Cascades monorepo.

Quick map

ConcernLocation
HTTP routes (App Router)app/api/**/route.ts
OpenAPI fragments (Zod)Co-located app/api/**/schema.ts (required — npm run audit:api)
Aggregated OpenAPI documentlib/api/openapi.ts → generated openapi/cascades-openapi.json → served at /openapi.json
SDK / third-party HTTP boundarycontracts/api.yaml (subset of full OpenAPI; mirrored to cascades-sdk)
Shared Zod building blockslib/schemas/shared/*, lib/schemas/api/*
Workflow graph / node typinglib/workflows/schema.ts (facade re-export: lib/schemas/workflows/index.ts)
Orchestration + executionlib/orchestration, lib/executors, lib/workflows
Queue + workerslib/queue, workers/*.ts
Prisma schema + migrationsprisma/schema.prisma, prisma/migrations/
Thin data helperslib/data/* (expand over time)
Consistent JSON errors (optional migration)lib/api/http-errors.ts
Vitesttests/**/*.test.ts (vitest.config.ts)
Playwright E2Etests/e2e/*.spec.ts

Commands

  • npm run audit:api — every route.ts has schema.ts
  • npm run generate:openapi — refresh openapi/cascades-openapi.json
  • npm run validate:contractcontracts/api.yaml stays aligned with generated OpenAPI for SDK paths

See also Architecture and OpenAPI contract.

CommunityReport issue / Discuss(tags: Cascades, workflows)