Skip to content
The xtandard-flags logoThe xtandard-flags logo

@xtandard/flags

A self-hosted, embeddable, OpenFeature-compatible feature-flag control plane with pluggable storage and memory-first runtime evaluation. Applications evaluate flags from memory; the admin panel is never in the request path.
Terminal window
npm install @xtandard/flags

Run it standalone (Docker or npx @xtandard/flags serve), embed the admin panel in the app you already have (Elysia, Hono, Express, Bun, Next.js), or use its OpenFeature provider on its own. One package: every integration is a subpath export whose dependencies are optional peer dependencies, installed only when you use it.

The @xtandard/flags admin dashboard: the flag list of a project environment

Unleash, Flagsmith and GO Feature Flag are great, but most assume a server in (or near) the request path and a heavier deployment. @xtandard/flags owns a narrower gap:

Self-hosted OpenFeature admin

Your data, your infrastructure, no SaaS. A bundled admin SPA: mounting the panel does not make you install React.

Pluggable storage

Memory, file, Redis, Postgres, MongoDB, SQLite, libSQL/Turso, Cloudflare KV, Drizzle or any unstorage driver. Bring your own with four methods.

Local-first evaluation

A tiny, zero-dependency evaluator and provider run in-process. Deterministic splits, never throws, keeps serving when the panel is offline.

Any language, a standard protocol

Other languages evaluate over OFREP: point any OpenFeature SDK’s generic OFREP provider at the panel. ETag/304 caching and an opt-in SSE stream.

It is intentionally not a LaunchDarkly clone: no experiment analytics, no hosted SaaS, no mandatory Redis, Postgres or auth. Batteries included, not required: everything official implements a public contract you can replace. Why & how it works →

import { Hono } from "hono";
import { flagsPanel } from "@xtandard/flags/hono";
import { createRedisStorage } from "@xtandard/flags/storage/redis";
import { basicAuth } from "@xtandard/flags/auth/basic";
const app = new Hono();
app.route(
"/flags",
flagsPanel({
basePath: "/flags",
sourceStorage: createRedisStorage({ url: process.env.REDIS_URL!, prefix: "flags:source" }),
runtimeStorage: createRedisStorage({ url: process.env.REDIS_URL!, prefix: "flags:runtime" }),
auth: basicAuth({
users: [{ username: "admin", passwordHash: process.env.FLAGS_ADMIN_PASSWORD_HASH! }],
}),
}),
);
export default app;

Open /flags, create a flag, and Publish: the draft compiles into an immutable snapshot in runtime storage. Framework adapters →

Two planes. The admin / control plane (UI, JSON API, CLI) edits drafts in source storage and publishes immutable snapshots to runtime storage. The application runtime loads a whole snapshot into memory and evaluates in-process, so the panel is never in the request path.

flowchart LR
  subgraph Admin["Admin / control plane"]
    direction TB
    UI["Admin UI · CLI"] --> API["JSON API<br/>auth · authorization · hooks"]
    API --> SRC[("Source storage<br/>drafts · history · audit")]
    API -- "publish → compile<br/>immutable snapshot" --> RT[("Runtime storage<br/>published snapshots")]
  end

  subgraph App["Your application (JS/TS)"]
    direction TB
    PROV["OpenFeature provider"] -- "load snapshot once" --> MEM[["In-memory snapshot"]]
    MEM --> EVAL["Evaluate in-process<br/>zero deps · never throws"]
  end

  subgraph Other["Other languages"]
    SDK["Any OpenFeature SDK<br/>+ OFREP provider"]
  end

  RT --> PROV
  PROV -. "refresh: poll or watch" .-> RT
  SDK -- "OFREP over HTTP<br/>ETag/304 · SSE" --> API

Every flag is variant-based, and evaluation follows a fixed order: enabled → schedule window → prerequisites → exact overrides → targeting rules (first match wins) → fallthrough. Splits are deterministic (MurmurHash3 on the flag key, the targeting key and a salt). The flag model →

@xtandard/flags is one of a family of open-source, MIT-licensed projects that share the xtandard name. They are independent of each other: use any of them on its own.

All of them, with npm and GitHub links: the xtandard ecosystem.