{
 "description": "Verified Soma programs. Every entry passed `soma check` (and `soma test` / `soma verify` where applicable) on the soma version below, re-run when this index was generated. Fetch `url` for the source. Filter by `domain` or `features` to find a working example of what you are about to write.",
 "soma_version": "3.2.4",
 "count": 16,
 "domains": {
  "web": 16
 },
 "features": [
  "agent",
  "cost",
  "fail",
  "guard",
  "http",
  "invariant",
  "lambda",
  "match",
  "multi_cell",
  "native",
  "pipeline",
  "service",
  "skeleton",
  "state_machine",
  "sum_type",
  "think",
  "tools",
  "try"
 ],
 "programs": [
  {
   "id": "web/blog_tags",
   "domain": "web",
   "title": "Mini blog API with tag filtering. Posts carry a list of tags;",
   "summary": "Mini blog API with tag filtering. Posts carry a list of tags; GET /posts?tag=X filters in-memory using a pipe over stored records.",
   "url": "https://soma-lang.dev/corpus/web/blog_tags.cell",
   "repo_path": "examples/corpus/web/blog_tags.cell",
   "lines": 61,
   "features": [
    "http",
    "pipeline",
    "match",
    "lambda"
   ],
   "cells": [
    "Blog",
    "BlogTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/contact_form",
   "domain": "web",
   "title": "Form handler with server-side validation",
   "summary": "Form handler with server-side validation. POST /contact validates each field and either stores the submission or returns a 422 with field errors.",
   "url": "https://soma-lang.dev/corpus/web/contact_form.cell",
   "repo_path": "examples/corpus/web/contact_form.cell",
   "lines": 54,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "ContactForm",
    "ContactFormTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/counter_api",
   "domain": "web",
   "title": "Counter API: a persistent integer counter exposed over HTTP",
   "summary": "Counter API: a persistent integer counter exposed over HTTP. One fat `on request` routes GET/POST. State lives in a [persistent] slot. curl -X POST localhost:8080/inc ; curl localhost:8080/value",
   "url": "https://soma-lang.dev/corpus/web/counter_api.cell",
   "repo_path": "examples/corpus/web/counter_api.cell",
   "lines": 68,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "CounterApi",
    "CounterApiTest"
   ],
   "usage": [
    "soma serve counter_api.cell"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/feature_flags",
   "domain": "web",
   "title": "Feature-flag service: toggle named flags on/off, query state, list all",
   "summary": "Feature-flag service: toggle named flags on/off, query state, list all. Booleans stored as \"on\"/\"off\" strings in a persistent map.",
   "url": "https://soma-lang.dev/corpus/web/feature_flags.cell",
   "repo_path": "examples/corpus/web/feature_flags.cell",
   "lines": 61,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "Flags",
    "FlagsTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/guestbook",
   "domain": "web",
   "title": "Guestbook: append-only signed entries, rendered as a small HTML page",
   "summary": "Guestbook: append-only signed entries, rendered as a small HTML page. The form POSTs name+message; entries are stored in an immutable log. curl -X POST localhost:8080/sign -d '{\"name\":\"Ada\",\"message\":\"hi\"}'",
   "url": "https://soma-lang.dev/corpus/web/guestbook.cell",
   "repo_path": "examples/corpus/web/guestbook.cell",
   "lines": 66,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "Guestbook",
    "GuestbookTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/kv_store",
   "domain": "web",
   "title": "Key-value store API with namespaced keys and a bulk export endpoint",
   "summary": "Key-value store API with namespaced keys and a bulk export endpoint. PUT /kv/<key> sets, GET reads, DELETE removes, GET /kv exports all.",
   "url": "https://soma-lang.dev/corpus/web/kv_store.cell",
   "repo_path": "examples/corpus/web/kv_store.cell",
   "lines": 65,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "KvStore",
    "KvStoreTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/leaderboard",
   "domain": "web",
   "title": "Leaderboard API: submit a score, get the ranked top-N",
   "summary": "Leaderboard API: submit a score, get the ranked top-N. Keeps the best score per player and returns a sorted slice.",
   "url": "https://soma-lang.dev/corpus/web/leaderboard.cell",
   "repo_path": "examples/corpus/web/leaderboard.cell",
   "lines": 86,
   "features": [
    "http",
    "pipeline",
    "match"
   ],
   "cells": [
    "Leaderboard",
    "LeaderboardTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/metrics_api",
   "domain": "web",
   "title": "Metrics / health endpoint. Every request bumps a request counter;",
   "summary": "Metrics / health endpoint. Every request bumps a request counter; GET /health returns status + uptime-style fields, GET /metrics the tallies.",
   "url": "https://soma-lang.dev/corpus/web/metrics_api.cell",
   "repo_path": "examples/corpus/web/metrics_api.cell",
   "lines": 63,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "Metrics",
    "MetricsTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/notes_crud",
   "domain": "web",
   "title": "CRUD JSON API over a persistent Map: notes with title + body",
   "summary": "CRUD JSON API over a persistent Map: notes with title + body. Returns Maps directly (auto-serialized to JSON) and 404 responses on miss. curl -X POST localhost:8080/api/notes -d '{\"title\":\"hi\",\"body\":\"world\"}'",
   "url": "https://soma-lang.dev/corpus/web/notes_crud.cell",
   "repo_path": "examples/corpus/web/notes_crud.cell",
   "lines": 77,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "Notes",
    "NotesTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/paginated_list",
   "domain": "web",
   "title": "Paginated product list: GET /products?page=N&size=M slices a stored list",
   "summary": "Paginated product list: GET /products?page=N&size=M slices a stored list. Returns a Map with items + pagination metadata (total, page, pages).",
   "url": "https://soma-lang.dev/corpus/web/paginated_list.cell",
   "repo_path": "examples/corpus/web/paginated_list.cell",
   "lines": 57,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "Catalog",
    "CatalogTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/poll_api",
   "domain": "web",
   "title": "Voting / poll API: fixed options, one counter per option, results sorted",
   "summary": "Voting / poll API: fixed options, one counter per option, results sorted. POST /vote/<option> increments; GET /results returns sorted tallies.",
   "url": "https://soma-lang.dev/corpus/web/poll_api.cell",
   "repo_path": "examples/corpus/web/poll_api.cell",
   "lines": 63,
   "features": [
    "http",
    "pipeline",
    "match",
    "lambda"
   ],
   "cells": [
    "Poll",
    "PollTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/sessions",
   "domain": "web",
   "title": "Session/login toy: POST /login issues a token, GET /me/<token> returns the user, POST /logout invalidates it",
   "summary": "Session/login toy: POST /login issues a token, GET /me/<token> returns the user, POST /logout invalidates it. Tokens map to usernames.",
   "url": "https://soma-lang.dev/corpus/web/sessions.cell",
   "repo_path": "examples/corpus/web/sessions.cell",
   "lines": 58,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "Sessions",
    "SessionsTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/site_router",
   "domain": "web",
   "title": "Multi-page static site: home, about, and a dynamic greeting route",
   "summary": "Multi-page static site: home, about, and a dynamic greeting route. Demonstrates html() pages, path captures, and a 404 fallthrough.",
   "url": "https://soma-lang.dev/corpus/web/site_router.cell",
   "repo_path": "examples/corpus/web/site_router.cell",
   "lines": 42,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "Site",
    "SiteTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/todo_state",
   "domain": "web",
   "title": "Todo service backed by a typed state machine (sum type TodoStatus)",
   "summary": "Todo service backed by a typed state machine (sum type TodoStatus). Each todo transitions Pending -> InProgress -> Done, or * -> Cancelled.",
   "url": "https://soma-lang.dev/corpus/web/todo_state.cell",
   "repo_path": "examples/corpus/web/todo_state.cell",
   "lines": 82,
   "features": [
    "state_machine",
    "sum_type",
    "http",
    "match"
   ],
   "cells": [
    "TodoStatus",
    "TodoService",
    "TodoServiceTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/url_shortener",
   "domain": "web",
   "title": "URL shortener: POST a long URL, get a short code; GET the code redirects",
   "summary": "URL shortener: POST a long URL, get a short code; GET the code redirects. Base36 code derived from a monotonic id. Hit count tracked per code. curl -X POST localhost:8080/shorten -d '{\"url\":\"https://soma.dev\"}' curl -i localhost:8080/r/<code>",
   "url": "https://soma-lang.dev/corpus/web/url_shortener.cell",
   "repo_path": "examples/corpus/web/url_shortener.cell",
   "lines": 75,
   "features": [
    "http",
    "match"
   ],
   "cells": [
    "Shortener",
    "ShortenerTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  },
  {
   "id": "web/webhook_log",
   "domain": "web",
   "title": "Webhook receiver + event log. POST /hook/<source> appends an event;",
   "summary": "Webhook receiver + event log. POST /hook/<source> appends an event; GET /events returns recent events newest-first with a bounded capacity.",
   "url": "https://soma-lang.dev/corpus/web/webhook_log.cell",
   "repo_path": "examples/corpus/web/webhook_log.cell",
   "lines": 71,
   "features": [
    "http",
    "pipeline",
    "match",
    "lambda"
   ],
   "cells": [
    "Webhooks",
    "WebhooksTest"
   ],
   "manifest": "https://soma-lang.dev/corpus/web/soma.toml"
  }
 ]
}