Colormatic's Keycloak theme combines two intentionally different front ends in one Keycloakify build:
- a Svelte login theme under
src/login; - a React fork of Keycloak's Single-Page account console under
src/accountandsrc/shared.
Svelte owns the generated Keycloak entry point. On account pages,
src/account/KcPage.svelte mounts the React console. Vite code-splits that
bridge, so login pages do not eagerly load the account console and no manifest
merge step is required.
The maintained account-console baseline is Keycloak 26.7 or newer. Older Keycloak artifacts are deliberately not generated. Review upstream account UI changes before each Keycloak major upgrade, especially API endpoints, injected feature flags, translations, and PatternFly versions.
- Bun
- Java and Maven for the Keycloak JAR build
Install dependencies with:
bun installThe lockfile is committed and should be updated together with package.json.
bun run dev:login
bun run dev:account
bun run storybookThe two Vite commands use local Keycloak-context mocks. Storybook contains the login page catalog and is the preferred way to inspect individual login flows.
src/main.css is the shared visual source of truth. Its --cm-* semantic
tokens use Tailwind's exact color variables (currently the Slate palette), and
its shadcn-compatible variables are aliases rather than a second palette.
The login theme uses Svelte and shadcn-svelte primitives. The account console
keeps PatternFly for upstream structure and behavior, while
src/account/theme.tokens.css and src/account/theme.css adapt PatternFly's
component variables to the shared Colormatic tokens. Project-owned icons use
Bootstrap Icons and both themes use the system font stack.
Light, Dark, and System are one shared preference stored as
colormatic-theme. Both themes render the same bottom-right control and apply
the dark, pf-v5-theme-dark, and data-theme hooks together. The early
color-scheme scripts under public/keycloak-theme prevent a light flash before
the application mounts.
Build the shared Vite output only:
bun run build:themeBuild the deployable Keycloak theme JAR:
bun run buildThe JAR is written to dist_keycloak/ as
colormatic-keycloak-theme-kc-26.7-and-newer.jar.
bun run check
bun run build-storybook
bun auditcheck runs Svelte diagnostics, TypeScript, exhaustive login and account-route
coverage, tests, Tailwind compilation, and ESLint. Account-route coverage also
checks that every built-in navigation entry resolves to a page using the shared
semantic page shell.
The account console is a maintained fork. Port upstream behavior, security, accessibility, API, and translation changes intentionally rather than replacing the local integration and Colormatic styling wholesale.