Skip to content

Latest commit

 

History

History
247 lines (179 loc) · 8.66 KB

File metadata and controls

247 lines (179 loc) · 8.66 KB

можно.

Open-core, self-hosted feature flag management platform.

CI BSL 1.1 Docker Stars

Русский


можно. — a feature flag server for teams of any size. Toggle features in production without deployment, roll out gradually, segment your audience — all from a single dashboard.


Features

Category Description
Flags RELEASE and KILLSWITCH, percentage rollouts, attribute-based rules
Contexts Evaluate flags against arbitrary user or request attributes
Segments Reusable user groups with shared targeting rules
Strategies Per-environment config: rules, segments, percentage rollout
API Keys Per-environment keys with granular permissions
Audit Full change history for every flag and configuration
SDKs Native clients for Java and JavaScript — evaluate flags locally, zero network calls

Design Book (Storybook)

cd web && npm run storybook   # http://localhost:6006

Storybook shows every UI component in an isolated catalog with documentation.

Screenshots

● ● ●
Flag dashboard

Flag dashboard

All flags on one screen. Toggle features in production and development with a single click — no deploy, no waiting, no risk to users.


 
Activation panel

Activation panel

Set your rollout percentage — 30% of users, VIP segment, Russia only. All in one window: slider, segment picker, conditions. Zero config files.


● ● ●
Overview dashboard

Overview dashboard

The first screen after login. Key project metrics in one place: flag status across environments, cross-environment drift, activity feed, and an onboarding checklist for new projects.

Run the project locally (make dev) to see the interface.


Quick Start

# docker-compose.yml
services:
  postgres:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: feature_flags
      POSTGRES_USER: flags_user
      POSTGRES_PASSWORD: flags_password
    volumes:
      - pgdata:/var/lib/postgresql/data

  mozhno:
    image: mozhnodev/mozhno:latest
    ports:
      - '8080:8080'
    environment:
      MOZHNO_DB_URL: jdbc:postgresql://postgres:5432/feature_flags
      MOZHNO_DB_USERNAME: flags_user
      MOZHNO_DB_PASSWORD: flags_password
      MOZHNO_JWT_SECRET: ${MOZHNO_JWT_SECRET}
    depends_on:
      - postgres

volumes:
  pgdata:
# Generate a JWT secret for production (≥32 characters or Base64 ≥32 bytes).
# For dev you can skip this — the server auto-generates a random key.
export MOZHNO_JWT_SECRET=$(openssl rand -base64 32)  # or plain text ≥32 characters

docker compose up -d

Open http://localhost:8080 — the web dashboard is already built into the server.

Full compose with healthchecks and pgAdmin — docker-compose.yml.


Architecture

Module Purpose
mozhno-spi Service provider interfaces
mozhno-core Business logic, flag evaluation engine, storage
mozhno-web-api REST controllers, Spring Security 6, JWT, OpenAPI
mozhno-app Entry point, static resources, DB migrations (Flyway)

Server — Spring Boot 4.0 / JDK 25. Web UI — React 19 SPA (Vite, Tailwind CSS 4, Radix UI). SDKs fetch flag rules once and evaluate locally.

Access model: the active project is carried in the JWT (project_id claim). All resources (flags, segments, contexts, API keys, audit, etc.) are scoped to that project; mutation rights depend on the role (ADMIN/DEVELOPER/VIEWER). A project is created once during bootstrap and cannot be deleted — use reset to start fresh.



SDKs

SDKs live in separate repositories:

See each repo for installation and docs.


Configuration

Variable Default Description
MOZHNO_DB_URL jdbc:postgresql://localhost:5432/feature_flags PostgreSQL JDBC URL
MOZHNO_DB_USERNAME flags_user Database user
MOZHNO_DB_PASSWORD flags_password Database password
MOZHNO_JWT_SECRET (recommended for production) Signing key (≥32 characters) or Base64 (≥32 bytes). Optional for dev — auto-generated random key. Generate: openssl rand -base64 32
MOZHNO_BASE_URL http://localhost:8080 Public server URL
MOZHNO_CLIENT_MAX_METRICS_BATCH_SIZE 1000 Max metrics batch size accepted from SDKs
MOZHNO_CLIENT_INSTANCE_RETENTION_DAYS 30 Client instance data retention
MOZHNO_MANAGEMENT_PORT 9090 Actuator port (health, metrics, prometheus)
MOZHNO_SERVER_PORT 8080 HTTP listen port
All environment variables

Full list of variables (rate limiting, webhooks, cache, SMTP, etc.) — see .env.example.


API

Swagger UI — http://localhost:8080/swagger-ui.html. OpenAPI 3.1 spec at /v3/api-docs.


Development

Requirements: JDK 25 (server), JDK 17+ (SDK), Node.js 24, PostgreSQL 15+.

The fastest way is via make (root Makefile):

make dev           # Postgres + hints to start server/web
make server-run    # build web static assets + run the server (dev profile)
make web-dev       # web UI with HMR
make server-test   # server tests
make web-test      # web tests
Manual setup
docker compose up -d postgres
cd server && ./gradlew :mozhno-app:bootRun
cd web && npm ci && npm run dev
cd server && ./gradlew check   # Server tests
cd web && npm test             # Web tests
Manual setup
docker compose up -d postgres
cd server && ./gradlew :mozhno-app:bootRun
cd web && npm ci && npm run dev
cd server && ./gradlew check   # Server tests
cd web && npm test             # Web UI tests

Contributing

Contributions are welcome — start with CONTRIBUTING.md. Please follow the Code of Conduct. Report vulnerabilities per the security policy. Release history is in CHANGELOG.md.


License

Business Source License 1.1 · © 2026 Edgar Gilmanov

Contributing · Security · Code of Conduct · Changelog