This section covers everything you need for day-to-day local development — running servers, generating boilerplate, and managing your local environment.
ds local run
This launches both servers in a tmux session with side-by-side panes:
tmux controls:
| Key | Action |
|---|---|
Ctrl+B then ← / → | Switch between panes |
Ctrl+B then D | Detach (servers keep running in background) |
F12 | Quit both servers |
Ctrl+C | Stop the server in the current pane |
Re-running ds local run replaces any existing tmux session.
brew install tmux). If you prefer running servers separately, use ds local run backend and ds local run frontend in different terminal windows.ds local run backend
Starts the Hono API server with hot reload on port 3001. The server:
.envIS_LOCAL=true for local-specific behaviords local run frontend
Starts the Vite dev server with hot module replacement on port 8080. The frontend proxies API requests to http://localhost:3001.
Both ds local run backend and ds local run frontend run preflight checks before starting:
pnpm install if dependencies are stale.env configurationIf you're restarting frequently and want to skip these checks:
ds local run backend --skip-preflight
The CLI provides generators for CQRS boilerplate, saving you from manually creating the 4-5 files needed for each new command or query.
ds local generate command CreateNotification -m notification
This creates:
| File | Purpose |
|---|---|
CreateNotification.command.ts | Command artifact definition (input DTO) |
CreateNotification.init.ts | Dependency injection registration |
CreateNotificationService.ts | Command handler with business logic |
CreateNotificationHandler.ts | Lambda handler wrapper |
All files follow DevStride's DDD patterns and are wired into the module's DI container.
ds local generate query GetUserNotifications -m notification
Creates the same file structure but for query operations (read-only).
| Flag | Description |
|---|---|
-m, --module <name> | Target module (required) — e.g., item, notification, board |
-f, --force | Overwrite existing files |
backend/src/modules/. Common modules: item, board, user, organization, activity, workflow, comment, analytics.ds setup secrets pull
Downloads shared development secrets from AWS Secrets Manager to your .env. Run this:
ds doctor reports missing secretsds setup secrets push
Uploads your local .env values to Secrets Manager. Use this after manually adding or updating a secret that other developers need.
ds setup secrets push updates the shared secret. Only push when you've intentionally updated a value that all developers should use. Don't push local-only overrides.ds setup secrets audit
Opens an interactive browser showing all secrets with their status:
For each missing secret, the audit provides:
ds setup secrets audit --ci
Non-interactive mode that outputs a readiness report. Useful in CI pipelines or for quick verification.
# Create a timestamped backup
ds setup env backup
# → .env.backup.2026-02-22T10-30-00
# Restore from a backup
ds setup env restore
# → Shows available backups with age and key count, lets you pick one
| File | Purpose | Managed By |
|---|---|---|
.env | All local environment variables | ds setup, ds setup secrets pull |
.ds/setup-state.json | Developer name, AWS profile, region | ds setup |
.ds/bind/{developer}-local-{region}.env | Cached infrastructure outputs | ds deploy up, auto-heals |
The .env file contains all configuration needed for local development:
Identity & Stage:
DEVSTRIDE_DEVELOPER=phil # Set in your shell config by ds setup
DEVSTRIDE_STAGE=phil-local # Auto-computed by the ds wrapper (always {developer}-local)
DEVSTRIDE_REGION=us-east-1
AWS_PROFILE=devstride-dev
Database:
DB_CONNECTION_STRING=postgresql://neondb_owner:...@ep-xxx.us-east-1.aws.neon.tech/neondb?sslmode=require
DB_CONNECTION_STRING_READ_ONLY=postgresql://...
Authentication:
COGNITO_USER_POOL_ID=us-east-1_xxxxxxxx
COGNITO_USER_POOL_CLIENT_ID=xxxxxxxx
Third-party Services:
STRIPE_SECRET_KEY=sk_test_...
PUSHER_APP_ID=...
PUSHER_APP_KEY=...
PUSHER_APP_SECRET=...
SLACK_BOT_TOKEN=xoxb-...
NEON_API_KEY=...
When IS_LOCAL=true (set automatically by ds local run):
.env instead of decoding a DEVSTRIDE_CONFIG blob from Secrets Manager.{stage}-devstride-{resource} convention.This means local development works entirely offline from AWS (after initial setup), except for database connections to Neon.
After modifying backend API routes, regenerate the frontend SDK:
ds api generate-api-client
This:
frontend/src/api/Routes marked with x-skip-client are excluded from generation.
ds api generate-api-docs
Generates an OpenAPI 3.0.0 spec with embedded documentation at backend/src/modules/api/interface-adapters/lambda/http/openapi.json. Includes auth methods, curl examples, and troubleshooting guides.
Routes marked with x-skip are excluded from docs. Routes marked with x-skip-client are excluded from both docs and SDK.