The repository is a pnpm workspace. Start with the package under change, then add only the service that exercises it. The web app needs generated transit assets before its first build or development start. The collector needs a local D1 migration before Wrangler serves it.

Install and inspect

text
1pnpm install
2pnpm --filter @aidrecabrera/transit validate-data
3pnpm --filter @aidrecabrera/transit inspect:trip-planner

The inspection command reads the current planner inputs and reports the compiled graph shape. It is useful before debugging a browser result because it separates bad source data from a client lifecycle problem.

Start the services

Use separate terminals:

text
1pnpm --filter @aidrecabrera/api dev
2pnpm --filter @aidrecabrera/collector dev
3pnpm --filter dashboard dev
4pnpm --filter @aidrecabrera/docs dev
5pnpm --filter web dev

The configured local ports are:

ServicePort
Web Vite app5173
API Worker8787
Collector Worker8788
Dashboard Worker8789
Documentation app3001
Route-inference review UI, when used8765

The collector dev script applies the local collector-db migrations before starting Wrangler. If it fails before the server starts, inspect the migration output instead of debugging the API client.

Generated assets

The web package runs build:planner-image before its build and preview commands. For a direct transit build, use the actual package scripts:

text
1pnpm --filter @aidrecabrera/transit build:bus-bundle
2pnpm --filter @aidrecabrera/transit build:jeep-bundle
3pnpm --filter @aidrecabrera/transit build:places-bundle
4pnpm --filter @aidrecabrera/transit build:planner-image

There is no root pnpm build:bundle command. If the map has an empty route layer, validate the generated data and inspect whether the source selected the canonical geometry or its ordered-stop fallback.

Do and do not

Do run one focused package first. Do use the inspection and validation scripts before changing application code.

Do not assume that a cached service worker is using the files just generated. Reload with the local service worker state understood, or use a fresh browser context when testing cache behavior.