This is page 3 of 7. Use http://codebase.md/bucketco/docs/supported-languages/integrations/.gitbook/assets/Access.png?format=md&lines=true&page={x} to view the full context.

# Directory Structure

```
├── .gitbook
│   ├── assets
│   │   ├── 03642c5-dwFrame_201 (1).png
│   │   ├── 03642c5-dwFrame_201.png
│   │   ├── 1753259671871 (1).jpeg
│   │   ├── 1a0b50d-image.png
│   │   ├── 1a439d9-image.png
│   │   ├── 2506596-Customized_Widgets.png
│   │   ├── 342658e-image.png
│   │   ├── 4017197-image.png
│   │   ├── 43e55f0-image.png
│   │   ├── 4783e3f-image.png
│   │   ├── 5b0ce63-image (1).png
│   │   ├── 5b0ce63-image.png
│   │   ├── 630b5e9-image.png
│   │   ├── 8bf8a6e-Frame_201.png
│   │   ├── 9efd67c-image.png
│   │   ├── aa37226-image.png
│   │   ├── Access (1) (1).png
│   │   ├── Access (1).png
│   │   ├── Access (2).png
│   │   ├── Access.png
│   │   ├── Adding features to a feature view-min.png
│   │   ├── Adopted-min.png
│   │   ├── Adoption strategy V2-min.png
│   │   ├── Adoption strategy-min.png
│   │   ├── Advanced targeting rules V2-min.png
│   │   ├── Advanced targeting rules v3-min.png
│   │   ├── Advanced targeting rules-min.png
│   │   ├── aecc6f2-image.png
│   │   ├── amplitude.svg
│   │   ├── An example targeting configuration with two rules.-min.png
│   │   ├── api.svg
│   │   ├── App Settings-min.png
│   │   ├── Automated feedback surveys settings v3-min.png
│   │   ├── Automated feedback surveys settings-min.png
│   │   ├── Automated feedback surveys-min.png
│   │   ├── aws-s3.svg
│   │   ├── be124cd-dwdwFrame_201 (1).png
│   │   ├── be124cd-dwdwFrame_201.png
│   │   ├── ccc4f9e-image.png
│   │   ├── CleanShot 2024-06-11 at 8 .25.53@2x.png
│   │   ├── CleanShot 2024-11-22 at 8 .29.42@2x.png
│   │   ├── CleanShot 2024-11-22 at 8 .31.17@2x.png
│   │   ├── CleanShot 2024-11-25 at 9 .28.08@2x.png
│   │   ├── CleanShot 2024-11-25 at 9 .33.10@2x.png
│   │   ├── CleanShot 2024-11-25 at 9 .35.11@2x.png
│   │   ├── CleanShot 2024-11-27 at 10 .45.59@2x.png
│   │   ├── CleanShot 2024-11-27 at 10 .46.36@2x.png
│   │   ├── CleanShot 2024-11-27 at 10 .47.14@2x.png
│   │   ├── CleanShot 2024-11-27 at 10 .50.48@2x.png
│   │   ├── CleanShot 2025-01-07 at 1 .19.36@2x.png
│   │   ├── CleanShot 2025-01-07 at 1 .21.09@2x.png
│   │   ├── CleanShot 2025-01-07 at 1 .22.27@2x.png
│   │   ├── CleanShot 2025-01-07 at 12 .34.32@2x.png
│   │   ├── CleanShot 2025-01-07 at 12 .39.12@2x (1).png
│   │   ├── CleanShot 2025-01-07 at 12 .39.12@2x.png
│   │   ├── CleanShot 2025-01-09 at 10 .56.14@2x.png
│   │   ├── CleanShot 2025-01-09 at 11 .11.54@2x (1).png
│   │   ├── CleanShot 2025-01-09 at 11 .11.54@2x.png
│   │   ├── CleanShot 2025-01-09 at 9 .44.28@2x.png
│   │   ├── CleanShot 2025-01-23 at 1 .48.30@2x.png
│   │   ├── CleanShot 2025-01-23 at 1 .49.29@2x.png
│   │   ├── CleanShot 2025-01-23 at 1 .49.55@2x.png
│   │   ├── CleanShot 2025-01-23 at 2 .10.23@2x.png
│   │   ├── CleanShot 2025-05-09 at 1 .29.05@2x.png
│   │   ├── CleanShot 2025-10-09 at 10 .23.21@2x.png
│   │   ├── Companies Tab-min.png
│   │   ├── Companies-min.png
│   │   ├── company example v2-min (1).png
│   │   ├── company example v2-min.png
│   │   ├── company example v3-min.png
│   │   ├── Company segment filters-min.png
│   │   ├── Create a new environment-min.png
│   │   ├── Creating and managing apps-min.png
│   │   ├── cursor-mcp-demo_h264.mp4
│   │   ├── datadog.svg
│   │   ├── Debugger-min (1).png
│   │   ├── Debugger-min (2).png
│   │   ├── Debugger-min.png
│   │   ├── Enabling Feedback Surveys-min.png
│   │   ├── Environments Page V2-min.png
│   │   ├── Environments Switcher-min.png
│   │   ├── Environments-min.png
│   │   ├── Evaluate Feature.png
│   │   ├── example 1 (1).png
│   │   ├── example 1.png
│   │   ├── example 2 (1).png
│   │   ├── example 2.png
│   │   ├── ezgif-242d06617aea38.gif
│   │   ├── Feature Tab-min.png
│   │   ├── Feature targeting rules example v2-min.png
│   │   ├── Feature targeting rules example V2-min.png
│   │   ├── Feature targeting rules example v3-min.png
│   │   ├── Feature targeting rules example-min.png
│   │   ├── Feature targeting rules UI V2-min.png
│   │   ├── Feature targeting rules UI v3-min.png
│   │   ├── Feature targeting rules UI-min.png
│   │   ├── Feature usage configuration-v2-min.png
│   │   ├── Feature view.png
│   │   ├── feature-flag-list-rum-event.d9c1c876a34458edc70d1317efaec05b.png.avif
│   │   ├── Feature-targeting-rules-v2-min.png
│   │   ├── Features Page V2-min (1).png
│   │   ├── Features Page V2-min.png
│   │   ├── Features Page-min.png
│   │   ├── Features-min.png
│   │   ├── Feedback Tab V2-min.png
│   │   ├── Feedback-min.png
│   │   ├── Getting started-min.png
│   │   ├── gitbook-logo.svg
│   │   ├── github-logo.svg
│   │   ├── Global settings - Feature views-min.png
│   │   ├── Global settings - Manual Targeting-min.png
│   │   ├── Global settings - Release Stages Editing V4-min.png
│   │   ├── Global settings - Release Stages-min.png
│   │   ├── Goal Form.png
│   │   ├── How to use release stages v2-min.png
│   │   ├── How to use release stages-min (1).png
│   │   ├── How to use release stages-min.png
│   │   ├── https___content.gitbook.com_content_pgXAy2Cgsm5pON9oJ06m_blobs_6wGbrQlJPE4JllBuIhla_image (1).png
│   │   ├── image (1) (1).png
│   │   ├── image (1) (2).png
│   │   ├── image (1).png
│   │   ├── image (10).png
│   │   ├── image (11).png
│   │   ├── image (12).png
│   │   ├── image (13).png
│   │   ├── image (14).png
│   │   ├── image (15).png
│   │   ├── image (16).png
│   │   ├── image (17).png
│   │   ├── image (18).png
│   │   ├── image (19).png
│   │   ├── image (2) (1).png
│   │   ├── image (2).png
│   │   ├── image (20).png
│   │   ├── image (21).png
│   │   ├── image (22).png
│   │   ├── image (23).png
│   │   ├── image (24).png
│   │   ├── image (25).png
│   │   ├── image (26).png
│   │   ├── image (27).png
│   │   ├── image (28).png
│   │   ├── image (29).png
│   │   ├── image (3).png
│   │   ├── image (30).png
│   │   ├── image (31).png
│   │   ├── image (32).png
│   │   ├── image (33).png
│   │   ├── image (4).png
│   │   ├── image (5).png
│   │   ├── image (6).png
│   │   ├── image (7).png
│   │   ├── image (8).png
│   │   ├── image (9).png
│   │   ├── image.png
│   │   ├── Iterate Feature V2.png
│   │   ├── LInear mention.mp4
│   │   ├── linear.svg
│   │   ├── mcp-remote-min.mp4
│   │   ├── mcp-remote.mp4
│   │   ├── mixpanel.svg
│   │   ├── Modifying or deleting an app-min.png
│   │   ├── Monitor (1) (1).png
│   │   ├── Monitor (1).png
│   │   ├── Monitor (2).png
│   │   ├── Monitor (3).png
│   │   ├── Monitor (4).png
│   │   ├── Monitor (5).png
│   │   ├── Monitor (6).png
│   │   ├── Monitor (7).png
│   │   ├── Monitor.png
│   │   ├── New feature.png
│   │   ├── next-js.svg
│   │   ├── node-js.svg
│   │   ├── openfeature.svg
│   │   ├── posthog.svg
│   │   ├── Pre-Release.png
│   │   ├── react.svg
│   │   ├── Release Goals.png
│   │   ├── Release Stage Beta Targeting Rules v3-min.png
│   │   ├── Release Stage Beta Targeting Rules V3-min.png
│   │   ├── Release Stage Beta Targeting Rules V5-min.png
│   │   ├── Release Stage Beta Targeting Rules-min.png
│   │   ├── remote config - 3.png
│   │   ├── Remote config.png
│   │   ├── Rolling back flags-V2.png
│   │   ├── Rules in other environments.png
│   │   ├── rum-explorer-error-feature-flag-search.7b9f6c046db1de1c71d279c139f1508a.png.avif
│   │   ├── rum-explorer-session-feature-flag-search.435802460fd607608ad5155f029da57b.png.avif
│   │   ├── Satisfaction feedback-min.png
│   │   ├── Satisified-min.png
│   │   ├── Save the segment-min.png
│   │   ├── Saving New Segment-min.png
│   │   ├── Screenshot 2024-08-14 at 19.25.06 (1).png
│   │   ├── Screenshot 2024-08-14 at 19.25.06.png
│   │   ├── Screenshot 2024-08-15 at 13.57.46.png
│   │   ├── Screenshot 2024-10-10 at 14.04.09.png
│   │   ├── Screenshot 2024-10-10 at 14.04.34.png
│   │   ├── Screenshot 2025-07-10 at 14.04.07.png
│   │   ├── Screenshot 2025-07-10 at 14.11.01.png
│   │   ├── Screenshot 2025-07-10 at 14.29.20.png
│   │   ├── Screenshot 2025-07-15 at 21.31.16.png
│   │   ├── Screenshot 2025-07-21 at 20.07.27.png
│   │   ├── Screenshot 2025-09-02 at 17.08.25.png
│   │   ├── Screenshot 2025-09-02 at 17.10.36 (1).png
│   │   ├── Screenshot 2025-09-02 at 17.10.36 (2).png
│   │   ├── Screenshot 2025-09-02 at 17.10.36.png
│   │   ├── Screenshot 2025-09-02 at 17.11.21 (1).png
│   │   ├── Screenshot 2025-09-02 at 17.11.21.png
│   │   ├── Screenshot 2025-09-02 at 17.13.15 (1).png
│   │   ├── Screenshot 2025-09-02 at 17.13.15.png
│   │   ├── Screenshot 2025-09-02 at 17.19.44 (1).png
│   │   ├── Screenshot 2025-09-02 at 17.19.44.png
│   │   ├── Screenshot 2025-09-09 at 09.32.31.png
│   │   ├── Screenshot 2025-09-12 at 11.50.41.png
│   │   ├── Screenshot 2025-09-12 at 12.30.38.png
│   │   ├── Screenshot 2025-09-12 at 13.14.44.png
│   │   ├── Screenshot 2025-09-12 at 13.18.07.png
│   │   ├── Screenshot 2025-09-12 at 13.21.25.png
│   │   ├── Screenshot 2025-09-12 at 13.25.21.png
│   │   ├── Screenshot 2025-09-12 at 14.29.56.png
│   │   ├── Screenshot 2025-09-12 at 14.37.52.png
│   │   ├── Screenshot 2025-09-12 at 14.58.27.png
│   │   ├── Screenshot 2025-09-12 at 15.00.32.png
│   │   ├── Screenshot 2025-09-12 at 15.01.32.png
│   │   ├── Screenshot 2025-09-12 at 15.03.33.png
│   │   ├── Screenshot 2025-09-12 at 15.04.39.png
│   │   ├── Screenshot 2025-09-12 at 15.06.50.png
│   │   ├── Screenshot 2025-09-12 at 15.13.45.png
│   │   ├── Screenshot 2025-09-12 at 15.14.43.png
│   │   ├── Screenshot 2025-09-12 at 15.16.42.png
│   │   ├── Screenshot 2025-09-12 at 15.18.42.png
│   │   ├── Screenshot 2025-09-12 at 15.32.39.png
│   │   ├── Screenshot 2025-09-12 at 15.33.57.png
│   │   ├── Screenshot 2025-09-12 at 15.35.09.png
│   │   ├── Screenshot 2025-09-12 at 15.36.14.png
│   │   ├── segment (1).svg
│   │   ├── segment.svg
│   │   ├── Segments.png
│   │   ├── Set segment conditions-min.png
│   │   ├── Setting multiple targeting rules.png
│   │   ├── Setting Tab-min.png
│   │   ├── Setting targeting rules v3-min.png
│   │   ├── Setting targeting rules-min.png
│   │   ├── Settings-min (1).png
│   │   ├── Settings-min.png
│   │   ├── slack (1).svg
│   │   ├── Slack (with auto-layout)-min.png
│   │   ├── Slack and Environments-min.png
│   │   ├── Slack and Feature views-min.png
│   │   ├── Slack Integration.png
│   │   ├── Slack Settings under Features-min.png
│   │   ├── Slack with User Feedback.png
│   │   ├── slack.svg
│   │   ├── slackConnected (1).png
│   │   ├── slackConnected.png
│   │   ├── slackDisconnected (1).png
│   │   ├── slackDisconnected.png
│   │   ├── STARS Configuration-min.png
│   │   ├── STARS Feature Funnel-min.png
│   │   ├── STARS Feature Report-min.png
│   │   ├── STARS states.png
│   │   ├── surveys-min.png
│   │   ├── Switching Between Environments-min.png
│   │   ├── Targeting rules interface-min.png
│   │   ├── Targeting rules.png
│   │   ├── There are 5 different types of conditions to chose from-min.png
│   │   ├── Track adoption in the UI V2-min.png
│   │   ├── Track adoption in the UI v3-min.png
│   │   ├── Track adoption in the UI-min.png
│   │   ├── Track new feature V2-min.png
│   │   ├── Tracking Tab-min.png
│   │   ├── ts-js.svg
│   │   ├── type-check-failed.png
│   │   ├── type-check-payload-failed.png
│   │   ├── usage attribute example v3.png
│   │   ├── usage attribute example-min.png
│   │   ├── Usage configuration-min.png
│   │   ├── vercel-logo.svg
│   │   ├── vue-logo.svg
│   │   ├── What is the STARS Framework v3-min.png
│   │   └── What is the STARS Framework_-min.png
│   └── includes
│       ├── integrations.md
│       ├── languages.md
│       ├── need-some-help-chat-with-us.md
│       ├── sdks.md
│       └── untitled.md
├── .github
│   └── README.md
├── .vscode
│   └── settings.json
├── api
│   ├── api-access.md
│   ├── cli.md
│   ├── mcp.md
│   ├── public-api
│   │   ├── public-api-reference.md
│   │   └── README.md
│   └── reflag-rest-api
│       ├── README.md
│       └── reflag-api-reference.md
├── guides
│   ├── self-opt-in.md
│   └── use-reflag-in-your-cli.md
├── integrations
│   ├── amplitude.md
│   ├── aws-s3.md
│   ├── cursor.md
│   ├── datadog.md
│   ├── github.md
│   ├── linear.md
│   ├── mixpanel.md
│   ├── overview.md
│   ├── posthog.md
│   ├── segment.md
│   └── slack.md
├── introduction
│   └── concepts
│       ├── app.md
│       ├── company.md
│       ├── environment.md
│       ├── event.md
│       ├── feature-events.md
│       ├── feature-view.md
│       ├── feature.md
│       ├── feedback.md
│       ├── filter.md
│       ├── README.md
│       ├── release-stage.md
│       ├── segment.md
│       ├── targeting-rules.md
│       └── user.md
├── product-handbook
│   ├── anonymous-users.md
│   ├── concepts
│   │   ├── app.md
│   │   ├── company.md
│   │   ├── environment.md
│   │   ├── event.md
│   │   ├── feature-events.md
│   │   ├── feature-view.md
│   │   ├── feature.md
│   │   ├── feedback.md
│   │   ├── filter.md
│   │   ├── README.md
│   │   ├── release-stage.md
│   │   ├── segment.md
│   │   ├── targeting-rules.md
│   │   └── user.md
│   ├── creating-and-managing-apps
│   │   ├── environments.md
│   │   └── README.md
│   ├── creating-and-managing-apps.md
│   ├── creating-segments.md
│   ├── data-export.md
│   ├── data-residency.md
│   ├── feature-clean-up-and-archival-beta
│   │   ├── ai-code-clean-up-beta.md
│   │   └── README.md
│   ├── feature-entitlements
│   │   ├── README.md
│   │   └── simple-role-based-entitlements.md
│   ├── feature-rollouts
│   │   ├── feature-targeting-rules.md
│   │   └── README.md
│   ├── feature-targeting-rules
│   │   ├── creating-segments.md
│   │   └── environments.md
│   ├── feature-views.md
│   ├── launch-monitor
│   │   ├── automated-feedback-surveys.md
│   │   ├── give-feedback-button.md
│   │   └── README.md
│   ├── product-overview.md
│   ├── remote-config.md
│   ├── self-opt-in.md
│   ├── service-resiliency.md
│   ├── team-permissions.md
│   └── type-safety.md
├── README.md
├── sdk
│   ├── _media
│   │   ├── type-check-failed.png
│   │   └── type-check-payload-failed.png
│   ├── @reflag
│   │   ├── browser-sdk
│   │   │   ├── globals.md
│   │   │   └── README.md
│   │   ├── node-sdk
│   │   │   ├── globals.md
│   │   │   └── README.md
│   │   ├── react-sdk
│   │   │   ├── globals.md
│   │   │   └── README.md
│   │   └── vue-sdk
│   │       ├── globals.md
│   │       └── README.md
│   ├── documents
│   │   ├── browser-sdk
│   │   │   └── FEEDBACK.md
│   │   └── cli
│   │       └── README.md
│   └── README.md
├── SUMMARY.md
├── support
│   └── get-support.md
└── supported-languages
    ├── next.js.md
    ├── openfeature.md
    ├── overview.md
    └── ruby-rails-stimulus.md
```

