{"id":50551423,"url":"https://github.com/sztheory/rulestead","last_synced_at":"2026-06-04T04:00:24.925Z","repository":{"id":353396055,"uuid":"1219249191","full_name":"szTheory/rulestead","owner":"szTheory","description":"Elixir-native feature flags, experimentation, and remote config with a mountable LiveView admin UI","archived":false,"fork":false,"pushed_at":"2026-05-31T21:04:09.000Z","size":40338,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T21:19:36.450Z","etag":null,"topics":["ab-testing","ecto","elixir","experimentation","feature-flag","feature-flags","feature-toggles","hex","phoenix","phoenix-liveview","remote-config","rollout"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/rulestead/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szTheory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-23T17:24:43.000Z","updated_at":"2026-05-30T14:07:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/szTheory/rulestead","commit_stats":null,"previous_names":["sztheory/rulestead"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/szTheory/rulestead","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Frulestead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Frulestead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Frulestead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Frulestead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szTheory","download_url":"https://codeload.github.com/szTheory/rulestead/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Frulestead/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33888302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ab-testing","ecto","elixir","experimentation","feature-flag","feature-flags","feature-toggles","hex","phoenix","phoenix-liveview","remote-config","rollout"],"created_at":"2026-06-04T04:00:21.436Z","updated_at":"2026-06-04T04:00:24.908Z","avatar_url":"https://github.com/szTheory.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rulestead\n\n\u003e **Runtime decisions, made clear.**\n\u003e Typed feature flags, variants, and remote config for Elixir apps, with an\n\u003e optional mounted Phoenix LiveView admin.\n\n\u003e **Two version lines:** GitHub repo milestones (e.g. `v1.0.0` GA, May 2026)\n\u003e track project delivery. **Hex packages** use `0.1.x` semver (currently\n\u003e **0.1.x** on Hex) until a future `1.0` API freeze. Install with\n\u003e `{:rulestead, \"~\u003e 0.1\"}`.\n\n## What this is (60 seconds)\n\nRulestead ships as two sibling Hex packages:\n\n- `rulestead` for the runtime evaluator, installer, context builders, and test helpers\n- `rulestead_admin` for the optional host-mounted admin UI\n\nThe runtime promise is simple: evaluation stays deterministic, rule precedence\nis explicit, and operators can explain why a decision happened without reverse\nengineering application state.\n\nPost-GA product surfaces — tenancy helpers, lifecycle hygiene, guarded\nrollouts, reusable audiences, blast-radius governance — are documented in\n[Product Boundary](guides/introduction/product-boundary.md).\n\n**Prove it locally:** `docker compose up --build`, the\n[Adoption Lab](guides/introduction/adoption-lab.md#at-a-glance) runbook, or\n`scripts/demo/proof.sh`. Running alongside other demos, or port 4000/3000 in\nuse? Use `scripts/demo/up.sh` — it auto-selects free ports, namespaces the\nproject, and prints the URLs (`scripts/demo/down.sh` to stop).\n\n## 15-minute quickstart\n\nStart with the runtime package:\n\n```elixir\ndefp deps do\n  [\n    {:rulestead, \"~\u003e 0.1\"}\n  ]\nend\n```\n\nInstall and migrate:\n\n```bash\nmix deps.get\nmix rulestead.install\nmix ecto.migrate\n```\n\n**Phoenix integrators:** follow the\n[Phoenix Integration Spine](guides/introduction/phoenix-integration-spine.md)\nfor supervision → Plug → `Rulestead.Runtime` → lifecycle-honest flag create.\n\nGate a code path (payload-first — see [evaluation.md](guides/flows/evaluation.md)):\n\n```elixir\ncontext =\n  Rulestead.Context.new(\n    environment: \"production\",\n    targeting_key: \"user-123\",\n    attributes: %{plan: :pro}\n  )\n\nflag_payload = ... # from snapshot or store\n\nwith {:ok, result} \u003c- Rulestead.evaluate(flag_payload, context) do\n  if result.enabled? do\n    render_v2(conn)\n  else\n    render_v1(conn)\n  end\nend\n```\n\nWhen using Phoenix with the snapshot cache, load the flag by environment key via\n`Rulestead.Runtime` (see [evaluation.md](guides/flows/evaluation.md) and\n[multi-env.md](guides/flows/multi-env.md)):\n\n```elixir\ncontext = conn.assigns[:rulestead_context]\n\n{:ok, enabled?} =\n  Rulestead.Runtime.enabled?(\"production\", \"checkout_v2\", context)\n```\n\nIf your Phoenix app also needs the mounted companion admin, add\n`rulestead_admin` immediately after the runtime dependency:\n\n```elixir\ndefp deps do\n  [\n    {:rulestead, \"~\u003e 0.1\"},\n    {:rulestead_admin, \"~\u003e 0.1\"}\n  ]\nend\n```\n\nMount the admin UI only if your app needs it:\n\n```elixir\nimport RulesteadAdmin.Router\n\nscope \"/\" do\n  pipe_through :browser\n\n  rulestead_admin \"/admin/flags\", policy: MyApp.RulesteadPolicy\nend\n```\n\nThe guided walkthrough continues in\n[Getting Started](guides/introduction/getting-started.md).\n\n## Choose your path\n\n### Build with Rulestead\n\n- [Installation](guides/introduction/installation.md)\n- [Getting Started](guides/introduction/getting-started.md)\n- [Domain Language \u0026 Concepts](guides/introduction/domain_language.md)\n- [Flag Lifecycle](guides/flows/flag-lifecycle.md)\n- [User Flows and JTBD](guides/introduction/user-flows-and-jtbd.md)\n- [Evaluation](guides/flows/evaluation.md), [Rulesets](guides/flows/rulesets.md),\n  [Testing](guides/recipes/testing.md)\n\n### Operate via Admin UI\n\n- [rulestead_admin/README.md](rulestead_admin/README.md)\n- [Admin UI](guides/flows/admin-ui.md)\n- [Explainability](guides/flows/explainability.md)\n- [Multi-environment usage](guides/flows/multi-env.md)\n\n### Extend Rulestead\n\n- [CONVENTIONS.md](CONVENTIONS.md)\n- [CONTRIBUTING.md](CONTRIBUTING.md) and [MAINTAINING.md](MAINTAINING.md)\n\n## Why teams adopt it\n\n- Deterministic evaluation and sticky bucketing for predictable rollouts\n- Ordered rules with first-match-wins precedence\n- Explainable decisions for support, operators, and incident response\n- Test helpers and fake-backed workflows that do not require Postgres in the hot loop\n- A sibling-package layout so runtime-only apps do not carry LiveView admin weight\n\n## Repository layout\n\n- `rulestead/` — runtime package\n- `rulestead_admin/` — optional admin package\n- `examples/demo/` — FleetDesk adoption lab (backend + frontend)\n- `guides/` — shared HexDocs guides\n\n## Local demo\n\nThe **FleetDesk adoption lab** runs three surfaces locally: customer app\n(`:3000`), Rulestead admin (`/demo/sign-in`), and API (`:4000`).\n\n```bash\nscripts/demo/up.sh\n```\n\nThe script uses `3000` and `4000` when they are free, chooses fallback ports\nwhen they are not, and prints the actual URLs to open.\n\n**Runbook:** [Adoption Lab](guides/introduction/adoption-lab.md#at-a-glance)\n\nBounded automation: `scripts/demo/proof.sh`\n\n## Maintainers\n\nProof bars, CI scopes, and release verification:\n[MAINTAINING.md](MAINTAINING.md)\n\n## Versioning\n\nSee [Upgrading](guides/introduction/upgrading.md) for compatibility posture on\nthe `0.1.x` package line.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsztheory%2Frulestead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsztheory%2Frulestead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsztheory%2Frulestead/lists"}