Screenplay
Screenplay
Model the whole thing in one file
You already model a feature end to end on the whiteboard — the events, the command that produces them, the read model, the screen. Then you write it three more times: the C# backend, the generated proxies, the React UI — and from that moment the model and the app drift apart. Screenplay removes the re-typing: describe a complete bounded context in one declarative .play file, and let Stage run it live. Get started → · Why Screenplay →
Start here
Section titled “Start here”The friction it removes — one model instead of four hand-synced layers — and the cases where a hand-written slice is still the better fit.
Get startedWrite your first .play file and watch the editor light up with highlighting, completions, and live diagnostics — in minutes.
The design principles, the top-level structure of a .play file, and a map of every construct.
Module, feature, slice, construct, sub-language, Stage, Studio — the vocabulary, defined once.
The whole production in one file
Section titled “The whole production in one file”A .play file is a set of typed slices aligned with Event Modeling — the atomic units of behavior.
Strongly-typed value types that declare their compliance attributes once, so every usage inherits them.
Commands and eventsDeclare the intent, the validation, the authorization, and the facts it produces — all together.
Projections and queriesTurn events into read models with the embedded Projection Declaration Language, then expose them as queries.
ScreensDeclare the UI at three levels — from pure intent that Studio generates to layout with inline React.
Reactors and capturesReact to events with automations, and turn external data into events with change data capture.
Go deeper
Section titled “Go deeper”PDL and CDL are embedded sub-grammars registered exactly the way your own sub-language would be.
The grammarThe full EBNF grammar — the precise, exhaustive definition of the language.
Frequently asked questionsIndentation vs. braces, the escape hatch to C#/React, how Screenplay relates to Arc and Chronicle.
Screenplay is the script; the rest of the Cratis platform is the cast that performs it. A .play file targets the same Arc commands and queries and Chronicle events and projections you would otherwise write by hand — so nothing about the runtime is hidden, and you can drop to code for any construct whenever you need to. See Why developers choose Cratis for how the pieces fit together.