# Files

--------------------------------------------------------------------------------
/introduction/concepts/filter.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Filter
 2 | 
 3 | ### Definition
 4 | 
 5 | A filter, in Reflag, is a mechanism that is used to check if entities such as [user](user.md), [company](company.md), [event](event.md), etc. match a set of predicates. Filters can also be aggregated into logical expressions, thus, facilitating advanced use cases.
 6 | 
 7 | Reflag support the following filter types:
 8 | 
 9 | * [Company attribute](company.md#attributes) filter, that can be used to check company attributes,
10 | * Company [feature metrics](feature.md#metrics) filter, which allows checking for feature metrics applied to a given company (for example which [STARS](broken-reference) state the company is in for a feature),
11 | * [User attribute](user.md#attributes) filter, used to check user attributes,
12 | * [Event attribute](event.md#attributes) filter, used to check event attributes,
13 | * Company [segment](segment.md) filter, can be used to check a company's membership in a segment,
14 | * [Feature access](feature.md#access) filter, can be used to check whether a company has access to a feature,
15 | * [Gradual rollout](../../product-handbook/feature-rollouts/#gradually-roll-out-your-feature) filter, is used in advanced scenarios to evaluate whether a company matches target rollout bracket,
16 | * [Other context](targeting-rules.md#evaluation-context) filter, used when rules can access additional context, in addition to user and company attributes.
17 | 
18 | ### Company attribute filter
19 | 
20 | This filter can be used to check company attributes against a set predicates. The attributes include the `First seen` and `Last seen` which are maintained by Reflag. You can use any attribute name that your application sent to Reflag.
21 | 
22 | ### Company feature metrics
23 | 
24 | This filter allows checking company's feature-specific metrics. These metrics include things like `Event count`, `First used`, `Last used`, `STARS state`, end etc.
25 | 
26 | ### User attribute filter
27 | 
28 | This filter can be used to check user attributes against a set predicates. You can use any attribute name that your application sent to Reflag when updating user.
29 | 
30 | ### Event attribute filter
31 | 
32 | This filter can be used to check event attributes against a set predicates. You can use any attribute name that your application sent to Reflag when sending track events.
33 | 
34 | ### Company segment filter
35 | 
36 | This filter can be used to check if a given company is (or not) included in a given segment. The filter essentially evaluates the segment's filter against the company.
37 | 
38 | ### Feature access filter
39 | 
40 | This filter can be used to check if a given company has (or not) access to a given feature. The filter evaluates the feature's targeting rules against the provided company, and assumes skips evaluation of any non-company attribute related filters.
41 | 
42 | ### Gradual rollout filter
43 | 
44 | This filter is used by feature access targeting when enabling gradual rollout. It will bracket the pool of companies based on a predictable hashing algorithm and check if the company falls within the rollout percentage.
45 | 
46 | ### Other context filter
47 | 
48 | This filter can be used to check `other` context attributes against a set predicates. You can use any attribute name that your application sends to Reflag when evaluating feature access.
49 | 
50 | {% hint style="warning" %}
51 | * Company attribute filters using `First seen` and `Last seen` attributes cannot be used in targeting rules,
52 | * Company feature metrics filters are not supported in targeting rules,
53 | * Event attribute filter is only used in event-based feature and automatic feedback surveys,
54 | * Gradual rollout filter is only used in feature access targeting rules,
55 | * Other context filter is only used in feature access targeting rules,
56 | 
57 | &#x20;Any filters that build up on on other filters inherit the restrictions of the filters they are based on.
58 | {% endhint %}
59 | 
60 | ### Next steps
61 | 
62 | * Learn in depth how to use filters in [setup feature access rules](../../product-handbook/feature-rollouts/feature-targeting-rules.md).
63 | 
```

--------------------------------------------------------------------------------
/SUMMARY.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Table of contents
 2 | 
 3 | ## Welcome
 4 | 
 5 | * [Getting started](README.md)
 6 | 
 7 | ## Supported languages
 8 | 
 9 | * [Overview](supported-languages/overview.md)
10 | * [React SDK](sdk/@reflag/react-sdk/README.md)
11 |   * [Reference](sdk/@reflag/react-sdk/globals.md)
12 | * [Vue SDK (beta)](sdk/@reflag/vue-sdk/README.md)
13 |   * [Reference](sdk/@reflag/vue-sdk/globals.md)
14 | * [Browser SDK](sdk/@reflag/browser-sdk/README.md)
15 |   * [Feedback](sdk/documents/browser-sdk/FEEDBACK.md)
16 |   * [Reference](sdk/@reflag/browser-sdk/globals.md)
17 | * [Node.js SDK](sdk/@reflag/node-sdk/README.md)
18 |   * [Reference](sdk/@reflag/node-sdk/globals.md)
19 | * [Next.js](supported-languages/next.js.md)
20 | * [OpenFeature](supported-languages/openfeature.md)
21 | * [Ruby SDK](supported-languages/ruby-rails-stimulus.md)
22 | 
23 | ## API
24 | 
25 | * [API Access](api/api-access.md)
26 | * [Public API](api/public-api/README.md)
27 |   * [API Reference](api/public-api/public-api-reference.md)
28 | * [Reflag REST API](api/reflag-rest-api/README.md)
29 |   * [API Reference](api/reflag-rest-api/reflag-api-reference.md)
30 | * [CLI](sdk/documents/cli/README.md)
31 | * [MCP](api/mcp.md)
32 | 
33 | ## Integrations
34 | 
35 | * [Overview](integrations/overview.md)
36 | * [Slack](integrations/slack.md)
37 | * [Linear](integrations/linear.md)
38 | * [Cursor](integrations/cursor.md)
39 | * [GitHub](integrations/github.md)
40 | * [Vercel](https://flags-sdk.dev/providers/reflag)
41 | * [GitBook](https://gitbook.com/docs/publishing-documentation/adaptive-content/enabling-adaptive-content/feature-flags#reflag)
42 | * [Datadog](integrations/datadog.md)
43 | * [PostHog](integrations/posthog.md)
44 | * [Segment](integrations/segment.md)
45 | * [Amplitude](integrations/amplitude.md)
46 | * [Mixpanel](integrations/mixpanel.md)
47 | * [AWS S3](integrations/aws-s3.md)
48 | 
49 | ## Product Handbook
50 | 
51 | * [Product overview](product-handbook/product-overview.md)
52 | * [Feature rollouts](product-handbook/feature-rollouts/README.md)
53 |   * [Access rules](product-handbook/feature-rollouts/feature-targeting-rules.md)
54 | * [Feature clean-up and archival](product-handbook/feature-clean-up-and-archival-beta/README.md)
55 |   * [AI code clean-up](product-handbook/feature-clean-up-and-archival-beta/ai-code-clean-up-beta.md)
56 | * [Remote config](product-handbook/remote-config.md)
57 | * [Type safety](product-handbook/type-safety.md)
58 | * [Team permissions](product-handbook/team-permissions.md)
59 | * [Data residency](product-handbook/data-residency.md)
60 | * [Anonymous users](product-handbook/anonymous-users.md)
61 | * [Launch monitor](product-handbook/launch-monitor/README.md)
62 |   * [Give feedback button](product-handbook/launch-monitor/give-feedback-button.md)
63 |   * [Automated feedback surveys](product-handbook/launch-monitor/automated-feedback-surveys.md)
64 | * [Feature entitlements](product-handbook/feature-entitlements/README.md)
65 |   * [Simple role-based entitlements](product-handbook/feature-entitlements/simple-role-based-entitlements.md)
66 | * [Creating segments](product-handbook/creating-segments.md)
67 | * [Feature views](product-handbook/feature-views.md)
68 | * [Managing apps](product-handbook/creating-and-managing-apps/README.md)
69 |   * [Environments](product-handbook/creating-and-managing-apps/environments.md)
70 | * [Data model](product-handbook/concepts/README.md)
71 |   * [App](product-handbook/concepts/app.md)
72 |   * [Environment](product-handbook/concepts/environment.md)
73 |   * [Flag](product-handbook/concepts/feature.md)
74 |   * [Flag view](product-handbook/concepts/feature-view.md)
75 |   * [Company](product-handbook/concepts/company.md)
76 |   * [Segment](product-handbook/concepts/segment.md)
77 |   * [User](product-handbook/concepts/user.md)
78 |   * [Track event](product-handbook/concepts/event.md)
79 |   * [Flag events](product-handbook/concepts/feature-events.md)
80 |   * [Feedback](product-handbook/concepts/feedback.md)
81 |   * [Release stage](product-handbook/concepts/release-stage.md)
82 |   * [Targeting rules](product-handbook/concepts/targeting-rules.md)
83 |   * [Filter](product-handbook/concepts/filter.md)
84 | * [Service Resiliency](product-handbook/service-resiliency.md)
85 | 
86 | ## Guides
87 | 
88 | * [Use Reflag in your CLI](guides/use-reflag-in-your-cli.md)
89 | * [Beta feature opt-in](guides/self-opt-in.md)
90 | 
91 | ## Support
92 | 
93 | * [Get support](support/get-support.md)
94 | 
95 | ***
96 | 
97 | * [Changelog](https://reflag.com/changelog)
98 | 
```

--------------------------------------------------------------------------------
/supported-languages/next.js.md:
--------------------------------------------------------------------------------

```markdown
  1 | ---
  2 | description: Next.js client for Reflag
  3 | ---
  4 | 
  5 | # Next.js
  6 | 
  7 | Using Reflag with Next.js is straightforward. You can use the [@reflag/node-sdk](../sdk/@reflag/node-sdk/) on the server or [@reflag/react-sdk](../sdk/@reflag/react-sdk/) in the browser. Handling flag targeting server-side is often advantageous because it removes the need for additional handling of loading states.
  8 | 
  9 | ## Server-side Rendering (SSR)
 10 | 
 11 | It's often advantageous to use Server-side Rendering when possible because it can help avoid extra loading screens while your Reflag flags are loading.
 12 | 
 13 | For pages that use server-side rendering, use the `@reflag/node-sdk` in the following manner. Create a new file called `reflag.ts` and adjust it to your needs:
 14 | 
 15 | ```typescript
 16 | // app/reflag.ts
 17 | import { ReflagClient } from "@reflag/node-sdk";
 18 | 
 19 | import { auth } from "@/auth";
 20 | 
 21 | export let reflagClient: ReflagClient;
 22 | 
 23 | async function initReflag() {
 24 |   reflagClient = new ReflagClient({
 25 |     secretKey: process.env.REFLAG_SECRET_KEY ?? "",
 26 |     logger: console,
 27 |   });
 28 |   await reflagClient.initialize();
 29 | }
 30 | 
 31 | export async function getContext() {
 32 |   // get the logged-in session
 33 |   const session = await auth();
 34 |   const user = session?.user;
 35 |   if (!user || !user.id) {
 36 |     return {};
 37 |   }
 38 |   const userId = user.id;
 39 | 
 40 |   return {
 41 |     user: {
 42 |       id: userId,
 43 |       ...user,
 44 |     },
 45 |     company: session.company,
 46 |   };
 47 | }
 48 | 
 49 | export async function getFlag(key: string) {
 50 |   if (!reflagClient) {
 51 |     await initReflag();
 52 |   }
 53 | 
 54 |   return reflagClient.getFlag(await getContext(), key);
 55 | }
 56 | ```
 57 | 
 58 | And then start using flags!
 59 | 
 60 | {% tabs %}
 61 | {% tab title="App router" %}
 62 | Here's how you use flags with App router:
 63 | 
 64 | ```tsx
 65 | // members-add/page.tsx
 66 | import { getFlag } from "@/app/reflag";
 67 | 
 68 | async addMember() {
 69 |   "use server";
 70 |   const { track } = await getFlag("member-add");
 71 |   track()
 72 | 
 73 |   // add member
 74 | }
 75 | 
 76 | export default async function Page() {
 77 |   const { isEnabled } = await getFlag("members-add");
 78 | 
 79 |   if (!isEnabled) {
 80 |     return null;
 81 |   }
 82 | 
 83 |   return (
 84 |     <form action={addMember}>
 85 |       <button type="submit">Add member</button>
 86 |     </form>
 87 |   );
 88 | }
 89 | ```
 90 | {% endtab %}
 91 | 
 92 | {% tab title="Pages router" %}
 93 | Here's how you use flags with Pages router:
 94 | 
 95 | ```tsx
 96 | // members-add/page.tsx
 97 | import { getFlag } from "@/app/reflag";
 98 | import type { InferGetServerSidePropsType, GetServerSideProps } from "next";
 99 | 
100 | export const getServerSideProps = (async () => {
101 |   const { isEnabled: membersAddEnabled } = await getFlag("members-add");
102 |   return { props: { membersAddEnabled } };
103 | }) satisfies GetServerSideProps<{ membersAddEnabled: boolean }>;
104 | 
105 | export default function Page({
106 |   huddles,
107 | }: InferGetServerSidePropsType<typeof getServerSideProps>) {
108 |   if (!membersAddEnabled) return null;
109 | 
110 |   return (
111 |     <form>
112 |       <button type="submit">Add member</button>
113 |     </form>
114 |   );
115 | }
116 | ```
117 | {% endtab %}
118 | {% endtabs %}
119 | 
120 | ### Flags SDK by Vercel
121 | 
122 | [Flags SDK by Vercel](https://flags-sdk.dev/) is a Next.js oriented interface for server-side flags. It's straightforward to use with the Reflag Node.js SDK:
123 | 
124 | ```typescript
125 | import { flag } from '@vercel/flags/next';
126 | import { getFlag } from "@/app/reflag";
127 | 
128 | export const huddles = flag({
129 |   key: 'huddles',
130 |   async decide() {
131 |     return getFlag(this.key).isEnabled;
132 |   },
133 | });
134 | ```
135 | 
136 | ## Client-side Rendering
137 | 
138 | Use `@reflag/react-sdk` with Next.js client-side rendering like so:
139 | 
140 | ```tsx
141 | // layout.tsx
142 | import { ReflagProvider } from "@reflag/react-sdk";
143 | 
144 | import { useUser } from "./auth";
145 | 
146 | export default function Layout({ children }: { children: React.ReactNode }) {
147 |   const { user } = useUser()
148 | 
149 |   return (
150 |     <ReflagProvider
151 |       publishableKey={process.env.NEXT_PUBLIC_REFLAG_PUBLISHABLE_KEY ?? ""}
152 |       user={{ id: user.id }}
153 |       company={{ id: user.companyId }}
154 |     >
155 |       {children}
156 |     </ReflagProvider>
157 |   );
158 | }
159 | 
160 | ```
161 | 
162 | In a client components, use the hooks `useFlag`
163 | 
164 | ```tsx
165 | "use client";
166 | 
167 | import { useFlag } from "@reflag/react-sdk";
168 | 
169 | function StartHuddle() {
170 |   const { isEnabled, track } = useFlag("huddle");
171 | 
172 |   if (!isEnabled) {
173 |     return null
174 |   }
175 | 
176 |   return (
177 |     <button onClick={track}>Start huddle!</button>
178 |   );
179 | }
180 | ```
181 | 
182 | For more details, please see the [React SDK documentation](react-sdk/)
183 | 
```

--------------------------------------------------------------------------------
/product-handbook/creating-and-managing-apps/environments.md:
--------------------------------------------------------------------------------

```markdown
 1 | ---
 2 | description: Learn more about environments in Reflag
 3 | ---
 4 | 
 5 | # Environments
 6 | 
 7 | What are environments?
 8 | 
 9 | An environment is an instance of an app that is specified by a group of shared parameters or servers. Environments are usually used to isolate a production app from testing, however, they can also differentiate multiple single-tenant deployments of the same app.
10 | 
11 | Reflag has three default environments: `Production`, `Staging`, and `Development`.
12 | 
13 | You can add, edit, and delete as many additional environments as you’d like.
14 | 
15 | All environments except `Production` can be edited or deleted at any time.
16 | 
17 | ## Getting started
18 | 
19 | * When you create your account, there are three default environments: `Production`, `Staging`, and `Development`.
20 | * Go to `Settings`
21 | * Under `App: [Your App Name]`, click `Environments`
22 | * Fetch your unique `publishable keys` and/or `secret keys` to implement with an [SDK or HTTP API](../../supported-languages/overview.md).
23 |   * This key is essential for integrating your applications with our platform. It ensures that events and data are attributed to the correct environment.
24 | 
25 | <figure><img src="../../.gitbook/assets/Screenshot 2025-09-12 at 15.33.57.png" alt="Reflag Environments"><figcaption></figcaption></figure>
26 | 
27 | ## Managing environments
28 | 
29 | ### Create a new environment
30 | 
31 | To create a new environment:
32 | 
33 | * Head to the `Settings` page
34 | * Select the `Environments` menu item listed `App: [Your App Name]`
35 | * Click the `+ New environment` button and give a name for your new environment.
36 |   * If needed, you can rename the environment later
37 | * After clicking the `Create` button, the new environment will appear in the list alongside its associated `publishable key` and `secret key.`
38 | 
39 | <figure><img src="../../.gitbook/assets/Screenshot 2025-09-12 at 15.35.09.png" alt="Environments after adding a new environment"><figcaption><p>Environments after adding "Pre-Production"</p></figcaption></figure>
40 | 
41 | {% hint style="info" %}
42 | The `Production` environment cannot be deleted or edited. New environments can be edited or deleted at any time.
43 | {% endhint %}
44 | 
45 | ### Switching Between Environments
46 | 
47 | You can switch between environments by:
48 | 
49 | * Click the environment listed in the left-hand navigation bar
50 | * The current active environment name is highlighted in the left-hand navigation bar.
51 | 
52 | <figure><img src="../../.gitbook/assets/Screenshot 2025-09-12 at 15.36.14.png" alt="Switching between environments"><figcaption></figcaption></figure>
53 | 
54 | ## Environment settings
55 | 
56 | There are three levels of settings in Reflag:
57 | 
58 | * `Organization`: _&#x43;_&#x6F;ntains the organization-wide settings
59 | * `App: [Your App Name]`: Contains the application-wide settings
60 | * `Environment: [Name]`: Contain environment-specific settings for the current application.
61 | 
62 | ### Application-wide functionalities
63 | 
64 | When you're configuring application-wide settings, environments aren't applicable.
65 | 
66 | The following entities and configuration options are application-wide and not dependent on an environment:
67 | 
68 | * `Feature Views`: They're application-wide except for their `Slack Reporting` settings,
69 | * `Company Segments`: They are shared across all environments. However, the companies in these segments will vary across environments.
70 | 
71 | ### Production environment-based functionalities
72 | 
73 | There are environment-specific functionalities that are only allowed in the `Production` environment. These are:
74 | 
75 | * `Slack`: Reporting settings in Features and [Feature views](https://reflag.com/glossary/feature-views) can be configured from any environment, but are also reflected in the `Production` environment
76 | * Some configuration sections are disabled if the selected environment is not `Production`.
77 | 
78 | {% hint style="info" %}
79 | Some settings are `Production environment`-only and are disabled when a non-`Production` environment is active.
80 | {% endhint %}
81 | 
82 | ### Environment-based functionalities
83 | 
84 | All other settings and functionalities are environment-specific. Anything that requires data to be sent from the clients is inherently environment-specific. This includes:
85 | 
86 | * [Access rules](../feature-rollouts/feature-targeting-rules.md)
87 | * [Automate feedback surveys](../launch-monitor/automated-feedback-surveys.md)
88 | * [Feedback](../product-overview.md#feedback)
89 | * [Tracking](../product-overview.md#tracking)
90 | * Data export
91 | 
```

--------------------------------------------------------------------------------
/api/mcp.md:
--------------------------------------------------------------------------------

```markdown
  1 | ---
  2 | description: >-
  3 |   Reflag supports the MCP protocol. Understand how to connect the agent in your
  4 |   code editor to your Reflag account.
  5 | ---
  6 | 
  7 | # MCP
  8 | 
  9 | ## Set up MCP
 10 | 
 11 | Model Context Protocol enables seamless integration of your Large Language Model (LLM) with external data sources, such as a code editor. This guide will walk you through connecting your editor to Reflag data efficiently.
 12 | 
 13 | {% embed url="https://139729605.fs1.hubspotusercontent-eu1.net/hubfs/139729605/Videos/bucketco-website/cursor-mcp-flag-feature_full-height_h264.mp4" %}
 14 | 
 15 | <p align="center">Guide to Integrating Model Context Protocol with Reflag Data</p>
 16 | 
 17 | ### Get started with Reflag Remote MCP
 18 | 
 19 | The Model Context Protocol (MCP) is an open standard that facilitates seamless integration of AI models with various data sources and tools. In Reflag, MCP enhances your code editor's ability to interpret and manage feature flags, comprehending their states and interconnections within the codebase. This forms an efficient link between feature management workflows and AI-driven development tools. With Reflag hosting the MCP server, getting started is incredibly straightforward.
 20 | 
 21 | {% stepper %}
 22 | {% step %}
 23 | #### One-click to add Reflag MCP in your IDE
 24 | 
 25 | * [Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=Reflag\&config=eyJ1cmwiOiJodHRwczovL2FwcC5yZWZsYWcuY29tL2FwaS9tY3AiLCJ0eXBlIjoiaHR0cCJ9)
 26 | * [VSCode](vscode:mcp/install?%7B%22name%22%3A%22Reflag%22%2C%22gallery%22%3Afalse%2C%22url%22%3A%22https%3A%2F%2Fapp.reflag.com%2Fapi%2Fmcp%22%7D)
 27 | {% endstep %}
 28 | 
 29 | {% step %}
 30 | #### That's it!
 31 | {% endstep %}
 32 | {% endstepper %}
 33 | 
 34 | {% hint style="info" %}
 35 | Ensure your editor/client and [Node.js](https://nodejs.org/en/download) versions are up to date.
 36 | {% endhint %}
 37 | 
 38 | ### Using Reflag CLI
 39 | 
 40 | To install the MCP into your preferred editor, use the Reflag CLI. This tool will configure your editor and provide agent guidelines, enhancing editor intelligence.
 41 | 
 42 | To set up the [MCP support](../sdk/documents/cli/#setting-up-mcp), invoke:
 43 | 
 44 | ```sh
 45 | npx reflag mcp
 46 | ```
 47 | 
 48 | ### Manual setup
 49 | 
 50 | Below are the manual setup steps for some of the popular editors, but there are [more MCP-compatible clients](https://modelcontextprotocol.io/clients). Before you start with the manual setup, you first need the `App ID` from [your app settings page](https://app.reflag.com/env-current/settings/app-general).
 51 | 
 52 | {% hint style="info" %}
 53 | You can use [mcp-remote](https://www.npmjs.com/package/mcp-remote) to enable authentication and remote MCP connections in clients that don't yet support these features.
 54 | {% endhint %}
 55 | 
 56 | ### [Cursor](https://docs.cursor.com/context/model-context-protocol)
 57 | 
 58 | 1. Open Cursor.
 59 | 2. Go to `Settings > Cursor Settings`.
 60 | 3. Click `MCP` and `New MCP Server`  and make sure the Reflag MCP server entry is present:
 61 | 
 62 | ```json
 63 | {
 64 |   "mcpServers": {
 65 |     "Reflag": {
 66 |       "url": "https://app.reflag.com/api/mcp"
 67 |     }
 68 |   }
 69 | }
 70 | ```
 71 | 
 72 | {% hint style="info" %}
 73 | Cursor also supports workspace-specific MCP servers by adding the above configuration to `.cursor/mcp.json` inside your project directory.
 74 | {% endhint %}
 75 | 
 76 | 4. Save, go back to Cursor, and start prompting!
 77 | 
 78 | ### [Visual Studio Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)
 79 | 
 80 | {% hint style="info" %}
 81 | You must enable the [Copilot agent mode](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode) to use MCP in Visual Studio Code Copilot chat.
 82 | {% endhint %}
 83 | 
 84 | 1. Open VS Code.
 85 | 2. Open the command palette, typically `CMD + SHIFT + P` or `CTRL + SHIFT + P`.
 86 | 3. Type and select `MCP: Add Server...` .
 87 | 4. Select `HTTP` .
 88 | 5. Enter `https://app.reflag.com/api/mcp` as the URL
 89 | 6. Enter `Reflag` as the server ID.
 90 | 
 91 | {% hint style="info" %}
 92 | VS Code also supports workspace-specific MCP servers by adding the above configuration to `.vscode/mcp.json` inside your project directory.
 93 | {% endhint %}
 94 | 
 95 | 9. Start prompting!
 96 | 
 97 | ### [Claude Desktop](https://modelcontextprotocol.io/quickstart/user)
 98 | 
 99 | 1. Open Cursor Desktop.
100 | 2. Go to `Settings > General > Claude Settings (Configure) > Connectors`
101 | 3. Click Add Custom Connector
102 | 4. Enter "Reflag" as the name and paste the MCP URL in: `https://app.reflag.com/api/mcp`
103 | 
104 | ### Claude Code
105 | 
106 | 1. On the command line inside your project directory, enter: `claude mcp add --transport http Reflag https://app.reflag.com/api/mcp`
107 | 2. Start `claude` and enter `/mcp` to begin the authentication process
108 | 
```

--------------------------------------------------------------------------------
/product-handbook/feature-targeting-rules/environments.md:
--------------------------------------------------------------------------------

```markdown
 1 | ---
 2 | description: Learn more about environments in Reflag
 3 | ---
 4 | 
 5 | # Environments
 6 | 
 7 | What are environments?
 8 | 
 9 | An environment is an instance of an app that is specified by a group of shared parameters or servers. Environments are usually used to isolate a production app from testing, however, they can also differentiate multiple single-tenant deployments of the same app.
10 | 
11 | Reflag has three default environments: `Production`, `Staging`, and `Development`.&#x20;
12 | 
13 | You can add, edit, and delete as many additional environments as you’d like.&#x20;
14 | 
15 | All environments except `Production` can be edited or deleted at any time.
16 | 
17 | ## Getting started
18 | 
19 | - When you create your account, there are three default environments: `Production`, `Staging`, and `Development`.&#x20;
20 | - Go to `Settings`
21 | - Under `App: [Your App Name]`, click `Environments`
22 | - Fetch your unique `publishable keys` and/or `secret keys` to implement with an [SDK or HTTP API](../../supported-languages/overview.md).
23 |   - This key is essential for integrating your applications with our platform. It ensures that events and data are attributed to the correct environment.
24 | 
25 | <figure><img src="../../.gitbook/assets/Getting started-min.png" alt="Reflag Environments"><figcaption></figcaption></figure>
26 | 
27 | ## Managing environments
28 | 
29 | ### Create a new environment
30 | 
31 | To create a new environment:
32 | 
33 | - Head to the `Settings` page
34 | - Select the `Environments` menu item listed `App: [Your App Name]`
35 | - Click the `+ New environment` button and give a name for your new environment.
36 |   - If needed, you can rename the environment later
37 | - After clicking the `Create` button, the new environment will appear in the list alongside its associated `publishable key` and `secret key.`
38 | 
39 | <figure><img src="../../.gitbook/assets/Create a new environment-min.png" alt="Environments after adding a new environment"><figcaption><p>Environments after adding "Pre-Production"</p></figcaption></figure>
40 | 
41 | {% hint style="info" %}
42 | The `Production` environment cannot be deleted or edited. New environments can be edited or deleted at any time.
43 | {% endhint %}
44 | 
45 | ### Switching Between Environments
46 | 
47 | You can switch between environments by:
48 | 
49 | - Click the app switcher interface in the top-left corner of the browser
50 | - Click on an environment listed below the application's name to switch to that environment
51 | - When a non-Production environment is active, it will be displayed under the current application's name in the app switcher.
52 | 
53 | <figure><img src="../../.gitbook/assets/Switching Between Environments-min.png" alt="Switching between environments"><figcaption></figcaption></figure>
54 | 
55 | ## Environment settings
56 | 
57 | There are three levels of settings in Reflag:
58 | 
59 | - `Organization`: _&#x43;_&#x6F;ntains the organization-wide settings
60 | - `App: [Your App Name]`: Contains the application-wide settings
61 | - `Environment: [Name]`: Contain environment-specific settings for the current application.
62 | 
63 | ### Application-wide functionalities
64 | 
65 | When you're configuring application-wide settings, environments aren't applicable.
66 | 
67 | The following entities and configuration options are application-wide and not dependent on an environment:
68 | 
69 | - `Feature Views`: They're application-wide except for their `Slack Reporting` settings,
70 | - `Company Segments`: They are shared across all environments. However, the companies in these segments will vary across environments.
71 | 
72 | ### Production environment-based functionalities
73 | 
74 | There are environment-specific functionalities that are only allowed in the `Production` environment. These are:
75 | 
76 | - `Slack`: Reporting settings in [Features](broken-reference) and [Feature views](https://reflag.com/glossary/feature-views) can be configured from any environment, but are also reflected in the `Production` environment
77 | - Some configuration sections are disabled if the selected environment is not `Production`.
78 | 
79 | {% hint style="info" %}
80 | Some settings are `Production environment`-only and are disabled when a non-`Production` environment is active.
81 | {% endhint %}
82 | 
83 | ### Environment-based functionalities
84 | 
85 | All other settings and functionalities are environment-specific. Anything that requires data to be sent from the clients is inherently environment-specific. This includes:
86 | 
87 | - [Access rules](../feature-rollouts/feature-targeting-rules.md)
88 | - [Automate feedback surveys](../launch-monitor/automated-feedback-surveys.md)
89 | - [Feedback](../product-overview.md#feedback)
90 | - [Tracking](../product-overview.md#tracking)
91 | - [Data export](../data-export.md)
92 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/slack.svg:
--------------------------------------------------------------------------------

```
 1 | <svg width="513" height="290" viewBox="0 0 513 290" fill="none" xmlns="http://www.w3.org/2000/svg">
 2 | <style>
 3 | @media (prefers-color-scheme: dark) {
 4 |     path { fill: white; }
 5 | }
 6 | </style>
 7 | <path d="M191.044 170.731L195.325 160.725C200.012 164.196 206.126 166.033 212.241 166.033C216.725 166.033 219.578 164.298 219.578 161.644C219.476 154.292 192.573 160.01 192.369 141.527C192.266 132.134 200.623 124.885 212.446 124.885C219.476 124.885 226.509 126.621 231.502 130.604L227.501 140.823C222.908 137.869 217.234 135.81 211.834 135.81C208.165 135.81 205.718 137.545 205.718 139.792C205.821 147.042 232.93 143.059 233.235 160.725C233.235 170.323 225.081 177.062 213.463 177.062C204.904 177.062 197.057 175.02 191.043 170.731H191.044ZM361.503 157.102C360.422 159.022 358.85 160.62 356.948 161.732C355.047 162.844 352.883 163.43 350.68 163.43C343.813 163.43 338.248 157.853 338.248 150.973C338.248 144.094 343.813 138.516 350.68 138.516C352.883 138.517 355.047 139.103 356.948 140.215C358.85 141.327 360.422 142.925 361.503 144.845L373.404 138.239C368.946 130.272 360.443 124.885 350.68 124.885C336.3 124.885 324.642 136.564 324.642 150.973C324.642 165.381 336.3 177.062 350.68 177.062C360.443 177.062 368.946 171.675 373.404 163.708L361.503 157.102ZM240.958 176.04H255.837V103.167H240.959L240.958 176.04ZM380.918 103.167V176.04H395.797V154.208L413.427 176.04H432.445L410.025 150.104L430.814 125.902H412.612L395.797 146.023V103.167H380.918ZM301.675 125.905V131.828C299.23 127.743 293.217 124.885 286.899 124.885C273.855 124.885 263.562 136.423 263.562 150.922C263.562 165.421 273.855 177.062 286.899 177.062C293.217 177.062 299.23 174.203 301.675 170.118V176.04H316.554V125.905H301.675ZM301.675 157.202C299.536 160.776 295.052 163.429 290.059 163.429C283.191 163.429 277.625 157.853 277.625 150.973C277.625 144.094 283.191 138.516 290.059 138.516C295.052 138.516 299.536 141.273 301.675 144.947V157.202Z" fill="black"/>
 8 | <path d="M112.469 101.558C107.648 101.558 103.739 105.475 103.739 110.305C103.738 111.453 103.963 112.589 104.401 113.65C104.839 114.71 105.482 115.674 106.293 116.487C107.103 117.299 108.066 117.944 109.126 118.384C110.186 118.824 111.322 119.051 112.469 119.052H121.201V110.305C121.203 107.987 120.284 105.764 118.646 104.123C117.009 102.483 114.787 101.56 112.469 101.558V101.558ZM112.469 124.884H89.1881C84.3664 124.884 80.4582 128.801 80.4582 133.633C80.4582 138.463 84.3664 142.38 89.1881 142.38H112.471C117.291 142.38 121.201 138.463 121.201 133.633C121.201 128.801 117.291 124.884 112.469 124.884" fill="#36C5F0"/>
 9 | <path d="M167.763 133.633C167.763 128.801 163.853 124.884 159.031 124.884C154.209 124.884 150.301 128.801 150.301 133.633V142.38H159.031C161.349 142.378 163.571 141.455 165.208 139.815C166.846 138.174 167.764 135.951 167.763 133.633V133.633ZM144.481 133.633V110.305C144.483 107.987 143.565 105.764 141.927 104.123C140.29 102.483 138.068 101.56 135.75 101.558C130.928 101.558 127.02 105.475 127.02 110.305V133.631C127.02 138.465 130.928 142.382 135.75 142.382C138.068 142.379 140.29 141.457 141.927 139.816C143.565 138.176 144.483 135.952 144.481 133.634" fill="#2EB67D"/>
10 | <path d="M135.75 189.035C138.068 189.032 140.29 188.109 141.927 186.469C143.565 184.828 144.483 182.605 144.481 180.287C144.483 177.969 143.565 175.746 141.927 174.105C140.29 172.465 138.068 171.542 135.75 171.54H127.02V180.287C127.02 185.118 130.928 189.035 135.75 189.035ZM135.75 165.708H159.033C163.853 165.708 167.763 161.791 167.763 156.959C167.764 154.641 166.846 152.418 165.208 150.777C163.571 149.137 161.349 148.214 159.031 148.212H135.75C130.928 148.212 127.02 152.129 127.02 156.959C127.019 158.107 127.244 159.243 127.682 160.304C128.12 161.365 128.763 162.329 129.573 163.141C130.384 163.953 131.347 164.598 132.407 165.038C133.466 165.478 134.602 165.705 135.75 165.707" fill="#ECB22E"/>
11 | <path d="M80.4577 156.96C80.4565 158.107 80.6814 159.244 81.1195 160.304C81.5576 161.365 82.2003 162.329 83.011 163.141C83.8216 163.954 84.7843 164.598 85.8441 165.039C86.9039 165.479 88.04 165.706 89.1876 165.707C91.5053 165.705 93.7273 164.782 95.3647 163.142C97.0021 161.501 97.9208 159.277 97.9189 156.96V148.212H89.1876C84.3659 148.212 80.4577 152.129 80.4577 156.96V156.96ZM103.739 156.96V180.286C103.739 185.118 107.647 189.035 112.469 189.035C114.786 189.033 117.008 188.11 118.646 186.469C120.283 184.829 121.202 182.605 121.2 180.288V156.96C121.201 155.812 120.976 154.675 120.538 153.615C120.1 152.554 119.457 151.59 118.646 150.777C117.835 149.965 116.873 149.321 115.813 148.88C114.753 148.44 113.616 148.213 112.469 148.212C107.647 148.212 103.739 152.129 103.739 156.96Z" fill="#E01E5A"/>
12 | </svg>
13 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/slack (1).svg:
--------------------------------------------------------------------------------

```
1 | <svg width="513" height="290" viewBox="0 0 513 290" fill="none" xmlns="http://www.w3.org/2000/svg">
2 | <rect width="512" height="288.257" transform="translate(0.5 0.871315)" fill="white"/>
3 | <path d="M191.044 170.731L195.325 160.725C200.012 164.196 206.126 166.033 212.241 166.033C216.725 166.033 219.578 164.298 219.578 161.644C219.476 154.292 192.573 160.01 192.369 141.527C192.266 132.134 200.623 124.885 212.446 124.885C219.476 124.885 226.509 126.621 231.502 130.604L227.501 140.823C222.908 137.869 217.234 135.81 211.834 135.81C208.165 135.81 205.718 137.545 205.718 139.792C205.821 147.042 232.93 143.059 233.235 160.725C233.235 170.323 225.081 177.062 213.463 177.062C204.904 177.062 197.057 175.02 191.043 170.731H191.044ZM361.503 157.102C360.422 159.022 358.85 160.62 356.948 161.732C355.047 162.844 352.883 163.43 350.68 163.43C343.813 163.43 338.248 157.853 338.248 150.973C338.248 144.094 343.813 138.516 350.68 138.516C352.883 138.517 355.047 139.103 356.948 140.215C358.85 141.327 360.422 142.925 361.503 144.845L373.404 138.239C368.946 130.272 360.443 124.885 350.68 124.885C336.3 124.885 324.642 136.564 324.642 150.973C324.642 165.381 336.3 177.062 350.68 177.062C360.443 177.062 368.946 171.675 373.404 163.708L361.503 157.102ZM240.958 176.04H255.837V103.167H240.959L240.958 176.04ZM380.918 103.167V176.04H395.797V154.208L413.427 176.04H432.445L410.025 150.104L430.814 125.902H412.612L395.797 146.023V103.167H380.918ZM301.675 125.905V131.828C299.23 127.743 293.217 124.885 286.899 124.885C273.855 124.885 263.562 136.423 263.562 150.922C263.562 165.421 273.855 177.062 286.899 177.062C293.217 177.062 299.23 174.203 301.675 170.118V176.04H316.554V125.905H301.675ZM301.675 157.202C299.536 160.776 295.052 163.429 290.059 163.429C283.191 163.429 277.625 157.853 277.625 150.973C277.625 144.094 283.191 138.516 290.059 138.516C295.052 138.516 299.536 141.273 301.675 144.947V157.202Z" fill="black"/>
4 | <path d="M112.469 101.558C107.648 101.558 103.739 105.475 103.739 110.305C103.738 111.453 103.963 112.589 104.401 113.65C104.839 114.71 105.482 115.674 106.293 116.487C107.103 117.299 108.066 117.944 109.126 118.384C110.186 118.824 111.322 119.051 112.469 119.052H121.201V110.305C121.203 107.987 120.284 105.764 118.646 104.123C117.009 102.483 114.787 101.56 112.469 101.558V101.558ZM112.469 124.884H89.1881C84.3664 124.884 80.4582 128.801 80.4582 133.633C80.4582 138.463 84.3664 142.38 89.1881 142.38H112.471C117.291 142.38 121.201 138.463 121.201 133.633C121.201 128.801 117.291 124.884 112.469 124.884" fill="#36C5F0"/>
5 | <path d="M167.763 133.633C167.763 128.801 163.853 124.884 159.031 124.884C154.209 124.884 150.301 128.801 150.301 133.633V142.38H159.031C161.349 142.378 163.571 141.455 165.208 139.815C166.846 138.174 167.764 135.951 167.763 133.633V133.633ZM144.481 133.633V110.305C144.483 107.987 143.565 105.764 141.927 104.123C140.29 102.483 138.068 101.56 135.75 101.558C130.928 101.558 127.02 105.475 127.02 110.305V133.631C127.02 138.465 130.928 142.382 135.75 142.382C138.068 142.379 140.29 141.457 141.927 139.816C143.565 138.176 144.483 135.952 144.481 133.634" fill="#2EB67D"/>
6 | <path d="M135.75 189.035C138.068 189.032 140.29 188.109 141.927 186.469C143.565 184.828 144.483 182.605 144.481 180.287C144.483 177.969 143.565 175.746 141.927 174.105C140.29 172.465 138.068 171.542 135.75 171.54H127.02V180.287C127.02 185.118 130.928 189.035 135.75 189.035ZM135.75 165.708H159.033C163.853 165.708 167.763 161.791 167.763 156.959C167.764 154.641 166.846 152.418 165.208 150.777C163.571 149.137 161.349 148.214 159.031 148.212H135.75C130.928 148.212 127.02 152.129 127.02 156.959C127.019 158.107 127.244 159.243 127.682 160.304C128.12 161.365 128.763 162.329 129.573 163.141C130.384 163.953 131.347 164.598 132.407 165.038C133.466 165.478 134.602 165.705 135.75 165.707" fill="#ECB22E"/>
7 | <path d="M80.4577 156.96C80.4565 158.107 80.6814 159.244 81.1195 160.304C81.5576 161.365 82.2003 162.329 83.011 163.141C83.8216 163.954 84.7843 164.598 85.8441 165.039C86.9039 165.479 88.04 165.706 89.1876 165.707C91.5053 165.705 93.7273 164.782 95.3647 163.142C97.0021 161.501 97.9208 159.277 97.9189 156.96V148.212H89.1876C84.3659 148.212 80.4577 152.129 80.4577 156.96V156.96ZM103.739 156.96V180.286C103.739 185.118 107.647 189.035 112.469 189.035C114.786 189.033 117.008 188.11 118.646 186.469C120.283 184.829 121.202 182.605 121.2 180.288V156.96C121.201 155.812 120.976 154.675 120.538 153.615C120.1 152.554 119.457 151.59 118.646 150.777C117.835 149.965 116.873 149.321 115.813 148.88C114.753 148.44 113.616 148.213 112.469 148.212C107.647 148.212 103.739 152.129 103.739 156.96Z" fill="#E01E5A"/>
8 | </svg>
9 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/gitbook-logo.svg:
--------------------------------------------------------------------------------

```
 1 | <svg width="512" height="289" viewBox="0 0 512 289" fill="none" xmlns="http://www.w3.org/2000/svg">
 2 | <style>
 3 | @media (prefers-color-scheme: dark) {
 4 |     path { fill: white; }
 5 | }
 6 | </style>
 7 | <path d="M103.988 146.536C107.875 148.778 109.818 149.899 111.953 149.901C114.087 149.903 116.032 148.785 119.922 146.55L144.722 132.303C145.842 131.66 146.532 130.467 146.532 129.177C146.532 127.886 145.842 126.694 144.722 126.051L119.913 111.798C116.027 109.566 114.084 108.449 111.952 108.45C109.82 108.451 107.878 109.569 103.993 111.805L82.6656 124.079C82.5076 124.17 82.4286 124.215 82.3548 124.259C75.0697 128.521 70.5686 136.302 70.5084 144.739C70.5078 144.824 70.5078 144.915 70.5078 145.098C70.5078 145.28 70.5078 145.371 70.5084 145.456C70.5685 153.883 75.0595 161.657 82.3318 165.923C82.4052 165.966 82.4842 166.012 82.6419 166.103L96.0013 173.811C103.786 178.303 107.678 180.549 111.952 180.551C116.227 180.552 120.12 178.309 127.908 173.822L142.011 165.697C145.91 163.451 147.859 162.327 148.93 160.476C150.001 158.624 150.001 156.375 150.001 151.876V143.187C150.001 141.939 149.324 140.789 148.234 140.182C147.178 139.594 145.891 139.603 144.844 140.204L115.926 156.817C113.986 157.932 113.016 158.489 111.951 158.49C110.887 158.49 109.916 157.933 107.975 156.82L88.4034 145.592C87.423 145.029 86.9327 144.748 86.539 144.697C85.6413 144.581 84.7782 145.084 84.4362 145.922C84.2863 146.289 84.2894 146.854 84.2954 147.984C84.2999 148.815 84.3021 149.231 84.3799 149.614C84.5541 150.47 85.005 151.246 85.6634 151.821C85.9574 152.078 86.3178 152.286 87.0386 152.702L107.964 164.772C109.91 165.895 110.883 166.456 111.952 166.456C113.02 166.457 113.993 165.896 115.94 164.775L141.589 149.998C142.254 149.615 142.586 149.424 142.835 149.568C143.085 149.712 143.085 150.095 143.085 150.862V154.804C143.085 155.928 143.085 156.49 142.817 156.953C142.549 157.416 142.062 157.697 141.087 158.259L119.932 170.446C116.037 172.69 114.09 173.812 111.952 173.811C109.814 173.81 107.868 172.686 103.976 170.439L84.183 159.012C84.1202 158.976 84.0888 158.958 84.0594 158.941C79.9094 156.517 77.3487 152.083 77.3247 147.28C77.3245 147.246 77.3245 147.209 77.3245 147.137V143.519C77.3245 140.867 78.7377 138.416 81.0334 137.086C83.0619 135.911 85.564 135.909 87.5948 137.08L103.988 146.536Z" fill="#181C1F"/>
 8 | <path d="M202.835 163.146C190.034 163.146 182.312 155.532 182.312 144.5C182.312 133.623 190.086 125.854 202.887 125.854C214.495 125.854 220.767 131.447 221.285 138.802H213.77C213.407 135.85 210.816 132.173 203.302 132.173H202.473C194.698 132.173 189.516 136.679 189.516 144.5C189.516 152.321 194.802 156.827 202.473 156.827H203.302C210.868 156.827 214.962 153.305 214.962 150.352V149.938H203.042V143.619H216.879C220.041 143.619 221.804 145.432 221.804 148.591V162.628H214.962V158.588C213.563 160.349 209.884 163.146 202.835 163.146Z" fill="#181C1F"/>
 9 | <path d="M233.277 162.628H226.125V126.372H233.277V162.628Z" fill="#181C1F"/>
10 | <path d="M258.641 162.628H251.49V132.691H236.875V126.372H273.256V132.691H258.641V162.628Z" fill="#181C1F"/>
11 | <path d="M298.092 162.628H276.844V126.372H297.471C303.949 126.372 308.924 129.998 308.924 135.954C308.924 140.098 306.281 143.05 303.171 144.19C306.902 145.018 309.805 148.074 309.805 152.787C309.805 158.796 304.57 162.628 298.092 162.628ZM283.996 132.691V141.082H296.693C299.855 141.082 301.72 139.631 301.72 136.731C301.72 134.348 299.855 132.691 296.693 132.691H283.996ZM283.996 147.401V156.309H297.056C300.476 156.309 302.602 154.548 302.602 151.803C302.602 148.851 300.476 147.401 297.056 147.401H283.996Z" fill="#181C1F"/>
12 | <path d="M333.451 163.146C321.686 163.146 312.875 156.102 312.875 144.5C312.875 132.898 321.686 125.854 333.451 125.854C345.214 125.854 353.973 132.898 353.973 144.5C353.973 156.102 345.214 163.146 333.451 163.146ZM333.036 156.827H333.864C340.861 156.827 346.769 152.321 346.769 144.5C346.769 136.679 340.861 132.173 333.864 132.173H333.036C326.039 132.173 320.079 136.679 320.079 144.5C320.079 152.321 326.039 156.827 333.036 156.827Z" fill="#181C1F"/>
13 | <path d="M377.231 163.146C365.466 163.146 356.656 156.102 356.656 144.5C356.656 132.898 365.466 125.854 377.231 125.854C388.995 125.854 397.753 132.898 397.753 144.5C397.753 156.102 388.995 163.146 377.231 163.146ZM376.816 156.827H377.646C384.641 156.827 390.55 152.321 390.55 144.5C390.55 136.679 384.641 132.173 377.646 132.173H376.816C369.82 132.173 363.859 136.679 363.859 144.5C363.859 152.321 369.82 156.827 376.816 156.827Z" fill="#181C1F"/>
14 | <path d="M438.018 162.628H428.586L413.763 146.261L408.581 150.664V162.628H401.43V126.372H408.581V142.377L427.29 126.372H437.188L419.05 141.807L438.018 162.628Z" fill="#181C1F"/>
15 | </svg>
16 | 
```

--------------------------------------------------------------------------------
/product-handbook/feature-clean-up-and-archival-beta/ai-code-clean-up-beta.md:
--------------------------------------------------------------------------------

```markdown
  1 | # AI code clean-up (beta)
  2 | 
  3 | When the [GitHub integration](../../integrations/github.md) has been enabled, Reflag can automatically clean up your code after features turn stale. The Reflag bot simply submits a pull request to your GitHub repository which removes the flag code once a feature turns stale.
  4 | 
  5 | {% hint style="warning" %}
  6 | This feature **keeps the codepath that grants access (isEnabled == true)** when cleaning up and archiving a feature i.e. releasing it everyone by removing the flagging code.
  7 | {% endhint %}
  8 | 
  9 | {% hint style="info" %}
 10 | Note: This works best when using the [React SDK](../../sdk/@reflag/browser-sdk/), but stay tuned for improved Node.js support
 11 | {% endhint %}
 12 | 
 13 | <figure><img src="../../.gitbook/assets/1753259671871 (1).jpeg" alt=""><figcaption></figcaption></figure>
 14 | 
 15 | ## Get started with AI code clean-up
 16 | 
 17 | ### 1. Connect with GitHub
 18 | 
 19 | Make sure the [GitHub integration](https://app.reflag.com/env-current/settings/org-integrations) is connected for your organization and a repository have been chosen.
 20 | 
 21 | ### 2. Enable automation
 22 | 
 23 | Enable "Auto-create AI Clean-up PRs" under organization-level [Clean-up settings](https://app.reflag.com/env-current/settings/org-archiving-flow).
 24 | 
 25 | This will ensure that newly created features have the automation switched on.
 26 | 
 27 | <figure><img src="../../.gitbook/assets/image (26).png" alt="" width="563"><figcaption></figcaption></figure>
 28 | 
 29 | ### 3. Test it manually
 30 | 
 31 | Find a stale feature that is ready for clean-up by looking for the broom icon in the features table.
 32 | 
 33 | <figure><img src="../../.gitbook/assets/image (30).png" alt="" width="563"><figcaption></figcaption></figure>
 34 | 
 35 | Find the "Clean-up guide" in the feature sidebar, click "Show details" and hit the "Create AI clean-up PR" button to start the process.
 36 | 
 37 | <figure><img src="../../.gitbook/assets/image (23).png" alt="" width="563"><figcaption></figcaption></figure>
 38 | 
 39 | Within a few minutes, you'll have a GitHub Pull Request that removes the feature flag and keeps the enabled codepath, like here:
 40 | 
 41 | <figure><img src="../../.gitbook/assets/image (29).png" alt=""><figcaption></figcaption></figure>
 42 | 
 43 | Magical! ✨
 44 | 
 45 | ## Formatting clean-up PRs
 46 | 
 47 | If you're using eslint and/or prettier in GitHub Actions to ensure that code is correctly formatted, you'll need to set up a small GitHub Action workflow which runs on the AI Clean-up PRs.
 48 | 
 49 | The idea is that you run your own formatters with the existing configuration once the Reflag generated AI Clean-up PR has been created and then commit the results directly in the same Pull Request to make the PR checks pass.
 50 | 
 51 | Example: `.github/workflows/reflag-clean-up-formatting.yml`
 52 | 
 53 | ```yaml
 54 | name: AI clean-up formatting
 55 | 
 56 | on:
 57 |   pull_request:
 58 |     types: [opened]
 59 | 
 60 | permissions:
 61 |   contents: write
 62 | 
 63 | jobs:
 64 |   formatting:
 65 |     if: startsWith(github.head_ref, 'reflag-flag-removal/')
 66 |     name: ✨ Check formatting
 67 |     runs-on: ubuntu-latest
 68 |     timeout-minutes: 20
 69 |     steps:
 70 |       - name: ☁️ Checkout project
 71 |         uses: actions/checkout@v4
 72 |         with:
 73 |           fetch-depth: 0
 74 | 
 75 |       - name: ⚙️ Setup Node.js
 76 |         uses: actions/setup-node@v4
 77 |         with:
 78 |           node-version-file: ".nvmrc"
 79 | 
 80 |       - name: 📥 Install dependencies
 81 |         uses: ./.github/actions/install
 82 | 
 83 |       - name: ✨ Run formatting
 84 |         run: yarn format # <--- this is where you run `eslint --fix` or `prettier -w` etc.
 85 | 
 86 |       - name: 💾 Commit formatted files
 87 |         uses: stefanzweifel/git-auto-commit-action@v5
 88 |         with:
 89 |           commit_message: "style: format code (@reflagcom: push empty commit)"
 90 | ```
 91 | 
 92 | Take note of the magic ✨ keyword included in the commit message in the final step.
 93 | 
 94 | Unfortunately, GitHub purposefully disables running checks on commits that are generated from inside the GitHub Actions job. In order for the checks to run again after the code has been correctly formatted and committed, the @reflagcom bot will push an empty commit when it sees a commit with the text `(@reflagcom: push empty commit)` .
 95 | 
 96 | ## Under the hood
 97 | 
 98 | The GitHub integration continuously checks the codebase against the feature keys in Reflag whenever a commit is pushed to the repository.
 99 | 
100 | When the AI clean-up bot operates, it searches for usage of the Reflag SDK in your codebase and identifies where specific feature keys are used. LLMs are employed to intelligently refactor the code to remove the flag and eliminate codepaths that become unreachable.
101 | 
102 | For React, this usually corresponds to the `useFlag` hook, like in this contrived example:
103 | 
104 | ```javascript
105 | function StartHuddleButton() {
106 |   const { isEnabled } = useFlag("huddle");
107 |   if (!isEnabled) {
108 |     return null;
109 |   }
110 |   return <button onClick={track}>Start huddle!</button>;
111 | }
112 | ```
113 | 
114 | When the bot cleans up the file, it removes the hook and only retains the `isEnabled` codepath:
115 | 
116 | ```javascript
117 | function StartHuddleButton() {
118 |   return <button onClick={track}>Start huddle!</button>;
119 | }
120 | ```
121 | 
122 | **Limitations**:
123 | 
124 | * Only `isEnabled` is removed, whereas `track`, `config`, and `requestFeedback` are untouched.
125 | * Works best with the React SDK while in beta.
126 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/github-logo.svg:
--------------------------------------------------------------------------------

```
1 | <svg width="512" height="289" viewBox="0 0 512 289" fill="none" xmlns="http://www.w3.org/2000/svg">
2 | <style>@media (prefers-color-scheme: dark) { path { fill: white; }}</style>
3 | <path d="M135.587 105C113.136 105 95 123.088 95 145.479C95 163.392 106.621 178.583 122.733 183.939C124.758 184.29 125.55 183.061 125.55 182.007C125.55 181.041 125.462 177.88 125.462 174.456C115.249 176.3 112.608 171.997 111.816 169.714C111.376 168.573 109.351 164.972 107.678 164.007C106.269 163.216 104.244 161.372 107.59 161.284C110.759 161.197 113.048 164.182 113.841 165.411C117.538 171.558 123.349 169.802 125.638 168.748C125.99 166.114 127.047 164.358 128.191 163.304C119.123 162.25 109.703 158.826 109.703 143.284C109.703 138.894 111.287 135.206 113.841 132.396C113.4 131.342 111.992 127.215 114.281 121.683C114.281 121.683 117.714 120.63 125.462 125.81C128.719 124.932 132.153 124.405 135.587 124.405C139.02 124.405 142.454 124.844 145.711 125.81C153.459 120.542 156.892 121.683 156.892 121.683C159.093 127.215 157.685 131.43 157.333 132.396C159.886 135.206 161.471 138.806 161.471 143.284C161.471 158.826 151.962 162.25 142.894 163.304C144.391 164.533 145.623 166.992 145.623 170.768C145.623 176.212 145.535 180.514 145.535 181.919C145.535 182.973 146.328 184.29 148.352 183.851C164.376 178.495 175.997 163.304 175.997 145.391C176.261 123.088 158.037 105 135.587 105Z" fill="#1B1F24"/>
4 | <path d="M289.818 164.689H289.73C289.818 164.689 289.818 164.689 289.818 164.689ZM289.818 164.689C289.378 164.689 288.235 164.956 287.004 164.956C283.136 164.956 281.817 163.178 281.817 160.867V145.312H289.642C290.081 145.312 290.433 144.956 290.433 144.334V135.89C290.433 135.445 290.081 135.09 289.642 135.09H281.817V124.69C281.817 124.334 281.554 124.068 281.114 124.068H270.564C270.124 124.068 269.861 124.334 269.861 124.69V135.445C269.861 135.445 264.498 136.778 264.146 136.867C263.794 136.956 263.531 137.312 263.531 137.667V144.423C263.531 144.956 263.882 145.401 264.322 145.401H269.773V161.667C269.773 173.756 278.125 175 283.839 175C286.477 175 289.554 174.2 290.081 173.933C290.345 173.844 290.521 173.489 290.521 173.133V165.667C290.609 165.134 290.257 164.778 289.818 164.689ZM406.043 153.845C406.043 144.867 402.439 143.712 398.658 144.067C395.757 144.245 393.383 145.756 393.383 145.756V163.178C393.383 163.178 395.757 164.867 399.362 164.956C404.461 165.134 406.043 163.267 406.043 153.845ZM418 153.045C418 170.022 412.549 174.911 403.054 174.911C395.054 174.911 390.658 170.822 390.658 170.822C390.658 170.822 390.482 173.133 390.218 173.4C390.043 173.667 389.867 173.756 389.515 173.756H382.218C381.691 173.756 381.251 173.4 381.251 172.956L381.339 117.845C381.339 117.401 381.691 117.046 382.13 117.046H392.592C393.032 117.046 393.383 117.401 393.383 117.845L393.295 136.423C393.295 136.423 397.34 133.756 403.23 133.756H403.318C409.296 133.756 418 135.978 418 153.045ZM375.185 135.09H364.898C364.371 135.09 364.107 135.445 364.107 136.067V163C364.107 163 361.382 164.956 357.689 164.956C353.997 164.956 352.942 163.267 352.942 159.534V135.978C352.942 135.534 352.59 135.179 352.151 135.179H341.688C341.249 135.179 340.897 135.534 340.897 135.978V161.311C340.897 172.244 346.963 174.911 355.228 174.911C362.085 174.911 367.624 171.089 367.624 171.089C367.624 171.089 367.888 173.044 367.976 173.311C368.063 173.578 368.415 173.756 368.767 173.756H375.361C375.888 173.756 376.152 173.4 376.152 172.956L376.24 135.89C376.152 135.534 375.712 135.09 375.185 135.09ZM258.959 135.09H248.497C248.057 135.09 247.706 135.534 247.706 136.067V172.422C247.706 173.4 248.321 173.756 249.2 173.756H258.607C259.574 173.756 259.838 173.311 259.838 172.422V135.89C259.838 135.445 259.399 135.09 258.959 135.09ZM253.86 118.29C250.079 118.29 247.09 121.312 247.09 125.134C247.09 128.956 250.079 131.979 253.86 131.979C257.552 131.979 260.542 128.956 260.542 125.134C260.542 121.312 257.552 118.29 253.86 118.29ZM334.743 117.046H324.369C323.929 117.046 323.578 117.401 323.578 117.845V138.112H307.313V117.934C307.313 117.49 306.961 117.134 306.522 117.134H296.06C295.62 117.134 295.269 117.49 295.269 117.934V173.044C295.269 173.489 295.708 173.844 296.06 173.844H306.522C306.961 173.844 307.313 173.489 307.313 173.044V149.4H323.578L323.49 172.956C323.49 173.4 323.841 173.756 324.281 173.756H334.743C335.183 173.756 335.534 173.4 335.534 172.956V117.845C335.534 117.49 335.183 117.046 334.743 117.046ZM242.167 141.49V169.933C242.167 170.111 242.079 170.467 241.903 170.556C241.903 170.556 235.749 175 225.639 175C213.418 175 199 171.089 199 145.667C199 120.157 211.66 114.912 223.968 115.001C234.694 115.001 239.002 117.401 239.617 117.845C239.793 118.112 239.881 118.29 239.881 118.557L237.859 127.356C237.859 127.801 237.42 128.334 236.892 128.156C235.134 127.623 232.496 126.556 226.254 126.556C219.045 126.556 211.308 128.601 211.308 145.045C211.308 161.489 218.693 163.356 223.968 163.356C228.452 163.356 230.122 162.822 230.122 162.822V151.445H222.913C222.386 151.445 221.946 151.089 221.946 150.645V141.49C221.946 141.045 222.298 140.69 222.913 140.69H241.288C241.815 140.601 242.167 141.045 242.167 141.49Z" fill="#1B1F24"/>
5 | </svg>
6 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/amplitude.svg:
--------------------------------------------------------------------------------

```
1 | <svg width="512" height="289" viewBox="0 0 512 289" fill="none" xmlns="http://www.w3.org/2000/svg">
2 | <style>
3 | @media (prefers-color-scheme: dark) {
4 |     path { fill: white; }
5 | }
6 | </style>
7 | <path d="M107.63 129.799C108.579 132.675 109.527 136.35 110.633 140.505C106.524 140.505 102.257 140.345 98.3063 140.345H96.2518C98.6223 131.237 101.309 124.206 103.521 122.608C103.679 122.448 103.838 122.448 104.154 122.448C104.47 122.448 104.628 122.608 104.944 122.928C105.26 123.727 106.208 125.644 107.63 129.799ZM148.088 144.5C148.088 166.072 130.704 183.65 109.369 183.65C88.034 183.65 70.65 166.072 70.65 144.5C70.65 122.928 88.034 105.35 109.369 105.35C130.704 105.35 148.088 122.928 148.088 144.5ZM138.131 143.541C138.131 142.582 137.499 141.624 136.551 141.464C136.393 141.464 136.393 141.464 136.235 141.464H135.919C129.439 140.984 122.644 140.825 116.322 140.665C113.32 129 109.369 117.175 104.312 117.175C99.5706 117.175 95.1456 125.005 91.3527 140.345C88.6661 140.345 86.2956 140.345 84.0831 140.186C83.925 140.186 83.767 140.186 83.767 140.186C83.2929 140.186 82.9768 140.186 82.9768 140.186C81.7125 140.345 80.7643 141.624 80.7643 142.902C80.7643 144.18 81.7125 145.459 83.1348 145.619H90.4045C89.7723 148.655 89.1402 151.691 88.6661 154.567L88.5081 155.846C88.5081 156.804 89.2982 157.603 90.2465 157.603C90.8786 157.603 91.5107 157.284 91.8268 156.804L95.3036 145.459H112.213C113.478 150.412 114.9 155.526 116.638 160.32C117.587 162.877 119.799 168.949 123.592 168.949C129.281 168.949 131.494 159.681 132.916 153.608C133.232 152.33 133.548 151.211 133.706 150.253L133.864 149.933C133.864 149.773 133.864 149.613 133.864 149.454C133.706 149.134 133.548 148.974 133.232 148.814C132.758 148.655 132.442 148.974 132.284 149.454L132.126 149.773C131.652 151.052 131.178 152.33 130.862 153.449V153.608C128.333 160.639 127.227 163.835 125.014 163.835C122.17 163.835 119.483 152.17 118.535 147.696C118.377 146.897 118.219 146.258 118.061 145.619H136.551C136.867 145.619 137.183 145.459 137.499 145.459C137.499 145.459 137.499 145.459 137.657 145.459C137.657 145.459 137.657 145.459 137.815 145.459C137.815 145.459 137.973 145.459 137.973 145.299C137.815 144.66 138.131 144.18 138.131 143.541ZM187.438 154.248L190.599 161.918H199.449L182.381 121.809H174.479L157.57 161.918H166.42L169.58 154.248H187.438ZM184.278 146.737H172.583L178.43 132.196L184.278 146.737ZM237.378 132.995C232.953 132.995 230.266 134.273 227.263 136.99C225.051 134.433 221.89 132.995 218.413 132.995C215.095 132.995 213.356 133.953 211.618 135.551V133.953H203.716V161.918H211.776V143.541C213.356 141.304 215.095 140.345 216.675 140.345C220.468 140.345 222.68 142.742 222.68 147.217V161.918H230.582V146.577C230.582 145.459 230.424 144.5 230.424 143.541C232.163 141.144 233.901 140.505 235.639 140.505C239.432 140.505 241.487 142.902 241.487 147.376V162.078H249.546V146.737C249.546 138.268 244.173 132.995 237.378 132.995ZM271.355 133.314C268.195 133.314 265.666 134.113 263.454 135.551V133.953H255.394V175.5H263.454V160.32C265.666 161.758 268.195 162.557 271.355 162.557C279.099 162.557 285.263 156.165 285.263 148.016C285.105 139.706 278.941 133.314 271.355 133.314ZM269.933 155.686C267.563 155.686 265.192 154.887 263.454 152.49V143.541C265.192 141.144 267.563 140.186 269.933 140.186C274.042 140.186 277.045 143.861 277.045 148.016C277.045 152.01 274.042 155.686 269.933 155.686ZM297.589 120.371H289.529V161.918H297.589V120.371ZM309.6 128.68C312.287 128.68 314.341 126.763 314.341 124.046C314.341 121.33 312.129 119.252 309.6 119.252C306.913 119.252 304.701 121.33 304.701 124.046C304.859 126.763 306.913 128.68 309.6 128.68ZM305.649 133.953V161.918H313.709V133.953H305.649ZM342.155 154.727C340.575 155.206 338.995 155.526 337.414 155.526C334.412 155.526 332.515 154.088 332.515 150.892V140.984H342.471V134.113H332.357V124.046H324.455V134.113H318.608V140.984H324.455V151.052C324.455 158.242 328.88 163.036 335.676 163.036C338.363 163.036 339.785 162.877 343.262 161.758L342.155 154.727ZM375.185 133.953H367.125V152.01C365.229 154.248 363.174 155.526 361.12 155.526C357.327 155.526 355.114 153.129 355.114 148.655V133.953H347.054V149.454C347.054 157.603 351.954 162.877 359.223 162.877C362.384 162.877 364.913 161.758 367.125 160V161.918H375.185V133.953ZM409.479 120.371H401.419V135.551C399.206 134.113 396.678 133.314 393.517 133.314C385.773 133.314 379.61 139.706 379.61 147.856C379.61 156.165 385.773 162.397 393.517 162.397C396.678 162.397 399.206 161.598 401.419 160.16V161.758H409.479V120.371ZM394.781 155.686C390.514 155.686 387.67 152.01 387.67 147.856C387.67 143.701 390.672 140.186 394.781 140.186C397.152 140.186 399.522 140.984 401.261 143.381V152.33C399.522 154.887 397.152 155.686 394.781 155.686ZM442.35 147.376C442.35 138.588 436.345 132.995 428.443 132.995C419.593 132.995 413.588 139.227 413.588 148.016C413.588 156.485 419.593 163.036 428.601 163.036C435.238 163.036 440.454 159.361 442.034 153.928H433.5C432.552 155.366 431.13 156.005 428.759 156.005C424.334 156.005 422.121 153.449 421.489 150.093H442.034C442.35 149.134 442.35 148.495 442.35 147.376ZM428.443 139.866C431.762 139.866 433.816 141.783 434.29 145.299H421.647C422.438 142.103 424.65 139.866 428.443 139.866Z" fill="#1E61F0"/>
8 | </svg>
9 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/mixpanel.svg:
--------------------------------------------------------------------------------

```
1 | <svg width="512" height="289" viewBox="0 0 512 289" fill="none" xmlns="http://www.w3.org/2000/svg">
2 | <style>
3 | @media (prefers-color-scheme: dark) {
4 |     path { fill: white; }
5 | }
6 | </style>
7 | <path d="M70.6 167.819H92.8414V165.492H91.1751C87.9222 165.492 87.1439 164.618 87.1439 161.427V132.572C89.4089 128.792 92.4622 126.367 96.3039 126.367C101.133 126.367 104.077 129.852 104.077 136.44V161.427C104.077 164.628 103.289 165.492 100.135 165.492H98.3594V167.819H120.112V165.502H118.535C115.282 165.502 114.504 164.628 114.504 161.437V135.37C114.504 134.496 114.504 133.622 114.404 132.758C116.57 128.88 119.822 126.367 123.654 126.367C128.484 126.367 131.437 129.852 131.437 136.44V161.427C131.437 164.628 130.649 165.492 127.496 165.492H125.72V167.819H147.472V165.502H145.995C142.643 165.502 141.864 164.628 141.864 161.437V135.37C141.864 125.591 136.257 120.161 128.084 120.161C121.988 120.161 116.669 123.46 113.816 130.039C112.149 123.647 107.22 120.161 100.724 120.161C94.9169 120.161 89.8978 123.254 87.1339 129.459V121.32H70.6V123.647H72.5657C75.9184 123.647 76.6967 124.521 76.6967 127.712V161.417C76.6967 164.618 75.9084 165.482 72.5657 165.482H70.6V167.819ZM160.573 113.583C164.116 113.583 167.069 110.677 167.069 107.192C167.069 103.706 164.116 100.8 160.573 100.8C157.031 100.8 154.078 103.706 154.078 107.192C154.078 110.677 157.031 113.583 160.573 113.583ZM149.548 167.819H171.4V165.492H169.923C166.67 165.492 165.892 164.618 165.892 161.427V121.33H149.348V123.657H151.314C154.666 123.657 155.445 124.531 155.445 127.721V161.427C155.445 164.628 154.656 165.492 151.314 165.492H149.538L149.548 167.819ZM187.345 140.515H193.641C192.065 139.543 191.476 138.188 190.688 135.674L188.323 127.054C187.245 123.176 186.357 121.34 182.027 121.34H172.976V123.667H174.264C176.918 123.667 177.217 124.639 178.005 127.545L180.071 135.105C181.149 138.777 182.835 140.515 187.345 140.515ZM201.923 140.515H208.219C212.749 140.515 214.316 138.767 215.404 135.095L217.469 127.535C218.257 124.629 218.647 123.657 221.211 123.657H222.498V121.33H213.538C209.107 121.33 208.219 123.077 207.232 127.044L204.867 135.664C204.088 138.276 203.49 139.543 201.923 140.515ZM193.651 148.644H201.923V140.505H193.651V148.644ZM172.976 167.829H182.027C186.357 167.829 187.245 165.983 188.323 162.115L190.688 153.494C191.476 150.981 192.065 149.616 193.641 148.654H187.345C182.815 148.654 181.139 150.401 180.061 154.073L177.995 161.633C177.207 164.54 176.918 165.512 174.254 165.512H172.966L172.976 167.829ZM213.528 167.829H222.488V165.502H221.201C218.647 165.502 218.247 164.53 217.459 161.624L215.394 154.064C214.316 150.382 212.74 148.644 208.209 148.644H201.923C203.5 149.616 204.068 150.873 204.857 153.484L207.222 162.105C208.209 166.081 209.097 167.829 213.528 167.829ZM223.765 187.2H246.596V184.873H244.231C241.088 184.873 240.289 183.999 240.289 180.808V162.311C243.143 166.474 247.973 168.997 253.68 168.997C264.407 168.997 272.968 159.699 272.968 143.627C272.968 129.096 264.896 120.191 254.458 120.191C248.362 120.191 243.233 123.676 240.279 129.872V121.349H223.735V123.676H225.701C228.954 123.676 229.832 124.55 229.832 127.741V180.808C229.832 184.009 228.944 184.873 225.701 184.873H223.735V187.2H223.765ZM250.746 126.18C257.143 126.18 262.361 132.091 262.361 143.804C262.361 156.587 257.532 163.568 250.946 163.568C246.705 163.568 242.973 161.339 240.309 157.461V133.436C242.864 128.693 246.516 126.17 250.746 126.18ZM288.544 168.801C294.94 168.801 300.059 165.796 303.9 159.022V160.082C303.9 165.895 307.642 168.408 313.839 168.408C315.715 168.408 318.079 168.221 319.646 167.731V165.305C318.858 165.492 318.269 165.6 317.68 165.6C315.216 165.6 314.427 164.147 314.427 161.82V137.029C314.427 125.601 307.932 120.171 297.005 120.171C289.721 120.171 282.637 123.47 278.107 126.956L279.683 129.675C284.413 126.475 289.033 124.639 294.052 124.639C300.548 124.639 303.89 128.124 303.89 136.263V138.394L291.777 143.048C280.751 147.505 276.71 151.668 276.71 157.961C276.72 164.245 281.25 168.801 288.544 168.801ZM287.067 155.428C287.067 150.588 289.921 147.103 295.728 144.579L303.9 141.094V156.204C300.847 160.367 297.305 162.792 293.463 162.792C289.632 162.792 287.077 160.18 287.067 155.428ZM321.612 167.829H344.063V165.502H342.187C338.934 165.502 338.156 164.628 338.156 161.437V132.67C340.421 128.792 343.763 126.376 347.705 126.376C352.823 126.376 356.076 129.862 356.076 136.45V161.437C356.076 164.638 355.288 165.502 352.135 165.502H350.259V167.829H372.6V165.502H370.635C367.282 165.502 366.504 164.628 366.504 161.437V135.37C366.504 125.591 360.597 120.161 352.235 120.161C346.138 120.161 341.009 123.254 338.156 129.459V121.32H321.612V123.647H323.577C326.93 123.647 327.708 124.521 327.708 127.712V161.417C327.708 164.618 326.92 165.482 323.577 165.482H321.612V167.829ZM398.194 168.987C404.69 168.987 410.797 166.081 415.227 162.596L413.75 160.465C409.809 163.273 405.379 164.53 401.248 164.53C391.21 164.53 385.303 157.559 385.303 144V142.252H416.405C416.215 129.175 408.033 120.269 396.129 120.269C384.225 120.269 374.666 130.824 374.666 144.776C374.676 160.092 383.536 168.997 398.194 168.987ZM396.229 122.685C402.136 122.685 405.778 128.978 406.367 139.631H385.502C386.39 128.89 390.521 122.685 396.229 122.685ZM418.57 167.819H441.4V165.492H439.135C435.882 165.492 435.104 164.618 435.104 161.427V101.959H418.56V104.285H420.526C423.779 104.285 424.657 105.159 424.657 108.35V161.427C424.657 164.628 423.769 165.492 420.526 165.492H418.56L418.57 167.819Z" fill="#7856FF"/>
8 | </svg>
9 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/linear.svg:
--------------------------------------------------------------------------------

```
1 | <svg width="512" height="290" viewBox="0 0 512 290" fill="none" xmlns="http://www.w3.org/2000/svg">
2 | <style>
3 | @media (prefers-color-scheme: dark) {
4 |     path { fill: white; }
5 | }
6 | </style>
7 | <path fill-rule="evenodd" clip-rule="evenodd" d="M80.8993 112.918C80.4048 113.472 80.4376 114.322 80.9571 114.851L145.162 180.291C145.681 180.82 146.515 180.854 147.058 180.35C156.473 171.618 162.382 159.03 162.382 145.035C162.382 118.672 141.414 97.3 115.548 97.3C101.817 97.3 89.4658 103.323 80.8993 112.918ZM72.8747 125.337C72.6375 125.871 72.7571 126.496 73.1633 126.91L133.331 188.234C133.737 188.648 134.35 188.77 134.873 188.529C136.263 187.886 137.617 187.176 138.93 186.403C139.711 185.944 139.831 184.858 139.193 184.209L77.1131 120.935C76.4757 120.285 75.4105 120.407 74.9598 121.202C74.2016 122.541 73.5052 123.921 72.8747 125.337ZM69.2246 142.897C68.9428 142.61 68.793 142.215 68.8195 141.809C68.9437 139.912 69.1767 138.045 69.5122 136.214C69.7134 135.117 71.0292 134.736 71.8038 135.525L124.878 189.62C125.653 190.41 125.279 191.751 124.202 191.956C122.406 192.298 120.574 192.535 118.712 192.662C118.315 192.689 117.927 192.536 117.645 192.249L69.2246 142.897ZM72.4816 156.218C71.5146 155.232 69.9541 156.082 70.3083 157.428C74.6229 173.83 87.2957 186.747 103.388 191.144C104.709 191.505 105.543 189.915 104.576 188.929L72.4816 156.218ZM257.499 123.568C260.857 123.568 263.578 120.785 263.578 117.351C263.578 113.917 260.857 111.133 257.499 111.133C254.143 111.133 251.422 113.917 251.422 117.351C251.422 120.785 254.143 123.568 257.499 123.568ZM205.438 177.793V111.137H216.24V168.041H245.363V177.793H205.438ZM282.318 150.594V177.793H271.866V130.552H282.186V138.649L282.318 138.56C283.367 136.025 285.058 133.907 287.391 132.207C289.722 130.478 292.696 129.613 296.312 129.613C299.518 129.613 302.433 130.343 305.058 131.805C307.681 133.236 309.78 135.339 311.354 138.112C312.928 140.886 313.716 144.286 313.716 148.312V177.793H303.264V149.789C303.264 146.21 302.331 143.496 300.466 141.647C298.629 139.768 296.166 138.828 293.075 138.828C291.093 138.828 289.285 139.246 287.653 140.081C286.02 140.916 284.723 142.198 283.761 143.928C282.799 145.658 282.318 147.88 282.318 150.594ZM376.952 176.988C379.342 178.032 382.083 178.554 385.173 178.554C387.709 178.554 389.881 178.226 391.688 177.57C393.497 176.884 394.983 175.974 396.149 174.841C397.344 173.707 398.292 172.47 398.992 171.128H399.167V177.793H409.181V145.27C409.181 142.974 408.743 140.871 407.869 138.963C406.995 137.054 405.726 135.399 404.064 133.997C402.432 132.595 400.449 131.521 398.117 130.776C395.785 130 393.161 129.613 390.246 129.613C386.252 129.613 382.797 130.314 379.881 131.715C376.995 133.087 374.736 134.936 373.103 137.263C371.471 139.589 370.581 142.213 370.435 145.136H380.538C380.654 143.764 381.121 142.541 381.937 141.468C382.753 140.394 383.861 139.559 385.261 138.963C386.66 138.336 388.277 138.023 390.115 138.023C391.951 138.023 393.511 138.336 394.794 138.963C396.105 139.589 397.111 140.439 397.811 141.512C398.511 142.586 398.861 143.839 398.861 145.27V145.628C398.861 146.702 398.496 147.492 397.768 147.999C397.067 148.506 395.872 148.879 394.182 149.118C392.519 149.356 390.246 149.639 387.359 149.968C384.998 150.236 382.724 150.639 380.538 151.175C378.351 151.712 376.398 152.503 374.677 153.546C372.987 154.59 371.646 155.977 370.654 157.707C369.663 159.437 369.168 161.659 369.168 164.372C369.168 167.504 369.867 170.129 371.267 172.246C372.666 174.334 374.561 175.914 376.952 176.988ZM393.876 169.07C392.184 169.994 390.1 170.457 387.622 170.457C385.115 170.457 383.117 169.92 381.631 168.846C380.144 167.743 379.4 166.237 379.4 164.328C379.4 162.837 379.808 161.629 380.625 160.704C381.471 159.78 382.578 159.049 383.948 158.512C385.319 157.975 386.805 157.603 388.408 157.394C389.575 157.215 390.712 157.036 391.82 156.857C392.927 156.648 393.963 156.454 394.925 156.275C395.887 156.067 396.703 155.858 397.373 155.649C398.074 155.44 398.584 155.217 398.904 154.978V160.257C398.904 162.106 398.482 163.806 397.636 165.357C396.819 166.878 395.566 168.115 393.876 169.07ZM418.3 177.793V130.552H428.357V138.336H428.489C429.334 135.652 430.66 133.609 432.468 132.207C434.304 130.776 436.71 130.06 439.683 130.06C440.413 130.06 441.069 130.09 441.651 130.15C442.264 130.179 442.774 130.209 443.182 130.239V139.857C442.803 139.798 442.132 139.723 441.171 139.634C440.209 139.544 439.188 139.499 438.109 139.499C436.389 139.499 434.815 139.902 433.386 140.707C431.958 141.512 430.82 142.75 429.975 144.42C429.159 146.061 428.751 148.133 428.751 150.639V177.793H418.3ZM252.252 177.793V130.552H262.704V177.793H252.252ZM331.099 175.691C334.452 177.808 338.432 178.867 343.038 178.867C346.595 178.867 349.83 178.211 352.746 176.899C355.691 175.557 358.139 173.722 360.093 171.396C362.046 169.04 363.314 166.326 363.897 163.254H354.058C353.62 164.656 352.906 165.894 351.915 166.967C350.953 168.011 349.743 168.831 348.286 169.428C346.828 170.024 345.137 170.322 343.213 170.322C340.618 170.322 338.388 169.726 336.522 168.533C334.686 167.34 333.286 165.685 332.324 163.567C331.451 161.618 330.974 159.411 330.893 156.946H364.51V154.083C364.51 150.445 363.984 147.134 362.935 144.152C361.886 141.14 360.399 138.545 358.474 136.368C356.551 134.161 354.233 132.461 351.522 131.268C348.839 130.075 345.851 129.479 342.557 129.479C338.272 129.479 334.482 130.537 331.187 132.655C327.892 134.772 325.313 137.695 323.446 141.423C321.581 145.151 320.648 149.416 320.648 154.217C320.648 158.989 321.552 163.239 323.359 166.967C325.167 170.665 327.747 173.573 331.099 175.691ZM353.096 144.42C352.134 142.392 350.763 140.827 348.985 139.723C347.207 138.62 345.108 138.068 342.688 138.068C340.297 138.068 338.213 138.62 336.434 139.723C334.686 140.827 333.315 142.392 332.324 144.42C331.617 145.889 331.169 147.559 330.982 149.431H354.437C354.25 147.559 353.803 145.889 353.096 144.42Z" fill="#222326"/>
8 | </svg>
9 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/vue-logo.svg:
--------------------------------------------------------------------------------

```
 1 | <svg width="512" height="289" viewBox="0 0 512 289" fill="none" xmlns="http://www.w3.org/2000/svg">
 2 | <style>
 3 | @media (prefers-color-scheme: dark) {
 4 |     path { fill: white; stroke: white; }
 5 | }
 6 | </style>
 7 | <g clip-path="url(#clip0_1066_1580)">
 8 | <path fill-rule="evenodd" clip-rule="evenodd" d="M214 94.5996H230.7L173 194L115 94.5996H136L173 159.699L214 94.5996Z" fill="black"/>
 9 | <path fill-rule="evenodd" clip-rule="evenodd" d="M187.664 95.9648H211L173 155.699L139 95.9648H161.064L174.364 119.065L187.664 95.9648Z" fill="black" stroke="black" stroke-width="2" stroke-miterlimit="10"/>
10 | <path fill-rule="evenodd" clip-rule="evenodd" d="M244.398 114.199C244.398 113.499 244.798 112.899 245.598 112.399C246.398 111.899 247.298 111.699 248.198 111.699C249.398 111.699 250.198 112.199 250.498 113.099L263.498 156.699L276.498 113.099C276.798 112.199 277.598 111.699 278.698 111.699C279.598 111.699 280.498 111.999 281.298 112.499C282.098 112.999 282.498 113.599 282.498 114.299C282.498 114.299 282.498 114.399 282.498 114.499C282.498 114.599 282.498 114.699 282.498 114.799L267.498 163.599C266.998 164.999 265.598 165.699 263.598 165.699C261.498 165.699 260.298 164.999 259.798 163.599L244.598 114.799C244.398 114.499 244.398 114.299 244.398 114.199ZM283.098 151.799V132.699C283.098 132.099 283.398 131.599 283.998 131.199C284.598 130.799 285.298 130.499 286.198 130.499C286.998 130.499 287.698 130.699 288.298 131.199C288.898 131.699 289.198 132.199 289.198 132.699V151.799C289.198 153.999 289.998 155.999 291.698 157.699C293.398 159.399 295.398 160.299 297.698 160.299C299.998 160.299 301.898 159.399 303.598 157.699C305.298 155.999 306.098 153.999 306.098 151.699V132.599C306.098 132.099 306.398 131.599 306.998 131.099C307.598 130.699 308.298 130.399 309.198 130.399C310.098 130.399 310.798 130.599 311.398 130.999C311.998 131.399 312.298 131.899 312.298 132.499V151.599C312.298 155.399 310.898 158.699 307.998 161.499C305.098 164.299 301.698 165.699 297.698 165.699C293.698 165.699 290.298 164.299 287.398 161.499C284.498 158.799 283.098 155.499 283.098 151.799ZM317.298 151.599V143.899C317.298 140.099 318.698 136.899 321.598 134.099C324.498 131.399 327.998 129.999 331.998 129.999C335.798 129.999 339.198 131.299 341.998 133.799C344.798 136.399 346.198 139.599 346.198 143.399C346.198 144.799 345.998 145.999 345.698 146.799C345.398 147.699 344.798 148.299 344.098 148.599C343.398 148.999 342.698 149.199 342.098 149.299C341.498 149.399 340.698 149.399 339.598 149.399H323.398V151.599C323.398 154.299 324.398 156.399 326.298 158.099C328.198 159.699 330.798 160.499 333.898 160.499C335.498 160.499 336.898 160.299 338.198 159.799C339.398 159.299 340.398 158.799 341.098 158.399C341.798 157.899 342.398 157.699 342.898 157.699C343.598 157.699 344.198 157.999 344.698 158.599C345.198 159.199 345.398 159.799 345.398 160.499C345.398 161.599 344.298 162.799 341.998 163.899C339.798 165.099 336.998 165.699 333.698 165.699C328.898 165.699 324.898 164.399 321.898 161.799C318.798 159.299 317.298 155.899 317.298 151.599ZM323.498 145.499H337.198C338.498 145.499 339.298 145.299 339.798 144.999C340.198 144.699 340.498 144.099 340.498 143.099C340.498 140.899 339.698 138.999 338.098 137.299C336.498 135.599 334.498 134.799 332.098 134.799C329.798 134.799 327.798 135.599 326.098 137.099C324.398 138.599 323.598 140.499 323.598 142.799L323.498 145.499ZM349.398 161.899C349.398 160.799 349.798 159.899 350.498 159.199C351.198 158.399 352.198 158.099 353.198 158.099C354.198 158.099 355.098 158.499 355.898 159.199C356.598 159.999 356.998 160.899 356.998 161.899C356.998 162.899 356.598 163.799 355.898 164.599C355.198 165.399 354.298 165.699 353.198 165.699C352.098 165.699 351.198 165.299 350.498 164.599C349.698 163.799 349.398 162.899 349.398 161.899ZM354.798 179.399C354.798 178.599 354.998 177.999 355.498 177.499C355.998 176.999 356.598 176.699 357.298 176.699C359.198 176.699 360.498 175.999 361.098 174.599C361.698 173.199 361.998 171.099 361.998 168.199V132.599C361.998 131.999 362.298 131.499 362.898 131.099C363.498 130.699 364.198 130.499 365.098 130.499C365.998 130.499 366.698 130.699 367.298 131.099C367.898 131.499 368.198 131.999 368.198 132.599V168.199C368.198 172.499 367.398 175.799 365.698 178.299C363.998 180.799 361.498 181.999 358.098 181.999C355.898 181.999 354.798 181.199 354.798 179.399ZM361.198 117.399C361.198 116.499 361.598 115.699 362.298 114.999C362.998 114.299 363.998 113.999 364.998 113.999C365.998 113.999 366.898 114.299 367.698 114.999C368.398 115.699 368.798 116.499 368.798 117.399C368.798 118.299 368.398 119.099 367.698 119.899C366.998 120.599 366.098 120.999 364.998 120.999C363.898 120.999 363.098 120.599 362.298 119.899C361.598 119.199 361.198 118.399 361.198 117.399ZM372.698 160.299C372.698 159.699 372.898 158.999 373.298 158.399C373.698 157.799 374.198 157.499 374.798 157.499C375.198 157.499 375.798 157.799 376.498 158.399C377.198 158.999 378.298 159.599 379.698 160.099C381.098 160.699 382.698 160.899 384.598 160.899C387.098 160.899 388.898 160.499 389.998 159.599C391.098 158.699 391.698 157.599 391.698 156.299C391.698 154.699 391.098 153.399 389.798 152.499C388.598 151.499 387.098 150.799 385.298 150.299C383.498 149.799 381.698 149.299 379.998 148.699C378.198 148.099 376.698 147.099 375.498 145.799C374.298 144.399 373.598 142.599 373.598 140.399C373.598 137.599 374.598 135.199 376.598 133.199C378.598 131.199 381.598 130.199 385.698 130.199C388.298 130.199 390.698 130.599 392.898 131.399C395.098 132.199 396.198 133.099 396.198 134.099C396.198 134.699 395.998 135.299 395.498 136.099C394.998 136.799 394.498 137.199 393.798 137.199C393.598 137.199 392.698 136.799 390.998 136.099C389.298 135.399 387.598 134.999 385.898 134.999C383.598 134.999 381.898 135.499 380.798 136.599C379.698 137.699 379.098 138.799 379.098 140.199C379.098 141.599 379.698 142.599 380.998 143.399C382.198 144.199 383.798 144.799 385.598 145.199C387.398 145.599 389.198 146.199 390.998 146.799C392.798 147.399 394.298 148.499 395.498 150.099C396.698 151.599 397.398 153.599 397.398 156.099C397.398 159.099 396.298 161.499 394.098 163.299C391.898 165.099 388.898 165.899 384.998 165.899C381.598 165.899 378.798 165.299 376.398 164.099C373.898 162.799 372.698 161.599 372.698 160.299Z" fill="black"/>
11 | </g>
12 | <defs>
13 | <clipPath id="clip0_1066_1580">
14 | <rect width="282" height="99" fill="black" transform="translate(115 95)"/>
15 | </clipPath>
16 | </defs>
17 | </svg>
18 | 
```

--------------------------------------------------------------------------------
/product-handbook/feature-rollouts/feature-targeting-rules.md:
--------------------------------------------------------------------------------

```markdown
  1 | ---
  2 | description: Learn more about access rules in Reflag
  3 | ---
  4 | 
  5 | # Access rules
  6 | 
  7 | ## What are access rules?
  8 | 
  9 | Feature access lets you conditionally enable features for a company or a user.
 10 | 
 11 | Using conditions based on company and user attributes, you can target specific groups of users and conditionally enable a feature for them.
 12 | 
 13 | By using rollout percentages you can roll the feature out to only a certain percentage of companies in the group.
 14 | 
 15 | You'll find the feature access configuration under the `Access` tab in each feature.
 16 | 
 17 | ## Getting started <a href="#get-started" id="get-started"></a>
 18 | 
 19 | * Create your [feature](https://app.reflag.com/)
 20 | * Select the `Access` tab
 21 | 
 22 | ## Access rules
 23 | 
 24 | Reflag's access UI has been designed to cover the most common use cases in B2B companies.
 25 | 
 26 | The default access criteria are:
 27 | 
 28 | * Company segments
 29 | * Companies
 30 | * Users
 31 | 
 32 | The default access criteria let you add segments, companies, and users without additional configuration.
 33 | 
 34 | <figure><img src="../../.gitbook/assets/Access.png" alt=""><figcaption></figcaption></figure>
 35 | 
 36 | ## Advanced access rules
 37 | 
 38 | You can also create advanced access rules with the "+ Add Rule" button.
 39 | 
 40 | Advanced rules let you specify rollout percentages and create access rules using company attributes, user attributes, feature access, or other contexts.
 41 | 
 42 | ### Conditions
 43 | 
 44 | Each access rule has a set of conditions. You can create as many rules with as many conditions as you’d like.
 45 | 
 46 | There are 5 types of conditions:
 47 | 
 48 | * `Company attribute`
 49 |   * `Company ID`
 50 |   * `Company name`
 51 |   * `Any user-defined custom attributes`
 52 | * `User attribute`
 53 |   * `User ID`
 54 |   * `Email`
 55 |   * `Any user-defined custom attributes`
 56 | * `Segment`
 57 |   * Existing segments created in the [Companies](../creating-segments.md) tab that don’t use `First seen`, `Last seen`, or `Feature metrics` filters.
 58 |   * You can include or exclude companies that are part of a segment.
 59 | * `Feature access`
 60 |   * Re-use access rules from another feature. You can choose to include or exclude companies that have access to another feature.
 61 | * `Other context`
 62 |   * Set access rules based on custom data that does not belong to a company or user but rather a specific situation that a company or user is in, like an `eventID`.
 63 |   * Example:
 64 |     * You can supply `eventID` in the other context. Then, you create a context rule that only enables a feature when your users are in the context of a specific event with the given event ID.
 65 | 
 66 | ### Examples
 67 | 
 68 | Here are examples of access conditions:
 69 | 
 70 | * Companies with Company IDs 1 and 2: `Company attribute: Company ID IS ANY OF [1,2]`
 71 | * Give access to newly created companies: `Company attribute: createdAt LESS THAN [30] DAYS AGO`
 72 | * Give access to users with the manager role at all companies: `User attribute: role IS [manager]`
 73 | * Give access to companies in the Pro plan segment: `Segment: In segment ['Pro']`
 74 | * Give access to companies in the Beta users’ segment: `Segment: In segment ['Beta users']`
 75 | * Give access to companies who already have access to the Huddle feature: `Feature access: Feature [Huddle] is enabled`
 76 | * Enable feature for a single company but only when managing a particular event: `Company attribute: Company ID IS [42] AND Other context: eventID IS [641]`
 77 | 
 78 | <figure><img src="../../.gitbook/assets/Screenshot 2025-09-12 at 13.21.25.png" alt="Reflag feature flag targeting rules"><figcaption><p>There are 5 different types of conditions to chose from</p></figcaption></figure>
 79 | 
 80 | ## Setting multiple access rules <a href="#setting-multiple-targeting-rules" id="setting-multiple-targeting-rules"></a>
 81 | 
 82 | You can create as many access rules as you like. Rules are made up of individual conditions.
 83 | 
 84 | Companies will get access to your feature if they meet the criteria of any of the access rules. For a rule to match, they must meet all the conditions of that rule. In other words, there’s an `OR` between the rules and an `AND` between the conditions.
 85 | 
 86 | ### Example
 87 | 
 88 | We’ve added two rules. The first rule has two conditions while the second rule has a single condition.
 89 | 
 90 | If _**any**_ rules match, the feature will be enabled for a given company or user. A rule matches if _**all**_ conditions within it match.
 91 | 
 92 | Another way to say this is that there’s an `OR` between the rules and an `AND` between the conditions.
 93 | 
 94 | The rules you create will be different between [environments](feature-targeting-rules.md#environments).
 95 | 
 96 | <figure><img src="../../.gitbook/assets/Screenshot 2025-09-12 at 13.25.21.png" alt="An example targeting configuration with two rules."><figcaption><p>An example access configuration with two rules. In the first rule there are two conditions and one condition in the second rule. If any of the rules match and if all the conditions in a given rules match, the company/user will have access.</p></figcaption></figure>
 97 | 
 98 | ## Specify rollout percentage
 99 | 
100 | Select a rollout percentage (default value: 100%) to give access to a percentage of companies that match the access rules.
101 | 
102 | Specifying 0% will not enable the feature flag for anyone.
103 | 
104 | ### **Rollout percentages**
105 | 
106 | Rollout percentages are stable. If the initial rollout percentage is 1% and you roll it out to 100% before rolling it back to 1%, the companies found in the 1% rollout will be the same.
107 | 
108 | However, companies within the rollout percentages aren’t consistent across features. The companies found in a 1% rollout percentage may be different for different features. To roll out two features to the same set of companies, use the `Feature access` condition.
109 | 
110 | **Example**
111 | 
112 | You have rolled out `Feature A` and `Feature B` to 10% of the `Beta User` segment.
113 | 
114 | The set of companies within the `Beta User` segment with access to `Feature A` and `Feature B` will not be the same.
115 | 
116 | ## Environments
117 | 
118 | You can switch between environments by clicking the environments in the left sidebar.
119 | 
120 | ## Rolling back feature access changes
121 | 
122 | See previous access rules and roll back to past rules by reviewing the `Targeting timeline` underneath.
123 | 
124 | Find past versions and click the `Rollback button` to reimplement previous access rules.
125 | 
126 | Access rules that use segment rules are linked to the current version of the segment even if you roll back to a previous version of the access rules.
127 | 
128 | ### **Example**
129 | 
130 | The `Beta customers` segment contains 40 companies. Version #1 of the Huddles gives access to 25% of companies in the `Beta customers` segment (10 companies) on January 1st.
131 | 
132 | On January 15th, you add 20 more companies to the `Beta customers` segment (60 companies).
133 | 
134 | On January 20th, Version #2 of the Huddles feature gives 50% of companies in the `Beta customers` segment (30 companies) access.
135 | 
136 | The next day, you roll it back to Version #1. Since the `Beta customers` segment now contains 60 companies, the feature will be available to 15 companies rather than 10 companies.
137 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/posthog.svg:
--------------------------------------------------------------------------------

```
 1 | <svg width="512" height="289" viewBox="0 0 512 289" fill="none" xmlns="http://www.w3.org/2000/svg">
 2 | <style>
 3 | @media (prefers-color-scheme: dark) {
 4 |     path { fill: white; }
 5 | }
 6 | </style>
 7 | <path d="M97.8208 146.418C96.9606 148.153 94.5059 148.153 93.6457 146.418L91.5885 142.27C91.4265 141.943 91.3421 141.583 91.3421 141.217C91.3421 140.852 91.4265 140.492 91.5885 140.165L93.6457 136.016C94.5059 134.281 96.9606 134.281 97.8208 136.016L99.878 140.165C100.04 140.492 100.124 140.852 100.124 141.217C100.124 141.583 100.04 141.943 99.878 142.27L97.8208 146.418ZM97.8208 169.948C96.9606 171.683 94.5059 171.683 93.6457 169.948L91.5885 165.799C91.4265 165.472 91.3421 165.112 91.3421 164.747C91.3421 164.381 91.4265 164.021 91.5885 163.694L93.6457 159.545C94.5059 157.81 96.9606 157.81 97.8208 159.545L99.878 163.694C100.04 164.021 100.124 164.381 100.124 164.747C100.124 165.112 100.04 165.472 99.878 165.799L97.8208 169.948Z" fill="#1D4AFF"/>
 8 | <path d="M72.4 161.017C72.4 158.92 74.914 157.869 76.3841 159.352L87.0821 170.14C88.5527 171.623 87.5112 174.158 85.432 174.158H74.734C74.1152 174.158 73.5217 173.91 73.084 173.469C72.6463 173.028 72.4003 172.429 72.4 171.805V161.017ZM72.4 149.654C72.4 150.279 72.646 150.877 73.0839 151.318L95.0498 173.469C95.4875 173.91 96.081 174.158 96.6999 174.158H108.765C110.844 174.158 111.886 171.623 110.415 170.14L76.3846 135.823C74.914 134.341 72.4 135.391 72.4 137.487V149.654V149.654ZM72.4 126.125C72.4 126.749 72.646 127.348 73.0839 127.789L118.383 173.469C118.82 173.91 119.414 174.158 120.033 174.158H132.098C134.177 174.158 135.219 171.623 133.749 170.14L76.3846 112.294C74.914 110.811 72.4 111.861 72.4 113.958V126.125ZM95.7333 126.125C95.7333 126.749 95.9793 127.348 96.4172 127.789L138.416 170.14C139.886 171.623 142.4 170.573 142.4 168.476V156.31C142.4 155.685 142.154 155.087 141.716 154.645L99.7174 112.294C98.2472 110.811 95.7333 111.861 95.7333 113.958V126.125ZM123.051 112.294C121.58 110.811 119.067 111.861 119.067 113.958V126.125C119.067 126.749 119.313 127.348 119.75 127.789L138.415 146.611C139.886 148.094 142.399 147.044 142.399 144.946V132.78C142.399 132.156 142.154 131.557 141.716 131.116L123.051 112.294Z" fill="#F9BD2B"/>
 9 | <path d="M171.654 161.305L149.685 139.152C148.214 137.669 145.7 138.719 145.7 140.816V171.805C145.7 172.429 145.946 173.028 146.384 173.469C146.821 173.91 147.415 174.158 148.034 174.158H182.065C182.684 174.158 183.278 173.91 183.716 173.469C184.153 173.028 184.399 172.429 184.399 171.805V168.983C184.399 167.683 183.35 166.644 182.072 166.477C178.129 165.959 174.466 164.141 171.654 161.305H171.654ZM156.9 166.629C155.91 166.629 154.96 166.232 154.26 165.526C153.56 164.82 153.167 163.863 153.167 162.864C153.167 161.866 153.56 160.909 154.26 160.203C154.96 159.497 155.91 159.1 156.9 159.099C157.89 159.1 158.839 159.496 159.539 160.202C160.239 160.908 160.633 161.866 160.633 162.864C160.633 163.863 160.239 164.82 159.539 165.526C158.839 166.232 157.89 166.629 156.9 166.629Z" fill="black"/>
10 | <path d="M72.4 171.805C72.4 172.429 72.6459 173.028 73.0836 173.469C73.5214 173.91 74.115 174.158 74.734 174.158H85.432C87.5112 174.158 88.5527 171.623 87.0821 170.14L76.3846 159.352C74.914 157.87 72.4 158.92 72.4 161.017V171.805ZM95.7333 131.806L76.3841 112.294C74.914 110.811 72.4 111.861 72.4 113.958V126.125C72.4 126.749 72.646 127.348 73.0839 127.789L95.7333 150.629V131.806ZM76.3841 135.823C74.914 134.341 72.4 135.391 72.4 137.488V149.654C72.4 150.278 72.646 150.877 73.0839 151.318L95.7333 174.158V155.335L76.3841 135.823Z" fill="#1D4AFF"/>
11 | <path d="M119.067 132.78C119.067 132.471 119.006 132.165 118.889 131.88C118.771 131.594 118.599 131.334 118.383 131.116L99.7179 112.294C98.2472 110.811 95.7333 111.862 95.7333 113.958V126.125C95.7333 126.749 95.9793 127.348 96.4172 127.789L119.067 150.629V132.78ZM95.7333 174.158H108.765C110.844 174.158 111.886 171.623 110.415 170.14L95.7333 155.335V174.158ZM95.7333 131.806V149.654C95.7333 150.278 95.9793 150.877 96.4172 151.318L119.067 174.158V156.31C119.067 156.001 119.006 155.694 118.889 155.409C118.771 155.123 118.599 154.864 118.383 154.645L95.7333 131.806Z" fill="#F54E00"/>
12 | <path d="M211.624 164.764H221.211V148.73H229.222C238.021 148.73 243.665 143.468 243.665 135.329C243.665 127.19 238.021 121.927 229.222 121.927H211.624V164.763V164.764ZM221.211 140.469V130.188H228.251C231.892 130.188 234.077 132.146 234.077 135.328C234.077 138.511 231.892 140.469 228.251 140.469H221.211V140.469ZM261.011 165.253C270.357 165.253 277.153 158.522 277.153 149.342C277.153 140.163 270.357 133.432 261.011 133.432C251.544 133.432 244.869 140.163 244.869 149.342C244.869 158.522 251.544 165.253 261.011 165.253ZM253.729 149.342C253.729 144.447 256.642 141.081 261.011 141.081C265.319 141.081 268.233 144.447 268.233 149.342C268.233 154.238 265.319 157.604 261.011 157.604C256.642 157.604 253.729 154.238 253.729 149.342ZM292.497 165.253C299.658 165.253 304.513 160.724 304.513 155.401C304.513 142.917 288.067 146.956 288.067 142.06C288.067 140.714 289.462 139.857 291.466 139.857C293.529 139.857 296.017 141.142 296.806 143.957L303.966 140.959C302.571 136.492 297.412 133.432 291.162 133.432C284.426 133.432 280.239 137.47 280.239 142.305C280.239 153.993 296.442 150.75 296.442 155.584C296.442 157.298 294.864 158.461 292.497 158.461C289.099 158.461 286.732 156.074 286.004 153.198L278.843 156.013C280.421 160.663 285.033 165.253 292.497 165.253ZM327.578 164.458L326.972 156.686C325.94 157.237 324.605 157.42 323.513 157.42C321.328 157.42 319.872 155.829 319.872 153.075V141.387H327.275V133.921H319.872V124.987H310.951V133.921H306.096V141.387H310.951V154.238C310.951 161.704 315.988 165.253 322.602 165.253C324.423 165.253 326.122 164.948 327.579 164.458H327.578ZM358.682 121.927V138.572H341.811V121.928H332.223V164.763H341.811V146.834H358.682V164.763H368.331V121.927H358.682ZM389.612 165.253C398.957 165.253 405.754 158.522 405.754 149.342C405.754 140.163 398.958 133.432 389.612 133.432C380.145 133.432 373.47 140.163 373.47 149.342C373.47 158.522 380.145 165.253 389.612 165.253ZM382.331 149.342C382.331 144.447 385.243 141.081 389.613 141.081C393.921 141.081 396.834 144.447 396.834 149.342C396.834 154.238 393.921 157.604 389.613 157.604C385.243 157.604 382.331 154.238 382.331 149.342ZM422.973 163.784C426.311 163.784 429.284 162.622 430.862 160.602V163.54C430.862 166.967 428.131 169.353 423.944 169.353C420.97 169.353 418.361 167.884 417.936 165.375L409.804 166.661C410.897 172.474 416.783 176.391 423.944 176.391C433.35 176.391 439.6 170.822 439.6 162.561V133.921H430.801V136.553C429.163 134.656 426.371 133.432 422.791 133.432C414.295 133.432 408.955 139.307 408.955 148.608C408.955 157.91 414.295 163.784 422.973 163.784ZM417.632 148.608C417.632 144.019 420.302 141.081 424.429 141.081C428.616 141.081 431.286 144.019 431.286 148.608C431.286 153.198 428.616 156.135 424.429 156.135C420.302 156.135 417.632 153.198 417.632 148.608Z" fill="black"/>
13 | </svg>
14 | 
```

--------------------------------------------------------------------------------
/product-handbook/remote-config.md:
--------------------------------------------------------------------------------

```markdown
  1 | ---
  2 | description: Learn more about remote config in Reflag
  3 | ---
  4 | 
  5 | # Remote config
  6 | 
  7 | ## What is remote config?
  8 | 
  9 | Remote config serves as a dynamic and flexible approach to configuring your features in relation to the targeted audience. A feature's remote config consists of a set of **config values**. Each config value is a **key** — **payload** pair where the keys are unique and the values are JSON values. Both are supplied by you.
 10 | 
 11 | Config values have **environment-specific targeting rules** used by Reflag to match them against your users and companies.
 12 | 
 13 | The use of remote config reduces the need for constant code changes, facilitating seamless adjustments to application settings. This capability not only streamlines operational processes but also enhances responsiveness by allowing you to test and modify features on-the-fly.
 14 | 
 15 | This is what remote config looks like in React:
 16 | 
 17 | {% code fullWidth="false" %}
 18 | ```tsx
 19 | function AISummarizerRemotelyConfigured({copy}: {copy: string}) {
 20 |   const { config: { payload } } = useFlag('my-ai-feature');
 21 | 
 22 |   return <AISummarizer model={payload.model} provider={payload.provider} />
 23 | }
 24 | ```
 25 | {% endcode %}
 26 | 
 27 | {% hint style="info" %}
 28 | Remote config is works independently from [access rules](feature-rollouts/feature-targeting-rules.md). In other words, remote config isn't affect by whether the user has access to the feature or not.
 29 | {% endhint %}
 30 | 
 31 | ## Config values
 32 | 
 33 | Config values, as noted above, consist of:
 34 | 
 35 | * A mandatory unique string **key**, supplied by you. They key is unique per feature. If you just need a string configuration, you can use the key by itself.
 36 | * An optional JSON **payload**, that can be any valid JSON value: `null`, `string`, `number`, `array` or `object`
 37 | * Targeting rules which are environment-specific, allowing you to target different config values to different users/companies in different environments
 38 | * Default setting, which tells Reflag which config value to use as fallback if no targeting set matches the given user/company context
 39 | 
 40 | {% hint style="danger" %}
 41 | Do not store sensitive data in the key or the payload of the config value even if the feature is marked as **secret.**
 42 | 
 43 | Sensitive data, like API keys or passwords should be managed with proper care outside of Reflag
 44 | {% endhint %}
 45 | 
 46 | The config values are shared across all environments. Any new value that you add in one environment, will automatically be added to other environments but without any targeting rules, effectively making it disabled.
 47 | 
 48 | <figure><img src="../.gitbook/assets/Screenshot 2025-09-12 at 14.29.56.png" alt=""><figcaption><p>Remote config with three values in the Production environment</p></figcaption></figure>
 49 | 
 50 | In the image above, a feature is set up to have three config values. This is an example of configuring  LLM settings for an AI feature. The "gpt-4o" value is the default and served with all requests that do not match any other, more specific values. The "claude-3-7-sonnet" value will be served to users in "Apex" and "Blaze" companies while the "gpt-5" value will be served to the "Adrian Borer" user as well as the "Logix" and "Hightrix" companies.
 51 | 
 52 | {% hint style="info" %}
 53 | We recommend that you chose simple text values for config value keys. Try to avoid using spaces or any special characters if you don't intend to use the key as display text in your application.
 54 | {% endhint %}
 55 | 
 56 | ## Matching algorithm&#x20;
 57 | 
 58 | * Users, companies and segments can appear only once in the targeting rules for each environment. This means that you cannot configure two distinct config values in the same environment to target the same entity explicitly
 59 | * Matches are not evaluated in the order of their appearance, but in order of their **specificity**:
 60 |   * Directly specified users match first
 61 |   * Then, directly specified companies match
 62 |   * Then, going top to bottom in order of appearance of the config values, segments specified are matched against the company
 63 |   * Finally, if no rule is matched, the default one is used
 64 | * **`Other context`** is  not taken into account when evaluating config value targeting rules
 65 | * _Percentage rollout_ is not supported for Remote config
 66 | 
 67 | ## Usage scenarios
 68 | 
 69 | In addition to the AI model configuration example above, this section shows some other scenarios that can be solved by using remote config.
 70 | 
 71 | ### Basic feature configuration
 72 | 
 73 | Sometimes it is useful to simply store some feature-specific config that can be used by your application. This is true even if you do not plan to have different config values targeted to different users. You can create a single config value (which is always going to be set as **default**) and set its payload to any JSON object. In such cases, the key is not actually useful and can be set to any value you chose.
 74 | 
 75 | On the application side, you can check if the user has access to the feature, and in that case, use the accompanying config to suit your needs.
 76 | 
 77 | {% hint style="info" %}
 78 | Since the config values are evaluated independently from the access, your application can still use the remote config even if the feature is disabled for the user. For example, this could be used to keep information in the payload that can explain to the user why the feature is not available, or offer alternatives, etc.
 79 | {% endhint %}
 80 | 
 81 | ### Multi-variate feature flags
 82 | 
 83 | The **multi-variate feature flag** is the classical example that is directly enabled by the use of remote feature config in your application. To create a multi-variate feature flag follow these simple steps:
 84 | 
 85 | 1. Create feature, and define it's access rules, if any,
 86 | 2. Create the "_variants_" by using config values. Each config value has its key representing the variant name.
 87 | 3. Adjust the targeting rules on each config value according to your needs,
 88 | 4. Payloads can be be ignored if additional configuration is not required for each variant.
 89 | 
 90 | ### Entitlements
 91 | 
 92 | Remote config is a great tool when used to support [entitlements scenarios](feature-entitlements/). For each feature you create, you can add config values targeting different **companies** or **company segments** with different values. Each config value can then define the restrictions on the feature use.
 93 | 
 94 | <figure><img src="../.gitbook/assets/image (5).png" alt=""><figcaption><p>Example of AI model variations by subscription tier</p></figcaption></figure>
 95 | 
 96 | The image above exemplifies a feature called "_AI Transcripts_" which serves four different categories of customers: "_Not customers_", "_Beta_", "Business Plan", and "_Enterprise Plan_". Each category is entitled to different feature tier.
 97 | 
 98 | ## Start using remote config
 99 | 
100 | First, [create your first flag](https://app.reflag.com/), if you haven't yet. Then, open your flag and click on the "_Remote config_" tab at the top.
101 | 
102 | <figure><img src="../.gitbook/assets/Screenshot 2025-09-12 at 14.37.52.png" alt=""><figcaption><p>Click "Create config value" to start</p></figcaption></figure>
103 | 
104 | Once you have set up your feature and config values, don't forget to configure the targeting rules in other environments as well.
105 | 
106 | Finally, use [any of our SDKs](../supported-languages/overview.md) to access the feature and its config in your application.
107 | 
```

--------------------------------------------------------------------------------
/.gitbook/assets/ts-js.svg:
--------------------------------------------------------------------------------

```
 1 | <svg width="512" height="290" viewBox="0 0 512 290" fill="none" xmlns="http://www.w3.org/2000/svg">
 2 | <style>
 3 | @media (prefers-color-scheme: dark) {
 4 |     path { fill: white; }
 5 |     .text { display: none }
 6 | }
 7 | </style>
 8 | <path fill-rule="evenodd" clip-rule="evenodd" d="M126 105C126 97.8203 131.82 92 139 92H218C225.18 92 231 97.8203 231 105V184C231 191.18 225.18 197 218 197H139C131.82 197 126 191.18 126 184V105ZM211.959 156.653C211.795 154.999 211.091 153.714 209.846 152.798C208.602 151.882 206.914 151.424 204.781 151.424C203.332 151.424 202.108 151.629 201.11 152.039C200.112 152.436 199.346 152.989 198.813 153.7C198.294 154.411 198.034 155.218 198.034 156.12C198.007 156.872 198.164 157.528 198.506 158.089C198.861 158.649 199.346 159.135 199.962 159.545C200.577 159.941 201.288 160.29 202.094 160.591C202.901 160.878 203.762 161.124 204.678 161.329L208.452 162.231C210.284 162.642 211.966 163.188 213.497 163.872C215.028 164.556 216.354 165.396 217.475 166.395C218.596 167.393 219.465 168.568 220.08 169.922C220.709 171.275 221.03 172.827 221.044 174.577C221.03 177.147 220.374 179.376 219.075 181.263C217.79 183.136 215.93 184.592 213.497 185.631C211.077 186.656 208.158 187.169 204.74 187.169C201.349 187.169 198.396 186.649 195.881 185.61C193.379 184.571 191.424 183.033 190.015 180.996C188.621 178.945 187.889 176.409 187.821 173.388H196.414C196.51 174.796 196.913 175.972 197.624 176.915C198.348 177.845 199.312 178.549 200.515 179.027C201.732 179.492 203.106 179.725 204.637 179.725C206.141 179.725 207.447 179.506 208.554 179.068C209.676 178.631 210.544 178.022 211.159 177.243C211.774 176.464 212.082 175.568 212.082 174.557C212.082 173.613 211.802 172.82 211.241 172.178C210.694 171.535 209.887 170.988 208.821 170.537C207.768 170.086 206.476 169.676 204.945 169.307L200.372 168.158C196.831 167.297 194.035 165.95 191.984 164.118C189.933 162.286 188.915 159.818 188.928 156.715C188.915 154.172 189.592 151.95 190.959 150.05C192.34 148.149 194.233 146.666 196.639 145.6C199.046 144.533 201.78 144 204.843 144C207.96 144 210.68 144.533 213.005 145.6C215.343 146.666 217.161 148.149 218.46 150.05C219.759 151.95 220.428 154.151 220.469 156.653H211.959ZM149 144.574V151.896H161.858V186.574H170.636V151.896H183.494V144.574H149Z" fill="#3178C6"/>
 9 | <path fill-rule="evenodd" clip-rule="evenodd" d="M269 105C269 97.8203 274.82 92 282 92H361C368.18 92 374 97.8203 374 105V184C374 191.18 368.18 197 361 197H282C274.82 197 269 191.18 269 184V105ZM355.017 156.653C354.853 154.999 354.148 153.714 352.904 152.798C351.66 151.882 349.972 151.424 347.839 151.424C346.39 151.424 345.166 151.629 344.168 152.039C343.17 152.436 342.404 152.989 341.871 153.7C341.352 154.411 341.092 155.218 341.092 156.12C341.064 156.872 341.222 157.528 341.563 158.089C341.919 158.649 342.404 159.135 343.02 159.545C343.635 159.941 344.346 160.29 345.152 160.591C345.959 160.878 346.82 161.124 347.736 161.329L351.51 162.231C353.342 162.642 355.023 163.188 356.555 163.872C358.086 164.556 359.412 165.396 360.533 166.395C361.654 167.393 362.522 168.568 363.138 169.922C363.767 171.275 364.088 172.827 364.102 174.577C364.088 177.147 363.432 179.376 362.133 181.263C360.848 183.136 358.988 184.592 356.555 185.631C354.135 186.656 351.216 187.169 347.798 187.169C344.407 187.169 341.454 186.649 338.938 185.61C336.437 184.571 334.481 183.033 333.073 180.996C331.679 178.945 330.947 176.409 330.879 173.388H339.472C339.567 174.796 339.971 175.972 340.682 176.915C341.406 177.845 342.37 178.549 343.573 179.027C344.79 179.492 346.164 179.725 347.695 179.725C349.199 179.725 350.505 179.506 351.612 179.068C352.733 178.631 353.602 178.022 354.217 177.243C354.832 176.464 355.14 175.568 355.14 174.557C355.14 173.613 354.859 172.82 354.299 172.178C353.752 171.535 352.945 170.988 351.879 170.537C350.826 170.086 349.534 169.676 348.003 169.307L343.43 168.158C339.889 167.297 337.093 165.95 335.042 164.118C332.991 162.286 331.973 159.818 331.986 156.715C331.973 154.172 332.649 151.95 334.017 150.05C335.397 148.149 337.291 146.666 339.697 145.6C342.104 144.533 344.838 144 347.9 144C351.018 144 353.738 144.533 356.062 145.6C358.4 146.666 360.219 148.149 361.518 150.05C362.816 151.95 363.486 154.151 363.527 156.653H355.017ZM324.891 144.574H316.114V173.859C316.114 175.199 315.915 176.327 315.519 177.243C315.122 178.159 314.541 178.856 313.776 179.335C313.024 179.8 312.101 180.032 311.007 180.032C309.968 180.032 309.066 179.827 308.3 179.417C307.548 178.993 306.953 178.392 306.516 177.612C306.092 176.819 305.866 175.869 305.839 174.762H297C296.987 177.551 297.581 179.868 298.784 181.714C299.988 183.546 301.615 184.913 303.665 185.815C305.73 186.704 308.027 187.148 310.556 187.148C313.4 187.148 315.895 186.608 318.041 185.528C320.188 184.448 321.863 182.91 323.066 180.914C324.282 178.918 324.891 176.566 324.891 173.859V144.574Z" fill="#FFDF00"/>
10 | <path class="text" d="M355.017 156.653C354.853 154.999 354.148 153.714 352.904 152.798C351.66 151.882 349.972 151.424 347.839 151.424C346.39 151.424 345.166 151.629 344.168 152.039C343.17 152.436 342.404 152.989 341.871 153.7C341.352 154.411 341.092 155.218 341.092 156.12C341.064 156.872 341.222 157.528 341.563 158.089C341.919 158.649 342.404 159.135 343.02 159.545C343.635 159.941 344.346 160.29 345.152 160.591C345.959 160.878 346.82 161.124 347.736 161.329L351.51 162.231C353.342 162.642 355.023 163.188 356.555 163.872C358.086 164.556 359.412 165.396 360.533 166.395C361.654 167.393 362.522 168.568 363.138 169.922C363.767 171.275 364.088 172.827 364.102 174.577C364.088 177.147 363.432 179.376 362.133 181.263C360.848 183.136 358.988 184.592 356.555 185.631C354.135 186.656 351.216 187.169 347.798 187.169C344.407 187.169 341.454 186.649 338.938 185.61C336.437 184.571 334.481 183.033 333.073 180.996C331.679 178.945 330.947 176.409 330.879 173.388H339.472C339.567 174.796 339.971 175.972 340.682 176.915C341.406 177.845 342.37 178.549 343.573 179.027C344.79 179.492 346.164 179.725 347.695 179.725C349.199 179.725 350.505 179.506 351.612 179.068C352.733 178.631 353.602 178.022 354.217 177.243C354.832 176.464 355.14 175.568 355.14 174.557C355.14 173.613 354.859 172.82 354.299 172.178C353.752 171.535 352.945 170.988 351.879 170.537C350.826 170.086 349.534 169.676 348.003 169.307L343.43 168.158C339.889 167.297 337.093 165.95 335.042 164.118C332.991 162.286 331.973 159.818 331.986 156.715C331.973 154.172 332.649 151.95 334.017 150.05C335.397 148.149 337.291 146.666 339.697 145.6C342.104 144.533 344.838 144 347.9 144C351.018 144 353.738 144.533 356.062 145.6C358.4 146.666 360.219 148.149 361.518 150.05C362.816 151.95 363.486 154.151 363.527 156.653H355.017Z" fill="black"/>
11 | <path class="text" d="M316.114 144.574H324.891V173.859C324.891 176.566 324.282 178.918 323.066 180.914C321.863 182.91 320.188 184.448 318.041 185.528C315.895 186.608 313.4 187.148 310.556 187.148C308.027 187.148 305.73 186.704 303.665 185.815C301.614 184.913 299.988 183.546 298.784 181.714C297.581 179.868 296.987 177.551 297 174.762H305.839C305.866 175.869 306.092 176.819 306.516 177.612C306.953 178.392 307.548 178.993 308.3 179.417C309.066 179.827 309.968 180.032 311.007 180.032C312.101 180.032 313.024 179.8 313.776 179.335C314.541 178.856 315.122 178.159 315.519 177.243C315.915 176.327 316.114 175.199 316.114 173.859V144.574Z" fill="black"/>
12 | </svg>
13 | 
```

