# Kazana Architecture

![kazana Architecture](https://raw.githubusercontent.com/eHealthAfrica/kazana/documentation/documentation/assets/kazana-architecture.png)

A Kazana app only depends on [kazana](https://www.npmjs.com/package/kazana).
Custom plugins can be added as dependency and listed in the `plugins` field
of the [Kazana Manifest](../api/kazana-manifest.md).

## Core modules

The core modules implement Kazana’s core features like transforming raw data
reports into indicators, indices and data bootstrapping.

Most of the [Kazana Manifest](../api/kazana-manifest) options have an according
core module. The core modules are implemented in their own repositories:

- [config](https://github.com/eHealthAfrica/kazana-config)
- [bootstrap](https://github.com/eHealthAfrica/kazana-bootstrap)
- [transform](https://github.com/eHealthAfrica/kazana-transform)

_TBD_

- indices (currently built into [kazana-server](https://github.com/eHealthAfrica/kazana-server/blob/92f229d/lib/compose-plugin.js#L150-L188))
- schema
- audit
- events
- entities
- account

## Core plugins

The core plugins are implemented just like normal [plugins](plugins.md), but
they are always loaded transparently, as if they were listed as first entries
in the app’s [Manifest](../api/kazana-manifest.md#plugins).

All core plugins are implemented in their own repositories:

- [account](https://github.com/eHealthAfrica/kazana-account)
- [raw-data](https://github.com/eHealthAfrica/kazana-raw-data)
- _TBD_ [integrated-data](https://github.com/eHealthAfrica/kazana-integrated-data)
- [entities](https://github.com/eHealthAfrica/kazana-entities) – entities is not
  yet a core plugin, it’s work in progress.
