Designer → Sandbox
This page connects Design your first system and Try the Sandbox into a single walkthrough. By the end you’ll have components you designed running in the Sandbox, answering commands.
1. Model it in Designer
Section titled “1. Model it in Designer”Open designer.evidentsource.com, and create a model. Sketch:
- events: what your system records;
- commands: what users send in;
- State Views: what the application reads back.
Full walkthrough: Design your first system.
2. Generate the code
Section titled “2. Generate the code”Click Generate Code, and unzip the Rust project Designer downloads.
It has a decide stub for each command and an evolve stub for each State View. Fill in the business logic; the types, commands and view shapes are already in place. Fill in every evolve arm, too: an unfilled evolve still compiles, and returns empty state. See Generating code.
3. Build the components
Section titled “3. Build the components”rustup target add wasm32-wasip2./build_all.sh4. Publish to the Sandbox
Section titled “4. Publish to the Sandbox”Name a database of your own, and publish. install.sh creates the database if it doesn’t exist:
export EVIDENTSOURCE_URL=https://sandbox.evidentsource.comexport EVIDENTSOURCE_DATABASE=my-model-yourname
./install.sh --allSee Deploying to Sandbox for the details.
5. Issue a command
Section titled “5. Issue a command”Run one of the commands you modeled. Each command is a State Change named after it in kebab-case, such as create-todo for CreateTodo, at version 1:
curl -X POST "$EVIDENTSOURCE_URL/api/v1/db/$EVIDENTSOURCE_DATABASE/latest/state-changes/<command>/v1" \ -H 'Content-Type: application/json' \ -d '{ … }'The body is the command’s schema, as JSON. See Issuing commands, or connect an SDK instead.
6. Read a State View
Section titled “6. Read a State View”curl -L "$EVIDENTSOURCE_URL/api/v1/db/$EVIDENTSOURCE_DATABASE/latest/state-views/<view>/v1"Your evolve function folds the events your command appended. See Reading state views.
7. Trace what happened
Section titled “7. Trace what happened”Open https://sandbox.evidentsource.com/db/<your database>/log in a browser. Each transaction shows how it arrived, and for a command, which State Change produced it.
That’s the start of an EvidentSource decision trace. Read Decision Traces & AI-Readiness for why it matters.
What’s next
Section titled “What’s next”- Run your own EvidentSource: Operations: containers + S3.
- Read about the past as the system saw it: Bi-Temporal Reads.
- Let AI agents drive your system: MCP for AI agents.