# Integrating Keycloakify in your Codebase

{% hint style="info" %}
**Before You Start**:

This documentation section is relevant only if **you already have a project** and want to add a Keycloak theme as one of its deliverables.

One of the powerful aspects of Keycloakify is its ability to let you reuse components and styles from your main application in your Keycloak theme. However, if you don't have an existing codebase, it’s easier to fork [the starter project](https://github.com/keycloakify/keycloakify-starter) and develop your Keycloak theme as a standalone project.
{% endhint %}

There is two main approach to integrate Keycloakify into your project, pick the one that you think will work best for you.

{% tabs %}
{% tab title="Collocation" %}
If you happen to be devlopping a React Single Page Application with Vite or Webpack you can install Keycloakify directly within your project!

This approach make it easy to reuse style and component of your main application in your Keycloakify theme if you are not in a mono-repository setup.

{% content-ref url="/pages/bcI4VfgrHJ00EEwVsZOK" %}
[In your React Project](/keycloakify/v10/keycloakify-in-my-codebase/in-your-react-project.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Monorepo" %}
There are many cases where the colocation apprach is not feasable, for example:

* You are using Next.js or another meta framwork that involves server side rendering.
* You are using a framework other than React (Vue, Angular, Svelt ...)

Beside, you might prefer to to keep your Keycloak theme as an isolated component of your app.

In this case you can integrate Keycloakify...

{% content-ref url="/pages/8BjaGP7OJVRdSWnMVvKz" %}
[As a Subproject of your Monorepo](/keycloakify/v10/keycloakify-in-my-codebase/as-a-subproject-of-your-monorepo.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keycloakify.dev/keycloakify/v10/keycloakify-in-my-codebase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
