Skip to content

Introduction

Gates is Lucerna's feature-control product. It gives you three tools:

  • Kill switches — turn a code path off for everyone, instantly. Changes reach your servers within 10 seconds.
  • Feature flags — turn features on or off per user, with targeting rules and percentage rollouts.
  • Experiments — A/B tests. Users are split into variants and stay in them.

Each one has a key — the lowercase name you gave it in the dashboard (new_billing, checkout_test, payments).

You use Gates from your backend with the Node, Ruby or Elixir SDK — each downloads your rules once, then answers every check instantly from memory. In the frontend, the Browser SDK fetches ready-made decisions with a public client key; your rules never leave the server.

Already on OpenFeature, or using Vercel's Flags SDK? The OpenFeature provider plugs Gates into both without importing a Lucerna SDK directly.

Keys

In the dashboard, open Settings → API keys. Each environment (production, staging, …) has two keys:

KeyLooks likeUse it in
Server keyck_srv_prod_…Your backend. Keep it secret.
Client keyck_client_prod_…Browsers and mobile apps. Safe to expose.

Two rules the SDKs enforce for you:

  • The key picks the environment. A production key serves production rules; point staging at your staging key. There's no separate environment setting.
  • The key must match the SDK. The Node SDK refuses a client key (it can't download rules), and the browser SDK refuses a secret key (it would be readable by anyone) — both fail at startup with the fix in the message.

Send it as a bearer token:

Authorization: Bearer ck_srv_prod_…

For scoped keys and the full grant vocabulary, see Authentication.

WARNING

Decisions sent to a browser can be tampered with. Use them to show or hide UI — always re-check permissions on your backend.

Users and traits

Every check is for a user:

  • userId — your app's id for the user. Gates uses it to keep decisions sticky: the same user always gets the same rollout and variant answer.
  • traits — attributes like plan or email that targeting rules match on.

No userId? Kill switches and fully-on flags still work; percentage rollouts and experiments answer safely off.

Use your app's id for userId, never an email — see Identity for the helper package and Privacy & GDPR for the rules and erasure.

Next

Lucerna Developer Docs