Skip to main content

Local Development

Use the local-dev repo to manage the multi-repo CROW workspace. It is the fastest way to clone the standard repositories, sync them with GitHub, and jump onto issue branches across the stack.

Prerequisites

  • Bun v1.0+
  • Git
  • GitHub access to the CROW-B3 organization
  • gh auth login or SSH access for cloning private repos

Setup

git clone https://github.com/CROW-B3/local-dev.git
cd local-dev
bun install
bun run clone

bun run clone pulls the default workspace. Use bun run clone --all when you also want optional repos such as templates and docs sites.

Common Commands

Clone

bun run clone
bun run clone --all
bun run clone --only dashboard-client

Sync

bun run sync
bun run sync --force
bun run sync --parallel
bun run sync --only core-api-gateway

Checkout a Ticket Branch

bun run checkout CROW-156
bun run checkout CROW-156 --start
bun run checkout CROW-156 --only dashboard-client

--start installs dependencies and starts the relevant dev servers after branch checkout.

Cleanup Utilities

Interactive workspace cleanup:

bun run clean

Destructive Cloudflare environment cleanup:

bun run cleanup:dev
bun run cleanup:prod

cleanup:* deletes matching D1 databases, R2 buckets, KV namespaces, and Queues. Use it only when you intend to rebuild an environment from scratch.

  1. Run bun run sync before starting a new task.
  2. Use bun run checkout <ticket> to find matching remote branches across repos.
  3. Start the service you need locally with its repo-specific dev command.
  4. Re-run bun run sync when switching context back to a clean workspace.

Workspace Shape

~/workspace/
├── local-dev/
├── core-api-gateway/
├── core-auth-service/
├── dashboard-client/
└── ...

Configuration

Edit repos.config.ts in local-dev to change the default clone set or mark additional repositories as optional.