Intro

Getting Started

New here? Start with the Developer Guide. This page covers day-to-day use of what ./setup built: your machine's own AWS stage, its config and migrations, and the test suite.

Getting Started

This page covers working with your machine's own AWS stage day to day. Most work needs no AWS stage at all; the local Docker app that setup starts is enough. New to the codebase? Read How DevStride Is Built, and Why first. The next page, Introduction to the ds CLI, explains the -u/-b flags and the bind cache used below, and the Command Reference has every flag.

Your own AWS stage

Setup's stage step builds it for you: its own copy of the demo data on a Neon database branch, its config, its first deploy, migrations and demo logins. It is named after your machine, and the machine's secrets bundle records it, so you set nothing by hand. ds machine ready proves it on every run (stage: recorded, stacks, config, database). Your AWS stage in the guide explains what it is.

Daily use

Run a pool checkout against the stage instead of Docker:

ds pool cloud wt1          # starts ds run backend (sst dev, live Lambda) and ds run ui for wt1, in the background
ds pool cloud wt1 --off    # stops both and brings wt1's Docker app back

It checks your AWS sign-in first and never opens a login, refuses the shared dev and prod stages, and runs one checkout per machine. The UI runs on the checkout's own frontend port; the logs are .ds/pool-cloud-*.log in that checkout. You need to hold the checkout's lease (ds pool checkout wt1 --purpose <what>).

Migrations

Setup never redeploys your stage when develop moves on. When ds machine ready notes that the stage's database is behind your checkout's code, bring it level from that checkout:

DEVSTRIDE_STAGE=<stage> DEVSTRIDE_REGION=us-east-1 ./ds -b migrations run

Config: ds script set-config

A deployed stage never reads .env. Its secrets come from one SST secret, DEVSTRIDE_CONFIG, which setup pushed when it built the stage. When a value changes (a new key in .env after ds secrets pull, or a new setting you added to the schema in backend/src/libs/domain/config.ts and to cli/commands/scripts/set-config.ts), push it again and restart the backend:

DEVSTRIDE_STAGE=<stage> DEVSTRIDE_REGION=us-east-1 ./ds -b script set-config

Stripe (test mode)

The test-mode Stripe keys come from the shared bundle through ds secrets pull. Your stage needs its own webhook:

  1. In the Stripe test dashboard, add the endpoint https://api-<stage>.devstride.dev/v1/subscriptions/stripe/webhooks, listening for charge.refunded, charge.refund.updated and refund.updated on your account. The webhook only records refunds; DevStride runs everything else about billing itself.
  2. Store its signing secret in your machine's bundle (pbpaste | ds secrets set machine STRIPE_WEBHOOK_SECRET), run ds secrets pull, then re-run set-config as above.

Making or removing a stage by hand

Setup runs these for you; use them directly when you need to:

ds stage create --member wt1 --dry-run     # what making (or finishing) this machine's stage would do
ds stage create --stage <its name> --member wt1   # adopt a stage made by hand before setup made them
ds stage remove --dry-run                  # what removing it would delete; without --dry-run you retype its name

ds stage remove is permanent: the stage's stacks, its config, its Neon branch and its data and sign-in users all go. An admin removes a retired machine's stage with ds stage remove --machine <its name> (For admins).

Running the Test Suite

The backend test suite needs Docker: its global setup creates a Postgres and a DynamoDB test container for this checkout on first run (drizzle-tests and dynamodb-tests in a plain checkout; devstride-<slug>-… inside a worktree instance, which ds worktree ls names).

cd backend && pnpm test:suite:ci:non-golden                                  # the standard suite (golden excluded)
pnpm --dir backend exec vitest run tests/suits/path/to/test.spec.ts          # one file

Next Steps

For the agent-assisted workflow and current plugin references, see AI Development.