When working with the Temba Components development server, demo flows and API data files are stored outside the project directory to allow for easier iteration without affecting the committed defaults.
- External Directory: Development data is stored in
/tmp/temba-dev-data/ - Automatic Setup: When you start the dev server, it automatically copies default files to the external directory if they don't exist
- Fallback Logic: The server will use external files when available, but fall back to project defaults if not found
- Persistence: Changes persist during development sessions but won't survive container rebuilds
/tmp/temba-dev-data/
├── flows/ # Modified flow files
│ ├── food-order.json
│ └── sample-flow.json
└── api/ # Modified API response files
├── groups.json
├── labels.json
├── fields.json
└── ... (15 total API files)
Shows the current state of development data:
bun run dev-data:statusCopies changes from development directory back to the project:
bun run dev-data:copyThis is useful when you want to commit your development changes.
Wipes development data and restores from project defaults:
bun run dev-data:resetThis is useful when you want to start fresh or undo experimental changes.
-
Start Development:
bun run start- Server automatically sets up external data directory with defaults
-
Make Changes: Edit flows or modify API responses through the application
- Changes are saved to
/tmp/temba-dev-data/
- Changes are saved to
-
Check Status:
bun run dev-data:status- See what files are in development vs project directories
-
Commit Changes (if desired):
bun run dev-data:copy- Copies your changes back to the project for committing
-
Reset When Needed:
bun run dev-data:reset- Start fresh with default data
- Project Flows:
demo/data/flows/ - Project API:
static/api/ - Development Flows:
/tmp/temba-dev-data/flows/ - Development API:
/tmp/temba-dev-data/api/
- Development data doesn't survive container rebuilds
- Always use
bun run dev-data:copybefore committing if you want to keep changes - The server prioritizes development files over project defaults when both exist
- You can manually edit files in
/tmp/temba-dev-data/if needed