This section covers everything you need for day-to-day local development — running servers, generating boilerplate, and managing your local environment.
Run the backend and frontend in separate terminal windows (or terminal tabs):
ds local run backend
Starts the Hono API server with hot reload on port 3001. The server:
.envIS_LOCAL=true for local-specific behaviorEADDRINUSE errors)ds local run frontend
Starts the Vite dev server with hot module replacement on port 8080. The frontend proxies API requests to http://localhost:3001.
ds local run backend runs preflight checks before starting:
pnpm install if dependencies are stale.env configurationThe 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 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:
| File | Purpose | Managed By |
|---|---|---|
.env | All local environment variables | ds setup, ds setup secrets pull |
~/.devstride/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:[email protected]/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 backend):
.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.