Complete Concert App
The getting-started tutorials each walk through one layer of the same concert app. This page assembles everything: users follow artists, artists announce shows, and a query returns upcoming shows for followed artists.
Start here if you don’t have a project yet:
causet initChoose Concert app when prompted, then cd into your project directory. See Your First State — Set up the project for details.
If you already ran causet init or followed the layer tutorials, you’re ready to compile and run.
What the app does
- User follows an artist →
ARTIST_FOLLOWED→ row inuser_following - Artist announces a show →
SHOW_ANNOUNCED→ row inartist_show_directory - Query joins both tables → upcoming shows for artists the user follows
Optional workflow adds draft → publish with sagas and submit.
File structure
concert-app/
app.causet
states/
user.state.causet
artist.state.causet
events/
follow.events.causet
show.events.causet
actions/
follow.actions.causet
show.actions.causet
projections/
follow.projections.causet
queries/
follow.queries.causet
relationships/
follow.relationships.causet
sagas/ # optional — from Your First Workflow
show.sagas.causetApp manifest
# app.causet
dsl_version: 1
app: concert_app
includes:
states: [./states/**/*.state.causet]
events: [./events/**/*.events.causet]
actions: [./actions/**/*.actions.causet]
projections: [./projections/**/*.projections.causet]
queries: [./queries/**/*.queries.causet]
relationships: [./relationships/**/*.relationships.causet]Add sagas: [./sagas/**/*.sagas.causet] if you included the workflow tutorial.
All DSL files
Tutorial pages contain the full source for each layer. Quick reference:
| Layer | Files | Tutorial |
|---|---|---|
| State | states/user.state.causet, states/artist.state.causet | Your First State |
| Events | events/follow.events.causet, events/show.events.causet | Your First Event |
| Intents | actions/follow.actions.causet, actions/show.actions.causet | Your First Intent |
| Projections | projections/follow.projections.causet | Your First Projection |
| Queries | queries/follow.queries.causet | Your First Query |
| Relationships | relationships/follow.relationships.causet | Your First Relationship |
| Workflow | sagas/show.sagas.causet + draft/publish intents | Your First Workflow |
For copy-paste-ready snippets in one page, see Quickstart. To create the project: causet init → Concert app.
Compile
cd concert-app
causet build validate --runtime .
causet build compile --runtime . --out dist/Expected artifacts in dist/:
ruleset.vrd
causet.projections.json
manifest.jsonDeploy
causet context use platform my-platform
causet context use app concert-app
causet release create --input dist/ --tag 1.0.0
causet release publish --tag 1.0.0
causet deploy apply --tag 1.0.0 --fork main
causet deploy activate --tag 1.0.0 --fork main --mode FULLOr one command — causet deploy runs compile, release, publish, and activate as a single golden path:
causet deploy --fork main --runtime . --fullSee Deployments for forks, staging, and rollbacks.
Run it
1. Follow an artist
causet intent FOLLOW_ARTIST \
--fork main \
--stream user_stream \
--entity user-1 \
--payload '{"user_id":"user-1","artist_id":"artist-pearl-jam"}'2. Announce a show
causet intent ANNOUNCE_SHOW \
--fork main \
--stream artist_stream \
--entity artist-pearl-jam \
--payload '{"artist_id":"artist-pearl-jam","show_id":"show-pj-brooklyn-2026","venue":"Barclays Center","date":"2026-09-15","title":"Pearl Jam - Dark Matter Tour"}'3. Query shows for followed artists
Wait a few seconds for projection materialization, then:
causet query shows_for_followed_artists \
--fork main \
--param user_id=user-1You should see the Pearl Jam Brooklyn show.
Tutorial map
| Step | Page | What you added |
|---|---|---|
| 0 | causet init → Concert app | Scaffold the full project |
| 1 | Quickstart | All layers at once (alternative path) |
| 2 | Your First State | user, artist entities |
| 3 | Your First Event | Follow and show events |
| 4 | Your First Intent | FOLLOW_ARTIST, ANNOUNCE_SHOW |
| 5 | Your First Projection | user_following, artist_show_directory |
| 6 | Your First Query | shows_for_followed_artists |
| 7 | Your First Relationship | artist_followers edge |
| 8 | Your First Workflow | Draft → publish saga (optional) |
| 9 | This page | Compile, deploy, run end-to-end |
Go deeper
- Concert App — check-ins, going, reviews, richer projections
- Intents · Projections · Queries · Relationships
- Deployments — staging and production