{"id":46294498,"url":"https://github.com/err0r500/fairway-spec","last_synced_at":"2026-03-04T09:07:11.626Z","repository":{"id":338205966,"uuid":"1156975661","full_name":"err0r500/fairway-spec","owner":"err0r500","description":"A DSL + CLI to specify \u0026 visualize your vertical slices","archived":false,"fork":false,"pushed_at":"2026-02-27T15:06:28.000Z","size":450,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-27T19:38:19.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/err0r500.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-13T09:24:54.000Z","updated_at":"2026-02-27T16:28:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/err0r500/fairway-spec","commit_stats":null,"previous_names":["err0r500/event-modeling-dcb-spec","err0r500/fairway-spec"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/err0r500/fairway-spec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/err0r500%2Ffairway-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/err0r500%2Ffairway-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/err0r500%2Ffairway-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/err0r500%2Ffairway-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/err0r500","download_url":"https://codeload.github.com/err0r500/fairway-spec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/err0r500%2Ffairway-spec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30076935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-04T09:07:10.914Z","updated_at":"2026-03-04T09:07:11.618Z","avatar_url":"https://github.com/err0r500.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fairway spec\n\n## Demos\n### Boad validation\n\n[![validation demo](https://img.youtube.com/vi/AR7GUBSW1rw/0.jpg)](https://www.youtube.com/watch?v=AR7GUBSW1rw)\n\n### Web view\n[![validation demo](https://img.youtube.com/vi/IGCtdy1hm8I/0.jpg)](https://www.youtube.com/watch?v=IGCtdy1hm8I)\n\n## Run\n\n```\ngo run ./cmd/render -file examples/cart.cue -outdir .board/ -watch\n\ngo run ./cmd/tui -dir .board/\ncd web \u0026\u0026 BOARD_DIR=../.board npm run dev\n```\n\n## Using in Another Repo\n\nAdd dependency:\n```bash\ncue mod init your.module/name\ncue mod get github.com/err0r500/event-modeling-dcb-spec@latest\n```\n\nImport schema:\n```cue\npackage myboard\n\nimport \"github.com/err0r500/event-modeling-dcb-spec/em\"\n\nem.#Board \u0026 {\n    name: \"MyDomain\"\n    // ...\n}\n```\n\n## Validation Rules\n\n### Board Structure\n\n| Rule | Description |\n|------|-------------|\n| Actor existence | Actors referenced in slices must exist in `actors` |\n| Event definition | Emitted events must be defined in `events` |\n| Tag definition | All tags in DCB queries must exist in `tags` |\n\n### Change Slice (Command)\n\n| Rule | Description |\n|------|-------------|\n| Field source | Command fields must come from trigger (endpoint params/body or externalEvent), mapping, or computed |\n| Field type | Types must match between source and command field |\n| Emit field source | Event fields must come from command.fields, mapping, or computed |\n| Emit field type | Types must match between source and event field |\n| Path param consistency | Endpoint path params (e.g. `{cartId}`) must exist in params fields |\n\n### View Slice (Query)\n\n| Rule | Description |\n|------|-------------|\n| Event ordering | Can only query events emitted by earlier change slices in flow |\n| ReadModel field source | Fields must come from queried events, computed, or mapping |\n| Computed event queried | Computed source event must be in query |\n| Computed field exists | Computed fields must exist in source event |\n| Mapping event queried | Mapping source event must be in query |\n| Mapping field exists | Mapping field must exist in source event |\n| Mapping type match | ReadModel field type must match event field type |\n| Dotted path resolution | Dotted paths (e.g. \"items.price\") must resolve to actual fields (Go) |\n| Dotted path type | Resolved field type must match event field type (Go) |\n| Path param consistency | Endpoint path params (e.g. `{cartId}`) must exist in params fields |\n| Scenario given in query | View scenario `given` events must be in query types |\n\n### DCB Query\n\n| Rule | Description |\n|------|-------------|\n| Event has tags | Every event in query must have ALL required tags |\n| Parameterized tag value | Tags with `param` require a `value` in queries (Go) |\n\n### GWT Scenarios\n\n| Rule | Description |\n|------|-------------|\n| Command name match | Scenario `when.name` must match slice command name |\n| Given event in query | Given events must be in command's query types |\n| Then event in emits | Success scenario `then.events` must be in slice's emits |\n| Event value types | Event field values must match field types |\n\n\n---\n## Future Improvements\n\n| Category | Check | Description |\n|----------|-------|-------------|\n| Structural | Non-empty emits | Change slice with empty emits is likely a mistake |\n| Structural | Computed/mapping overlap | Same field shouldn't be both computed AND mapped |\n| Type | Tag value type | Parameterized tag value should match tag.param type |\n| Type | View endpoint response | Endpoint should reflect readModel (currently not linked) |\n| Scenario | All emits tested | Every emitted event should appear in at least one success scenario |\n| Scenario | Error scenario for queries | Commands with non-empty query should have error scenarios |\n| DCB | Query not empty when needed | Command that emits to existing aggregate needs query to load state |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferr0r500%2Ffairway-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferr0r500%2Ffairway-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferr0r500%2Ffairway-spec/lists"}