> ## Documentation Index
> Fetch the complete documentation index at: https://www.ravion.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Modules

> Modules are the core Ravion primitive that defines, tracks, and manages a piece of infrastructure, from a database to a full application.

A module is the core primitive in Ravion for both tracking and managing your services and supporting infrastructure.

A module's definition determines which **capabilities** its instances have — a Terraform stack, build config, deploy manager, and so on:

```mermaid theme={null}
%%{init: {'flowchart': {'defaultRenderer': 'elk'}}}%%
flowchart LR
  Module[Module] -. optional .-> IaCState["<div style='width: 225px; text-align: left;'>Stack (Terraform state)</div>"]
  Module -. optional .-> BuildConfig["<div style='width: 225px; text-align: left;'>Build config</div>"]
  Module -. optional .-> DeployManager["<div style='width: 225px; text-align: left;'>Deploy manager</div>"]
  Module -. optional .-> CertificateDomain["<div style='width: 225px; text-align: left;'>Certificate & domain manager</div>"]
  Module -. optional .-> MetricCharts["<div style='width: 225px; text-align: left;'>Metric charts</div>"]
  Module -. optional .-> Logs["<div style='width: 225px; text-align: left;'>Logs</div>"]
  Module -. optional .-> Links["<div style='width: 225px; text-align: left;'>Links</div>"]

  class Module container
  class IaCState,BuildConfig,DeployManager,CertificateDomain,MetricCharts,Logs,Links module

  classDef container fill:#FE6104,stroke:#BD4406,color:#fff
  classDef module fill:#F6DDCE,stroke:#FE6104,color:#2a1208

  click IaCState "/modules/stack" "Open stack docs"
  click BuildConfig "/modules/build" "Open build docs"
  click DeployManager "/modules/deploy" "Open deploy docs"
  click CertificateDomain "/modules/deploy" "Open deploy docs"
  click MetricCharts "/modules/metrics" "Open metrics docs"
  click Logs "/modules/logs" "Open logs docs"
```

For example, our **VPC Network** module has only a stack. But the **ECS Web Server** module has *all* of the above capabilities.

For how modules relate to stacks, deploys, and pipelines, see [Core concepts](/concepts/core-concepts).

By default, you have access to the Ravion [standard library](/module-definitions/standard-library) of module definitions. You can see the available module definitions via the *Catalog* page in the dashboard or via the `/module-definitions` endpoint.

You can also create your own module definitions.

## Module hierarchy

*Catalog* is used to refer to the module definitions available to your organization. These include the Ravion [standard library](/module-definitions/standard-library) of modules with type `rvn-*` and any custom modules you've added.

Module definitions are versioned with semver, and each module instance is an instance of a specific version.

```mermaid theme={null}
flowchart
  OrgCatalog[Organization catalog] -- contains --> StandardModules[Standard modules of type rvn-*]
  OrgCatalog -- contains --> CustomModules[Custom modules]
  StandardModules --> ModuleDefinition[Module definition]
  CustomModules --> ModuleDefinition
  ModuleDefinition -- has many --> ModuleVersion[Module version]
  ModuleInstance[Module instance] -- of --> ModuleVersion

  class OrgCatalog catalog
  class StandardModules,CustomModules source
  class ModuleDefinition,ModuleVersion,ModuleInstance module

  classDef catalog fill:#FE6104,stroke:#BD4406,color:#fff
  classDef source fill:#1f2937,stroke:#111827,color:#fff
  classDef module fill:#F6DDCE,stroke:#FE6104,color:#2a1208
```
