config
Feature flags and remote config for apps, bots and mobile apps, per project and environment. Host:
config.<d>. Binary: configd. Stage 9.
- Flag: boolean, string, number or JSON; per environment value; targeting rules (user ids, attributes,
percentage rollout with sticky bucketing, app version), default; kill switch.
- Config: typed JSON documents (validated by a JSON Schema) per environment, versioned with diff and
rollback.
- Delivery:
GET config.<d>/v1/<env key>/flags (evaluated server-side for a context) and the full
ruleset for local evaluation; Server-Sent Events for live updates; ETags and a CDN-friendly cache.
- SDKs: Go and TypeScript first, Swift next (thin: fetch, cache, evaluate, subscribe).
- Every change is audited and can require a second person for protected environments.
CLI: xvii config flags, xvii config set <flag> <value> --env production.
As built (stage 9)
- A flag or config belongs to a project of id and has a value per environment of the project; a team's
developers change them, protected environments take an admin (a second person's approval comes later).
Every change is in the journal and bumps the environment's revision.
- Flag kinds boolean, string, number, JSON. On: rules in order (attribute + in, not_in, contains,
starts_with, ends_with, lt, gt, version_gte, version_lt), then the fallthrough; off: the off value (the
kill switch). Any served value can be a rollout by weights, sticky by an attribute (sha1 of flag and
value, 100000 buckets) — the Go and TypeScript SDKs bucket the same way as the server.
- Configs: JSON documents per environment, checked by an optional JSON Schema (draft 2020-12 and older),
versioned with diff and rollback (a rollback saves the old value as the next version).
- Delivery with an environment's key (
cfg_…, read-only: it ships to clients; made when a project's keys
are first opened, rotatable): GET /v1/ruleset (ETag = revision), GET|POST /v1/flags (evaluated for a
context from the query or {"context": …}), GET /v1/configs/<key>, GET /v1/stream (SSE: the ruleset
now and on every change, keepalives every 25 s). CORS is open.
- SDKs: Go
go.xvii.network/config/sdk (fetch, local evaluation, SSE follow, Bool/String/Number/
JSON/Config), TypeScript /sdk/xvii-config.ts (one file, no dependencies). Swift next.
- CLI:
xvii config flags --project P, xvii config set FLAG on|off|VALUE --env E --project P.
- Limits
config.flags, config.configs.