Feature Flags
Moneat includes a feature flag control plane with OpenFeature-compatible remote evaluation through OFREP. Flags are scoped to an organization and environment, support server and client SDK keys, and record evaluation plus track events in ClickHouse.
OpenFeature and OFREP
OpenFeature SDKs use providers. For Moneat, use an OFREP provider and point it at your Moneat instance:
https://your-moneat-host/ofrep/v1Standard OFREP endpoints:
POST /ofrep/v1/evaluate/flags/{key}
POST /ofrep/v1/evaluate/flagsMoneat extension:
POST /ofrep/v1/trackTracking is not part of OFREP 0.3.0, so a generic OFREP provider will not call /track for you.
Send those events yourself.
Authenticate with a feature flag SDK key:
Authorization: Bearer mffsk_...Server keys can evaluate every flag in the environment. Client keys can evaluate only flags marked client-visible.
Kotlin/JVM
Kotlin/JVM applications can use the OpenFeature Java SDK with an OFREP provider:
val provider = OfrepProvider.builder()
.endpoint("https://your-moneat-host/ofrep/v1")
.apiKey("mffsk_...")
.build()
OpenFeatureAPI.getInstance().setProvider(provider)
val client = OpenFeatureAPI.getInstance().getClient()
val context = ImmutableContext.builder()
.targetingKey("user-123")
.add("email", Value("[email protected]"))
.build()
val enabled = client.getBooleanValue("checkout.enabled", false, context)Java
Provider provider = OfrepProvider.builder()
.endpoint("https://your-moneat-host/ofrep/v1")
.apiKey("mffsk_...")
.build();
OpenFeatureAPI.getInstance().setProvider(provider);
Client client = OpenFeatureAPI.getInstance().getClient();
EvaluationContext context = ImmutableContext.builder()
.targetingKey("user-123")
.add("plan", new Value("team"))
.build();
boolean enabled = client.getBooleanValue("checkout.enabled", false, context);Tracking
Moneat adds a tracking endpoint for experiment and conversion events:
POST /ofrep/v1/track
Authorization: Bearer mffsk_...
Content-Type: application/json
{
"eventName": "checkout.completed",
"flagKey": "checkout.enabled",
"variant": "on",
"value": 199.0,
"context": {
"targetingKey": "user-123"
},
"properties": {
"plan": "team"
}
}Kotlin Multiplatform
Moneat v1 does not ship a custom Kotlin Multiplatform provider. Kotlin/JVM is supported through the OpenFeature Java SDK path. Mobile or KMP support depends on an OFREP provider for the OpenFeature Kotlin client SDK.