Open-source, self-hosted feature flag and remote configuration platform for Next.js. Think of it as a lightweight alternative to LaunchDarkly that runs inside your app with SQLite — no external services.
To add fyeo to an existing Next.js app, follow the step-by-step Getting started section on the Overview page at /overview (after you’ve integrated the app: copy the fyeo folders, install deps, and wire the root layout).
-
Install
npm install
-
Configure
- Copy
.env.exampleto.env.local(or setFYEO_SECRETand optionallyFYEO_ENV). - The database is created at
.fyeo/flags.dbon first use.
- Copy
-
Run
npm run dev
-
Dashboard
- Open http://localhost:3000/flags to manage flags.
-
Server components / API
import { getFlag, getAllFlags } from "@/lib/fyeo"; const on = getFlag<boolean>("new-checkout-flow"); const flags = await getAllFlags({ id: user.id });
-
Client components
- Wrap your app (or layout) with
<FyeoProvider flags={flags}>and passflagsfromgetAllFlags()in the root layout. - Then:
const on = useFlag("new-checkout-flow");
- Wrap your app (or layout) with
-
Middleware (Edge)
import { getFlagInMiddleware } from "@/lib/fyeo"; const enabled = await getFlagInMiddleware("my-flag", request);
| Variable | Description |
|---|---|
FYEO_SECRET |
Secret for protecting admin API |
FYEO_ENV |
Current environment slug (default: development) |
FYEO_DB_PATH |
DB path (default: .fyeo/flags.db) |
lib/fyeo/— DB, evaluator, SDK, typesapp/api/fyeo/[...path]/— REST APIapp/(dashboard)/— Admin UI (Overview, Flags, Environments, Audit) at top-level routes