A dynamic feature flag and configuration management system that enables real-time control of application behavior without code deployments.
The system consists of three main components:
- Backend API (NestJS): REST API for configuration management, rule evaluation, and authentication
- Dashboard (Next.js): Web interface for managing configurations and rules
- SDK (TypeScript): Lightweight client library for fetching and caching configurations
- Node.js 18+ and npm
- Docker and Docker Compose (for PostgreSQL and Redis)
docker-compose up -dThis will start:
- PostgreSQL on port 5433
- Redis on port 6379
The database schema will be automatically initialized from backend/database/schema.sql.
cd backend
npm install
cp .env.example .env
npm run start:devThe backend API will be available at http://localhost:3000
cd dashboard
npm install
cp .env.example .env
npm run devThe dashboard will be available at http://localhost:3001
cd sdk
npm install
npm run buildExample usage:
import { ConfigClient } from '@config-management/sdk';
const client = new ConfigClient({
apiKey: 'your-api-key',
apiUrl: 'http://localhost:3000',
projectId: 'project-id',
environmentId: 'env-id',
}, {
user_id: 'user-123',
region: 'us-east-1',
});
const featureEnabled = await client.get('feature.new_ui', false);cd backend
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:cov # With coveragecd dashboard
npm testcd sdk
npm test.
├── backend/ # NestJS backend API
│ ├── src/ # Source code
│ ├── database/ # Database schema and migrations
│ └── package.json
├── dashboard/ # Next.js dashboard
│ ├── src/ # Source code
│ └── package.json
├── sdk/ # TypeScript SDK
│ ├── src/ # Source code
│ └── package.json
└── docker-compose.yml # PostgreSQL and Redis services
- ✅ Configuration key management with version history
- ✅ Context-aware rule evaluation
- ✅ Percentage-based rollouts
- ✅ Multi-layer caching (SDK → Redis → PostgreSQL)
- ✅ Role-based access control (RBAC)
- ✅ Comprehensive audit logging
- ✅ High availability with graceful degradation
- ✅ Multi-tenancy (Organizations → Projects → Environments)
- ✅ SDK with offline-first design
MIT