LearnComplete Concert App

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 init

Choose 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

  1. User follows an artist → ARTIST_FOLLOWED → row in user_following
  2. Artist announces a show → SHOW_ANNOUNCED → row in artist_show_directory
  3. 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.causet

App 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:

LayerFilesTutorial
Statestates/user.state.causet, states/artist.state.causetYour First State
Eventsevents/follow.events.causet, events/show.events.causetYour First Event
Intentsactions/follow.actions.causet, actions/show.actions.causetYour First Intent
Projectionsprojections/follow.projections.causetYour First Projection
Queriesqueries/follow.queries.causetYour First Query
Relationshipsrelationships/follow.relationships.causetYour First Relationship
Workflowsagas/show.sagas.causet + draft/publish intentsYour First Workflow

For copy-paste-ready snippets in one page, see Quickstart. To create the project: causet initConcert 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.json

Deploy

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 FULL

Or one command — causet deploy runs compile, release, publish, and activate as a single golden path:

causet deploy --fork main --runtime . --full

See 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-1

You should see the Pearl Jam Brooklyn show.


Tutorial map

StepPageWhat you added
0causet initConcert appScaffold the full project
1QuickstartAll layers at once (alternative path)
2Your First Stateuser, artist entities
3Your First EventFollow and show events
4Your First IntentFOLLOW_ARTIST, ANNOUNCE_SHOW
5Your First Projectionuser_following, artist_show_directory
6Your First Queryshows_for_followed_artists
7Your First Relationshipartist_followers edge
8Your First WorkflowDraft → publish saga (optional)
9This pageCompile, deploy, run end-to-end

Go deeper