Varse
Varse is a tool for updating application variables at runtime. It has a dashboard for managing variables and an SDK for reading variables. It has built-in team managment for sharing configs across a team.
Use Cases
- Feature Flags: Toggle features on and off
- Rollouts: Incrementally rollout features to users
- Environments Specific Config: Set specific variables for each environment
Architecture
Varse has a backend and a dashboard. Variables are created and updated in the dashboard. API Keys are created in the dashboard and used to authenticate requests to the backend. There is a client-side SDK for reading variables in React. There is also a server-side SDK for reading variables in Node.js.
Getting Started
Local Setup
- Clone the repo
- Follow README in
serverto setup Prisma and Postgres - Follow README in
appto setup the dashboard - Visit
http://localhost:3000to view the dashboard - Create a variable and API Key in the dashboard
- Use the SDK to read the variable
Varse Cloud (Recommended)
Get started with Varse Cloud quickly by following these simple steps:
- Create an Account - Sign up at varse.io/signup
- Make a Project
- Create a variable and API Key in the dashboard
- Use the SDK to read the variable
Varse SDK
The Varse SDK is available client-side or server-side.
Client-side
// App.tsx import { VarseProvider } from 'varse-io-react' const App = () => { const varseOptions = { apiKey: 'pk_00000000000000000000000000000000', baseUrl: 'https://api.varse.io', } return ( <VarseProvider {...varseOptions}> <Component /> </VarseProvider> ) }
// Component.tsx import { useVarseBool } from 'varse-io-react' const Component = () => { const value = useVarseBool('new_variable') return <div>{value ? 'True' : 'False'}</div> }
Server-side
import { VarseClient } from "varse-io"; const client = new VarseClient({ apiKey: "pk_00000000000000000000000000000000", baseUrl: "https://api.varse.io", }); const value = await client.getBool("new_variable");