https://github.com/replane-dev/replane-javascript
Dynamic configuration for JavaScript
https://github.com/replane-dev/replane-javascript
configuration configuration-management dynamic-config feature-flags javascript kill-switches operational-tuning remote-config typescript
Last synced: 6 months ago
JSON representation
Dynamic configuration for JavaScript
- Host: GitHub
- URL: https://github.com/replane-dev/replane-javascript
- Owner: replane-dev
- License: mit
- Created: 2025-09-07T09:31:44.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-01-19T21:22:35.000Z (6 months ago)
- Last Synced: 2026-01-21T00:41:58.663Z (6 months ago)
- Topics: configuration, configuration-management, dynamic-config, feature-flags, javascript, kill-switches, operational-tuning, remote-config, typescript
- Language: TypeScript
- Homepage: https://replane.dev
- Size: 771 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Replane JavaScript
Dynamic configuration for JavaScript and TypeScript applications.

[Replane](https://github.com/replane-dev/replane) is a dynamic configuration manager that lets you tweak your software without running scripts or building your own admin panel. Store feature flags, rate limits, UI text, log level, rollout percentage, and more. Delegate editing to teammates and share config across services. No redeploys needed.
## Why Dynamic Configuration?
- **Feature flags** – toggle features, run A/B tests, roll out to user segments
- **Operational tuning** – adjust limits, TTLs, and timeouts without redeploying
- **Per-environment settings** – different values for production, staging, dev
- **Incident response** – instantly revert to a known-good version
- **Cross-service configuration** – share settings with realtime sync
- **Non-engineer access** – safe editing with schema validation
## Packages
| Package | Description | Links |
| ---------------------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@replanejs/sdk`](./packages/sdk) | Core SDK for Node.js, Deno, Bun, and browsers | [](https://www.npmjs.com/package/@replanejs/sdk) · [GitHub](https://github.com/replane-dev/replane-javascript/tree/main/packages/sdk#readme) |
| [`@replanejs/react`](./packages/react) | React bindings with hooks and context | [](https://www.npmjs.com/package/@replanejs/react) · [GitHub](https://github.com/replane-dev/replane-javascript/tree/main/packages/react#readme) |
| [`@replanejs/next`](./packages/next) | Next.js SDK with SSR/SSG support | [](https://www.npmjs.com/package/@replanejs/next) · [GitHub](https://github.com/replane-dev/replane-javascript/tree/main/packages/next#readme) |
| [`@replanejs/svelte`](./packages/svelte) | Svelte bindings with stores | [](https://www.npmjs.com/package/@replanejs/svelte) · [GitHub](https://github.com/replane-dev/replane-javascript/tree/main/packages/svelte#readme) |
## Quick Start
### Core SDK
```bash
npm install @replanejs/sdk
```
```ts
import { Replane } from "@replanejs/sdk";
const replane = new Replane();
await replane.connect({
sdkKey: process.env.REPLANE_SDK_KEY!,
baseUrl: "https://cloud.replane.dev", // or your self-hosted URL
});
const featureEnabled = replane.get("my-feature");
```
### React
```bash
npm install @replanejs/react
```
```tsx
import { ReplaneProvider, useConfig } from "@replanejs/react";
function App() {
return (
);
}
function MyComponent() {
const featureEnabled = useConfig("my-feature");
return featureEnabled ? : ;
}
```
### Next.js
```bash
npm install @replanejs/next
```
**App Router:**
```tsx
// app/layout.tsx
import { ReplaneRoot } from "@replanejs/next";
export default async function RootLayout({ children }: { children: React.ReactNode }) {
return (
{children}
);
}
// app/page.tsx (client component)
("use client");
import { useConfig } from "@replanejs/next";
export default function Page() {
const theme = useConfig<{ darkMode: boolean }>("theme");
return
{theme.darkMode ? "Dark" : "Light"};
}
```
### Svelte
```bash
npm install @replanejs/svelte
```
```svelte
import { ReplaneContext } from "@replanejs/svelte";
```
```svelte
import { config } from "@replanejs/svelte";
const feature = config("my-feature");
{#if $feature}
{:else}
{/if}
```
## Features
- **Realtime updates** — Configs update instantly via Server-Sent Events (SSE)
- **Context-based overrides** — Feature flags, A/B testing, gradual rollouts
- **Type-safe** — Full TypeScript support with generics and inference
- **Framework integrations** — React, Next.js, Svelte, and more
- **Tiny footprint** — Zero runtime dependencies in core SDK
- **SSR/SSG support** — Server-side rendering with hydration
## Examples
See the package directories for complete working examples:
- [`packages/sdk/examples`](./packages/sdk/examples) — Core SDK usage
- [`packages/react/examples`](./packages/react/examples) — React integration
- [`packages/next/examples`](./packages/next/examples) — Next.js (App Router & Pages Router)
- [`packages/svelte/examples`](./packages/svelte/examples) — SvelteKit
## Development
This is a monorepo managed with [pnpm workspaces](https://pnpm.io/workspaces).
```bash
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Type check
pnpm typecheck
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and contribution guidelines.
## Community
Have questions or want to discuss Replane? Join the conversation in [GitHub Discussions](https://github.com/orgs/replane-dev/discussions).
## License
MIT