A simple full-stack feature flag management dashboard built with Blazor Server, EF Core, and SQLite.
This application allows you to:
- Create and manage feature flags
- Toggle flags on/off
- Persist flags across sessions
- Expose a REST API for consuming feature flags in other applications
- 🎛️ Interactive UI with expandable "pill" components
- 💾 Persistent storage using SQLite
- 🔄 Real-time updates with Blazor Server
- 🚫 Duplicate flag name prevention
- 🔌 REST API endpoint for external consumers
- ⚡ Lightweight and easy to run locally
- Frontend / Backend: Blazor Server (.NET 10)
- UI Components: Blazor Bootstrap
- ORM: Entity Framework Core
- Database: SQLite
- API: ASP.NET Core Minimal APIs
git clone https://github.com/your-username/feature-flags.git
cd feature-flagsdotnet restore
brew install --cask dockerdotnet ef migrations add InitialCreate
dotnet ef database update./scripts/docker-up.shOpen your browser at:
http://localhost:<selected-port>
Build and run the container directly:
docker build -t featureflags .
docker run --rm -p 8080:8080 -v featureflags-data:/data featureflagsOr use Docker Compose:
./scripts/docker-up.shThen open:
http://localhost:<selected-port>
Notes:
- The container stores the SQLite database at
/data/featureflags.db docker-compose.ymlmounts/dataas a named volume so data survives container restarts- The app still applies EF Core migrations automatically on startup
scripts/docker-up.shpicks the first available host port from8080to8090- You can override the search range:
./scripts/docker-up.sh 8085 8100 - Running
docker compose up --builddirectly still defaults to host port8080; setHOST_PORTyourself if you want to pick a different one
curl --location 'http://localhost:<selected-port>/api/featureflags' \
--header 'user: <userID>'{
"featureFlags": {
"NewUI": true,
"BetaCheckout": false
}
}-
Feature flag names are unique
-
Duplicate names are prevented via:
- Database unique index
- Application-level validation
- Graceful UI error handling
/Components
/Shared
Pill.razor # Feature flag UI component
/Data
FeatureFlagDbContext.cs
/Models
FeatureFlag.cs
Program.cs # App + API setup
- SQLite database file:
featureflags.db - Migrations stored in
/Migrations - Uses
DbContextinjection for data access - UI changes auto-save to database
- Override the runtime DB path with
ConnectionStrings__FeatureFlags
Feel free to fork the repo and submit PRs!
MIT License
