Skip to content

Design your first system

EvidentSource Designer is a browser-based Event Modeling tool. Instead of starting from code, you sketch the system: the commands users can send, the events the system records, and the State Views that answer the questions your UI asks. Designer then generates a Rust project with a decide function for each command and an evolve function for each view, ready for your logic.

This page walks through modeling a small system from scratch.

Go to designer.evidentsource.com, sign in, and create a new model.

Think about the things that happen in your system, not the tables you’d need to store them. For a todo app: TodoCreated, TodoCompleted, TodoDeleted.

Place each event on the canvas, and give it a schema: the fields it carries. See Defining schemas.

Commands are what users or AI agents ask the system to do. Place a command on the canvas, connect it to the events it produces, and give it a schema.

For CreateTodo: a title, producing TodoCreated.

State Views are what your application reads. Place a view, name it (todo-list), and connect the events it folds.

Add specifications to the model: given these events, this command produces those events; given these events, this view shows that state. Designer turns them into test scaffolds in the generated project, which you complete once the logic is written.

When the model feels right, click Generate Code. Designer downloads a Rust project with:

  • a type for every command, event and State View;
  • a decide stub for each command, and an evolve stub for each view;
  • test scaffolds from your specifications;
  • scripts to build the components and publish them.

See Generating code for everything in it.

Fill in the stubs, build, and publish to the free Sandbox, or to a server on your machine. See Deploying to Sandbox, or Designer → Sandbox for the end-to-end walkthrough.