SDK

Latch evaluates flags with consistent hashing so the same user stays in the same bucket as you climb 1 → 5 → 25 → 100.

Drop-in evaluator

import { evaluateFlag } from "@latch/sdk";

const checkout = evaluateFlag(
  flags["checkout.express"],
  "production",
  { userId: user.id, plan: user.plan, email: user.email }
);

if (checkout.on) {
  renderExpressCheckout();
}

Current production snapshot

[
  {
    "key": "checkout.express",
    "production": {
      "enabled": true,
      "rollout": 25,
      "rules": [
        {
          "id": "r1",
          "attribute": "plan",
          "operator": "in",
          "value": "pro,enterprise",
          "enabled": true
        }
      ]
    }
  },
  {
    "key": "search.semantic",
    "production": {
      "enabled": true,
      "rollout": 10,
      "rules": []
    }
  },
  {
    "key": "returns.self_serve",
    "production": {
      "enabled": true,
      "rollout": 100,
      "rules": []
    }
  },
  {
    "key": "ops.rate_limit_v2",
    "production": {
      "enabled": false,
      "rollout": 0,
      "rules": []
    }
  },
  {
    "key": "perms.staff_discount",
    "production": {
      "enabled": true,
      "rollout": 0,
      "rules": [
        {
          "id": "r2",
          "attribute": "email",
          "operator": "contains",
          "value": "@aurora.dev",
          "enabled": true
        }
      ]
    }
  },
  {
    "key": "pdp.related_v3",
    "production": {
      "enabled": true,
      "rollout": 5,
      "rules": []
    }
  }
]