---
id: kibRepoStructure
slug: /kibana-dev-docs/contributing/repo-structure
title: Repository structure
description: High level walk-through of our repository structure.
date: 2021-10-07
tags: ['contributor', 'dev', 'github', 'getting started', 'onboarding', 'kibana']
---

A high-level walk through of the folder structure of our [repository](https://github.com/elastic/kibana).

Tip: Look for a `README.md` in a folder to learn about its contents.

## [.buildkite](https://github.com/elastic/kibana/tree/main/.buildkite)

Managed by the operations team to set up a new buildkite ci system. Can be ignored by folks outside the Operations team.


## [.github](https://github.com/elastic/kibana/tree/main/.github)

Contains GitHub configuration settings. This file contains issue templates, and the [CODEOWNERS](https://github.com/elastic/kibana/blob/main/.github/CODEOWNERS) file. It's important for teams to keep the CODEOWNERS file up-to-date so the right team is pinged for a code owner review on PRs that edit certain files. Note that the `CODEOWNERS` file only exists on the main branch, and is not backported to other branches in the repo. To aid in making sure the `CODEOWNERS` file is always up-to-date "packages" in the Kibana repo are required to have an "owner" defined, those owners are then injected into the CODEOWNERS files automatically by the `node scripts/generate codeowners` command.

## [api_docs](https://github.com/elastic/kibana/tree/main/api_docs)

Every file in here is auto-generated by the <DocLink id="kibDevDocsApiWelcome" text="API Docs system"/> and used to render our API documentation. If you edit a public plugin or package API and run `node scripts/build_api_docs` you will see files changed in this folder. Do not edit the contents of this folder directly!

Note that currently you may see _a lot_ of changes because that command is not run on every PR and so the content in this folder is often outdated.

## [config](https://github.com/elastic/kibana/tree/main/config)

This contains the base configuration file, `kibana.yml`. If you want to tweak any settings, create a `kibana.dev.yml` in here which will get picked up during development, and not checked into GitHub.

## [docs](https://github.com/elastic/kibana/tree/main/docs)

Every folder in here _except_ the [development one](https://github.com/elastic/kibana/tree/main/docs/development) contains manually generated asciidocs that end up hosted in our [Elastic guide](https://www.elastic.co/guide/).

The `development` folder contains markdown that is auto-generated with our legacy API docs tool. We are aiming to remove it shortly after 8.0FF.

## [dev_docs](https://github.com/elastic/kibana/tree/main/dev_docs)

This is where a lot of manually written content for our Developer Guide resides. Developers may also keep the information closer to what it's describing, but it's a good spot for high-level information, or information that describes how multiple plugins work together.

## [examples](https://github.com/elastic/kibana/tree/main/examples)

These are our tested example plugins that also get built and hosted [here](https://demo.kibana.dev/8.0/app/developerExamples). If a plugin is written for testing purposes only, it won't go in here. These example plugins should be written with the intention of helping developers understand how to use our services.

## [legacy_rfcs](https://github.com/elastic/kibana/tree/main/legacy_rfcs)

We used to write RFCs in `md` format and keep them in the repository, but we have since moved to Google Docs. We kept the folder around, since some folks still read these old docs. If you are an internal contributor you can visit <DocLink id="ktRFCProcess" text="this document"/> to read about our current RFC process.

## [licenses](https://github.com/elastic/kibana/tree/main/licenses)

Contains our two license header texts, one for the Elastic license and one for the Elastic+SSPL license. All code files inside x-pack should have the Elastic license text at the top, all code files outside x-pack should contain the other. If you have your environment set up to auto-fix on save, eslint should take care of adding it for you. If you don't have it, ci will fail. Can be ignored for the most part, this rarely changes.

## [plugins](https://github.com/elastic/kibana/tree/main/plugins)

This is an empty folder in GitHub. It's where third party developers should put their plugin folders. Internal developers can ignore this folder.

## [scripts](https://github.com/elastic/kibana/tree/main/scripts)

Contains a bunch of developer scripts. These are usually very small files with just two lines that kick off a command, the logic of which resides elsewhere (sometimes `src/dev`, sometimes inside `packages`).
Example:
```
require('../src/setup_node_env');
require('@kbn/es-archiver').runCli();
```

## [src](https://github.com/elastic/kibana/tree/main/src)

This folder and the packages folder contain the most code and where developers usually find themselves. I'll touch on a few of the subfolder, the rest can generally be ignored, or are build/ops related code.

### [src/cli*](https://github.com/elastic/kibana/tree/main/src/cli)

Maintained primarily by the Operations team, this folder contains code that initializes the Kibana runtime and a bit of work to handle authorization for interactive setup mode.  Most devs should be able to ignore this code.

### [src/core](https://github.com/elastic/kibana/tree/main/src/core)

This code primarily belongs to the Core team and contains the plugin infrastructure, as well as a bunch of fundamental services like migrations, saved objects, and some UI utilities (toasts, flyouts, etc.).

### [src/dev](https://github.com/elastic/kibana/tree/main/src/dev)

Maintained by the Operations team, this code contains build and development tooling related code. This folder existed before `packages`, so contains mostly older code that hasn't been migrated to packages. Prefer creating a `package` if possible. Can be ignored for the most part if you are not on the Ops team.

### [src/platform](https://github.com/elastic/kibana/tree/main/src/platform)

Contains the Basic-licensed code that is common to all Kibana solutions. The code is organised in modules, that can be either [plugins](https://github.com/elastic/kibana/tree/main/src/platform/plugins) or [packages](https://github.com/elastic/kibana/tree/main/src/platform/packages). <DocLink id="kibPlatformIntro" section="1000-foot-view" text="This document"/> covers how packages differ from plugins.

### [src/platform/plugins](https://github.com/elastic/kibana/tree/main/src/platform/plugins)

Contains Basic-licensed plugins that are common to all Kibana solutions. They are organized according to their _visibility_: Thy can be [shared](https://github.com/elastic/kibana/tree/main/src/platform/plugins/shared) or [private](https://github.com/elastic/kibana/tree/main/src/platform/plugins/private) (aka not accessible from solutions).

## [test](https://github.com/elastic/kibana/tree/main/test)

Contains functional tests and related FTR (functional test runner) code for the plugins inside `src/plugins`, although there is a push to move the tests to reside inside the plugins themselves.

## [typings](https://github.com/elastic/kibana/tree/main/typings)

Maintained by Ops and Core, this contains global typings for dependencies that do not provide their own types, or don't have types available via [DefinitelyTyped](https://definitelytyped.org). This directory is intended to be minimal; types should only be added here as a last resort.

## [x-pack](https://github.com/elastic/kibana/tree/main/x-pack)

Contains all code and infrasturcture that powers our gold+ (non-basic) features that are provided under a more restrictive license. The code is organized in the following subfolders:

## [x-pack/platform](https://github.com/elastic/kibana/tree/main/x-pack/platform)

Contains all of the gold+ (non-basic) modules that are common to all Kibana solutions. Like the `src/platform` code, it is organized in modules that can be either plugins or packages, and in turn, these plugins are organized according to their visibility.

## [x-pack/solutions](https://github.com/elastic/kibana/tree/main/x-pack/solutions)

Contains all of the code that is specific to each Kibana solution. At the moment, we have a folder for [observability](https://github.com/elastic/kibana/tree/main/x-pack/solutions/observability), another for [security](https://github.com/elastic/kibana/tree/main/x-pack/solutions/security), and another for [search](https://github.com/elastic/kibana/tree/main/x-pack/solutions/search). These folders contain the modules that belong to each solution, and these modules are also categorised as plugins or packages.
Unlike the `src/platform` and the `x-pack/platform` code, the solution-specific modules are `private` by definition, aka they cannot be accessed from platform nor from other solutions.

### [x-pack/build_chromium](https://github.com/elastic/kibana/tree/main/x-pack/build_chromium)

Maintained by the App Services UX team, this contains Reporting-related code for building Chromium in order to take server side screenshots.

### [x-pack/dev-tools](https://github.com/elastic/kibana/tree/main/x-pack/dev-tools)

Maintained by the Operations team.

### [x-pack/examples](https://github.com/elastic/kibana/tree/main/x-pack/examples)

Contains all example plugins that rely on gold+ features.

### [x-pack/plugins](https://github.com/elastic/kibana/tree/main/x-pack/plugins)

Contains code for all the plugins that power our gold+ features.

### [x-pack/scripts](https://github.com/elastic/kibana/tree/main/x-pack/scripts)

Maintained by the Ops team, this folder contains some scripts for running x-pack utilities, like the functional test runner that runs with a license higher than Basic.

### [x-pack/test](https://github.com/elastic/kibana/tree/main/x-pack/test)

Functional tests for our gold+ features.
