---
name: bijection-launchdarkly
description: "Evaluate and integrate the Launchdarkly component with Bijection."
---

# Launchdarkly

Synchronized feature flags

- Package: @bijectionhq/launchdarkly
- Category: Integrations
- Status: Preview
- License: Apache-2.0
- Bijection source (repository access required): https://github.com/bijectionhq/launchdarkly/tree/4fcc5c6f124bfeb9352852c336d736c6fe4d5ed5
- Upstream: https://github.com/convex/launchdarkly/tree/7d83a067ea0fd148bbd7fdaaee67fd350150612c
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/launchdarkly

## Get the source

Bijection repository access is required. Request access at https://bijection.com/contact.

```sh
git clone https://github.com/bijectionhq/launchdarkly.git
cd launchdarkly
git checkout 4fcc5c6f124bfeb9352852c336d736c6fe4d5ed5
```

## Before using this component

Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This is a source candidate for evaluation. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.

## Integration workflow

1. Read the source README and package manifest at the recorded revision.
2. Confirm the required SDK, dependency availability, and runtime compatibility.
3. Follow the component's documented setup and configuration. Never invent an npm install command from a catalog package name.
4. Keep credentials in the project's existing secret store.
5. Follow the project's execution rules for verification and report what was actually checked.

## Original upstream skill

The following guidance describes @convex-dev/launchdarkly. Its installation commands and APIs refer to the upstream package. Evaluate compatibility with the Bijection source separately.


# LaunchDarkly Feature Flags

## Instructions

This component integrates LaunchDarkly feature flags directly into your Convex backend functions. It syncs your LaunchDarkly environment to your Convex deployment in real-time via webhooks, eliminating the need for additional API calls when evaluating flags. You can use feature flags for A/B testing, gradual rollouts, and dynamic behavior control within your Convex queries, mutations, and actions.

### Installation

```bash
npm install @convex-dev/launchdarkly
```

## Use cases

- **Backend feature toggling**: Control database schema migrations, algorithm changes, or new API endpoints in your Convex functions without redeploying
- **A/B testing in queries**: Run experiments on search algorithms, recommendation logic, or data processing workflows directly in your Convex backend
- **Gradual feature rollouts**: Safely deploy new mutations or database operations to a subset of users while monitoring performance
- **Environment-specific behavior**: Use different LaunchDarkly environments to control feature availability across development, staging, and production Convex deployments
- **Real-time configuration**: Instantly update business rules, rate limits, or processing parameters in your Convex functions without code changes

## How it works

The component syncs LaunchDarkly flags and segments to your Convex deployment through webhook integration. You configure HTTP routes using `registerRoutes()` in your `http.ts` file, which creates endpoints for LaunchDarkly to verify the integration and push flag updates. The component stores your LaunchDarkly SDK key as an environment variable and generates shared secrets for secure webhook communication.

In your Convex functions, you initialize the `LaunchDarkly` class with your component configuration and call `launchdarkly.sdk(ctx)` to get an SDK instance. You can then use standard LaunchDarkly methods like `boolVariation()` to evaluate flags with user context. The component supports multiple LaunchDarkly environments by configuring separate component instances with different names and webhook paths.

Since flag data is synced locally to Convex, flag evaluations happen without external API calls, maintaining the performance characteristics of your functions. Event sending is supported in mutations and actions but not in queries due to Convex's read-only query constraints.

## When NOT to use

- When a simpler built-in solution exists for your specific use case
- If you are not using Convex as your backend
- When the functionality provided by LaunchDarkly Feature Flags is not needed

## Resources

- [npm package](https://www.npmjs.com/package/%40convex-dev%2Flaunchdarkly)
- [GitHub repository](https://github.com/get-convex/launchdarkly)
- [Convex Components Directory](https://www.convex.dev/components/launchdarkly)
- [Convex documentation](https://docs.convex.dev)