A developer-focused, configuration-driven rendering framework that redefines how modern applications are built, deployed, and personalized.
ConfigKits empowers teams to define entire user interfaces, behaviors, and feature states through declarative configuration filesβallowing applications to adapt dynamically without code changes or redeployments.
ConfigKits is built as a modular, composable architecture consisting of independent yet interoperable packages that form the foundation of configuration-first development:
- @configkits/core - Core engine managing schema validation, configuration parsing, and lifecycle control
- @configkits/react - React renderer that transforms JSON-based configurations into live UI components
- @configkits/flags - Feature flags, conditional rendering, A/B testing, and permission-based visibility
The core engine provides schema validation, configuration parsing, and lifecycle management.
import { ConfigParser, ConfigValidator } from '@configkits/core';
const parser = new ConfigParser();
const config = parser.parseFromString(jsonString);
const validator = new ConfigValidator();
const result = validator.validate(config);React renderer for transforming configurations into React components.
import { ConfigRenderer } from '@configkits/react';
import { defaultRegistry } from '@configkits/react';
// Register components
defaultRegistry.register('button', Button);
// Render configuration
<ConfigRenderer
config={config.components}
options={{
onEvent: (eventType, handler, payload) => {
// Handle events
}
}}
/>Feature flags, A/B testing, and permission management.
import { FeatureFlagManager, ABTestManager, PermissionManager } from '@configkits/flags';
const flagManager = new FeatureFlagManager({
userId: 'user123',
environment: 'production'
});
flagManager.register({
id: 'new-feature',
name: 'New Feature',
enabled: true,
rollout: {
percentage: 50
}
});
const isEnabled = flagManager.isEnabled('new-feature');ConfigKits follows a monorepo structure using Turborepo:
configkit/
βββ packages/
β βββ core/ # Core engine
β βββ react/ # React renderer
β βββ flags/ # Feature flags
βββ apps/
β βββ playground/ # Interactive playground
βββ turbo.json # Turborepo configuration
ConfigKits is built with modern, developer-friendly tools:
- Build: Vite + TypeScript
- Testing: Vitest with coverage
- Documentation: VitePress
- Config Validation: Zod
- CI/CD: GitHub Actions
- Monorepo Management: Turborepo
- Node.js >= 18.0.0
- npm >= 9.0.0
# Install dependencies
npm install
# Build all packages
npm run build
# Run tests
npm run test
# Run tests with coverage
npm run test:coverage
# Run playground in development mode
npm run dev
# Run documentation site
npm run docs:dev
# Run type checking
npm run type-check
# Run linting
npm run lintThe playground app provides an interactive environment for testing configurations:
cd apps/playground
npm run devVisit http://localhost:3000 to see the playground interface.
ConfigKits uses a declarative JSON configuration format:
{
"version": "1.0.0",
"metadata": {
"name": "My App",
"description": "App description"
},
"components": [
{
"id": "header",
"type": "div",
"styles": {
"padding": "20px"
},
"children": [
{
"id": "title",
"type": "h1",
"props": {
"children": "Welcome"
}
}
],
"conditions": [
{
"type": "featureFlag",
"key": "show-header",
"operator": "eq",
"value": true
}
],
"events": [
{
"type": "onClick",
"handler": "handleClick",
"payload": {}
}
]
}
],
"features": [
{
"id": "new-feature",
"name": "New Feature",
"enabled": true,
"rollout": {
"percentage": 50
}
}
]
}- Schema Validation - Robust validation using Zod schemas
- Component Registry - Flexible component registration system
- Feature Flags - Rollout control, A/B testing, and conditional rendering
- Lifecycle Hooks - Extensible lifecycle management
- TypeScript - Full TypeScript support with type safety
- Modular Architecture - Independent, composable packages
ConfigKits is designed for extensibility:
- Plugins - Support for analytics, condition evaluators, remote configuration sources
- Custom Components - Register any React component
- Custom Evaluators - Build custom condition evaluators
- Lifecycle Hooks - Extend functionality at key lifecycle points
- Remote configuration sources
- Analytics integration
- Version control and history
- Collaborative dashboard
- Real-time configuration updates
- Cloud-based configuration management platform
MIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For questions and support, please open an issue on GitHub.