@geenius/feature-flags
v0.12.0
Published
Geenius Feature Flags — Runtime feature toggles, rollout controls, and experiment tooling
Maintainers
Readme
@geenius/feature-flags
Runtime feature toggles, rollout controls, and experiment tooling for Geenius applications.
Installation
pnpm add @geenius/feature-flagsInstall the peers required by the variant you render with:
reactandreact-domfor@geenius/feature-flags/reactand@geenius/feature-flags/react-csssolid-jsfor@geenius/feature-flags/solidjsand@geenius/feature-flags/solidjs-cssconvexfor@geenius/feature-flags/convex
Imports
import { evaluateFlag, RULE_OPERATORS } from "@geenius/feature-flags";
import { evaluateFlag, RULE_OPERATORS } from "@geenius/feature-flags/shared";
import { FeatureFlagsPage, FlagDetailPage } from "@geenius/feature-flags/react";
import {
FeatureFlagsPage as CssFeatureFlagsPage,
FlagToggle as CssFlagToggle,
} from "@geenius/feature-flags/react-css";
import {
createFeatureFlags,
FeatureFlagsPage as SolidFeatureFlagsPage,
} from "@geenius/feature-flags/solidjs";
import {
createFeatureFlags as createCssFeatureFlags,
FlagToggle as SolidCssFlagToggle,
} from "@geenius/feature-flags/solidjs-css";
import { schema, queries, mutations } from "@geenius/feature-flags/convex";Usage
import {
FeatureFlagsPage,
type FeatureFlagsAdminMutations,
} from "@geenius/feature-flags/react-css";
const mutations: FeatureFlagsAdminMutations = {
createFlag: async () => "flag_new",
updateFlag: async () => undefined,
enableFlag: async () => undefined,
disableFlag: async () => undefined,
deleteFlag: async () => undefined,
updateRollout: async () => undefined,
setTargetRules: async () => undefined,
};
export function FeatureFlagsRoute() {
return (
<FeatureFlagsPage
flags={flags}
onToggle={async (id, enabled) => updateFlag(id, { enabled })}
onEdit={(id) => openFlagDetail(id)}
onCreate={() => openCreateDialog()}
mutations={mutations}
/>
);
}Storybook
The public repository includes React and SolidJS preview hosts for reviewing the Tailwind and vanilla CSS variants side by side:
- Repository: geenius-dev/geenius-feature-flags
- Preview focus: feature-flag pages, rollout controls, targeting editors, and developer override tooling
Both preview hosts render the same authored scenarios so visual and behavioral parity stays reviewable across frameworks and styling variants.
Package Contract
@geenius/feature-flagsand@geenius/feature-flags/sharedexpose the framework-agnostic evaluation engine.@geenius/feature-flags/reactand@geenius/feature-flags/solidjsexpose Tailwind-oriented UI and reactive bindings.@geenius/feature-flags/react-cssand@geenius/feature-flags/solidjs-cssexpose standalone vanilla CSS implementations plus stylesheet subpaths.@geenius/feature-flags/convexexposes the Convex schema, queries, mutations, and validators.
