Skip to content

Contributing

Dev setup

bash
git clone https://github.com/kathari00/keycloak-theme-editor.git
cd keycloak-theme-editor
npm install
npm run dev

Open the URL shown in terminal (default: http://localhost:5173).

Requirements

  • Node.js 18+ (20+ recommended)
  • JDK 25+ and Maven: only needed for preview artifact generation

Scripts

CommandDescription
npm run devDev server
npm run buildType-check + production build
npm run build:cliBuild the CLI bundle
npm run build:jarBuild the Java preview renderer JAR
npm run test:runRun tests once
npm run lintESLint
npm run sync:keycloakSync upstream Keycloak templates into public/keycloak-upstream/
npm run generate:previewRegenerate preview pages.json

How the codebase is organized

src/
  app/              # Editor shell and wiring
  components/       # Sidebar, topbar, panels
  features/
    assets/         # Upload and asset management
    editor/         # CSS editing, undo/redo, style layers
    presets/        # Preset selection logic
    preview/        # Iframe preview and generated artifacts
    theme-export/   # JAR/folder export and import

public/
  keycloak-dev-resources/   # Base theme resources

bin/
  cli.ts            # CLI entry point

tools/
  keycloak-sync/        # Upstream template sync
  preview-renderer/     # Java-based preview generation