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.
1. Open Designer
Section titled “1. Open Designer”Go to designer.evidentsource.com, sign in, and create a new model.
2. Sketch the events
Section titled “2. Sketch the events”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.
3. Define the commands
Section titled “3. Define the commands”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.
4. Add State Views
Section titled “4. Add State Views”State Views are what your application reads. Place a view, name it (todo-list), and connect the events it folds.
5. Describe the behavior
Section titled “5. Describe the behavior”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.
6. Generate code
Section titled “6. Generate code”When the model feels right, click Generate Code. Designer downloads a Rust project with:
- a type for every command, event and State View;
- a
decidestub for each command, and anevolvestub for each view; - test scaffolds from your specifications;
- scripts to build the components and publish them.
See Generating code for everything in it.
7. Deploy it
Section titled “7. Deploy 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.