Currently, the API and the frontend dashboard use two separate Flagsmith projects. Features that need gating in both layers currently require two flags in two projects, causing independently drifting state and segments.
Since API FoF is less state to move, we'd like to unify by merging "Flagsmith API" into "Flagsmith Website" (id=12).
The two sides evaluate with different identity models, which the merged project must accommodate:
- Backend: targeting key
org.<id>, traits organisation.id, organisation.name, subscription.plan.
- Frontend: targeting key
<user.id>, traits email, organisation.id, organisation.name, organisations.
Conventions for shared flags, to be documented: for gradual rollout, target organisation.id, not email or $.identity.key.
Tasks:
Currently, the API and the frontend dashboard use two separate Flagsmith projects. Features that need gating in both layers currently require two flags in two projects, causing independently drifting state and segments.
Since API FoF is less state to move, we'd like to unify by merging "Flagsmith API" into "Flagsmith Website" (id=12).
The two sides evaluate with different identity models, which the merged project must accommodate:
org.<id>, traitsorganisation.id,organisation.name,subscription.plan.<user.id>, traitsemail,organisation.id,organisation.name,organisations.Conventions for shared flags, to be documented: for gradual rollout, target
organisation.id, notemailor$.identity.key.Tasks:
subscription.planas a trait inflagsmithIdentifyso plan-based segments work for shared flagsapi:api_usage_alertingapi_limiting_stop_serving_flagsapi_limiting_block_access_to_adminapi_usage_overage_chargesenable_feature_versioning_for_new_environmentssdk_metrics_labelscompress_dynamo_documentscode_references_ui_statsget_current_api_usage_deprecatedsegment_membership_inspectionfeature_lifecycleexperimental_flagsexperimentation_warehouse_connectionFLAGSMITH_ON_FLAGSMITH_SERVER_KEYGitHub Actions secret to project 12's Production server keyupdateflagsmithenvironmentand commit the regeneratedenvironment.json(will now include frontend feature states)FLAGSMITH_ON_FLAGSMITH_SERVER_KEYin SaaS staging/production, and remapFLAGSMITH_ON_FLAGSMITH_FEATURE_EXPORT_ENVIRONMENT_ID/_TAG_IDwhich point at the old projectdocs/docs/deployment-self-hosting/core-configuration/running-flagsmith-on-flagsmith.mdandapi/README.mdfor the single-project setup and the segment/trait conventions