Keycloakify
HomeGitHubStorybookAlternative to keycloak-js
v11
  • Documentation
  • Release Notes & Upgrade Instructions
  • FAQ
v11
  • Quick Start
  • CSS Customization
  • Testing your Theme
    • Outside of Keycloak
    • Inside of Keycloak
  • Deploying Your Theme
  • Integrating Keycloakify in your Codebase
    • Vite
    • Create-React-App / Webpack
    • yarn/npm/pnpm/bun Workspaces
    • Turborepo
    • Nx
    • Angular Workspace
  • Common Use Case Examples
    • Using a Component Library
    • Custom Fonts
    • Changing the background image
    • Adding your Logo
    • Using Tailwind
    • Dark Mode Persistence
  • Features
    • Internationalization and Translations
      • Basic principles
      • Previewing Your Pages in Different Languages
      • Adding New Translation Messages or Changing the Default Ones
      • Adding Support for Extra Languages
    • Theme Variants
    • Environment Variables
    • Styling a Custom Page Not Included in Base Keycloak
    • Integrating an Existing Theme into Your Keycloakify Project
    • Compiler Options
      • --project
      • keycloakVersionTargets
      • environmentVariables
      • themeName
      • startKeycloakOptions
      • themeVersion
      • accountThemeImplementation
      • postBuild
      • XDG_CACHE_HOME
      • kcContextExclusionsFtl
      • keycloakifyBuildDirPath
      • groupId
      • artifactId
      • Webpack specific options
        • projectBuildDirPath
        • staticDirPathInProjectBuildDirPath
        • publicDirPath
  • Page-Specific Guides
    • Registration Page
    • Terms and Conditions Page
  • Theme types
    • Differences Between Login Themes and Other Types of Themes
    • Account Theme
      • Single-Page
      • Multi-Page
    • Email Theme
    • Admin Theme
Powered by GitBook
On this page
  • First Option: Installing Keycloakify Directly in Your SPA
  • Second Option: Setting Up Keycloakify as a Subproject in Your Monorepo

Was this helpful?

Edit on GitHub

Integrating Keycloakify in your Codebase

Last updated 2 months ago

Was this helpful?

This is for advanced users. If you are just trying to get started with Keycloakify follow

There are two main approaches to integrate Keycloakify into your project.

First Option: Installing Keycloakify Directly in Your SPA

🚨 WARNING: ADVANCED USERS ONLY 🚨

If you're unsure what this section is about, this approach is NOT for you. Instead, follow

This section is only for developers who already have an existing project and need to integrate a Keycloak theme within it to reuse existing components and styles.

🔹 If you're just trying to get started with Keycloakify, stop here— provide a much simpler and recommended path.

🔹 If you proceed without fully understanding how this approach differs from the starter project, you will likely get confused about what you’re actually doing, attempt to simplify things, and end up hitting a roadblock.

If you are developing a , you can install Keycloakify directly within your project.

The main advantage of this approach is that your theme's source files will reside inside src/keycloak-theme, allowing you to directly import and reuse the components from your existing codebase.

This approach is suitable if your project falls into one of the following categories:

  • Vite + React

  • Create-React-App

  • Webpack + React

Follow the guide corresponding to your setup:

Second Option: Setting Up Keycloakify as a Subproject in Your Monorepo

If your project is structured as a monorepo, you can add your Keycloak theme as a subproject, typically located at apps/keycloak-theme.

Choose the guide that matches your monorepo setup:

Vite
Create-React-App / Webpack
yarn/npm/pnpm/bun Workspaces
Turborepo
Nx
Angular Workspace
the Quick Start Guide and fork the starter project.
the Quick Start Guide and fork the starter project.
the starter projects