> For the complete documentation index, see [llms.txt](https://docs.cipp.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cipp.app/dev-documentation/cipp-dev-guide/project-structure.md).

# Project Structure

CIPP is a mono-repository with three top-level directories: `frontend/` for the web interface, `backend/` for the API, and `build/` for Docker and dev tooling.

## Frontend

### Root files

| Item                | Description                                                       |
| ------------------- | ----------------------------------------------------------------- |
| `src/`              | Application source code, where most frontend development happens. |
| `public/`           | Static assets served as-is (images, favicons).                    |
| `tests/`            | Vitest unit tests and Storybook interaction tests.                |
| `package.json`      | Dependencies and scripts.                                         |
| `yarn.lock`         | Locked dependency versions for repeatable installs.               |
| `next.config.js`    | Next.js configuration.                                            |
| `eslint.config.mjs` | ESLint flat config (extends `eslint-config-next` + Prettier).     |
| `vitest.config.mjs` | Vitest test runner configuration.                                 |

### The `src/` directory

| Item          | Description                                                                        |
| ------------- | ---------------------------------------------------------------------------------- |
| `pages/`      | Next.js pages router. Each file or directory maps to a URL route.                  |
| `components/` | Reusable React components, with CIPP-specific components under `components/Cipp*`. |
| `sections/`   | Page-specific sections and layouts used by pages.                                  |
| `layouts/`    | Application layout wrappers (sidebar, header, navigation).                         |
| `api/`        | API call layer (`ApiCall.jsx`), wrapping React Query around axios.                 |
| `store/`      | Redux Toolkit slices for cross-cutting application state.                          |
| `contexts/`   | React context providers.                                                           |
| `hooks/`      | Custom React hooks.                                                                |
| `theme/`      | MUI theme configuration (palette, typography, component overrides).                |
| `styles/`     | Global and utility styles.                                                         |
| `data/`       | Static data files (for example, `countryList.json`).                               |
| `icons/`      | Custom icon components.                                                            |
| `libs/`       | Third-party library wrappers and configuration.                                    |
| `utils/`      | Shared utility functions.                                                          |

## Backend

Source code lives under `backend/Modules/`, split into purpose-specific modules:

| Module                 | What it holds                                                       |
| ---------------------- | ------------------------------------------------------------------- |
| `CIPPCore`             | Shared helpers, Graph/Exchange wrappers, auth, and the HTTP router. |
| `CIPPHTTP`             | Every `Invoke-*` HTTP endpoint handler, organised by area.          |
| `CIPPStandards`        | Tenant standards (`Invoke-CIPPStandard*.ps1`).                      |
| `CIPPAlerts`           | Alert definitions (`Get-CIPPAlert*.ps1`).                           |
| `CIPPDB`               | Reporting database cache refresh jobs (`Set-CIPPDBCache*.ps1`).     |
| `CIPPActivityTriggers` | Durable activity, queue, and timer entrypoints.                     |
| `CippExtensions`       | Third-party integrations (Hudu, NinjaOne, and others).              |

Tests live under `backend/Tests/`, organised by area (Alerts, Endpoint, Standards, Private, Security, Build).

## Build

The `build/` directory contains Docker Compose files, Dockerfiles, the vendored ModuleBuilder, and the dev tooling scripts that compile backend modules and watch for changes. See [Setting Up for Local Development](/dev-documentation/cipp-dev-guide/setting-up-for-local-development.md) for how to use them.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.cipp.app/dev-documentation/cipp-dev-guide/project-structure.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
