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

# Package architecture

> How Neuron packages are structured and how the build system works

## Package types

There are two types of packages:

* **Content only** — Only contain content files like Markdown, scripts, and JavaScript. Do not require the Neuron to restart after installation.
* **Assembly packages** — Can install C# assembly files onto the Neuron, extending its capabilities. Require the Neuron to restart after installation.

## Package structure

A package consists of:

* **Content files** — the actual files to ship (Markdown pages, `.dll` assemblies, scripts, etc.)
* **A `.manifest` file** — lists every file included in the package. Only files listed in the manifest are shipped.
* **Encryption keys** — used to encrypt and sign the package

## Modules

Assembly packages expose behavior through modules:

* Look for a class implementing `IModule` or `IConfigurableModule`
* The module implements `Start` and `Stop` for lifecycle logic: register HTTP endpoints, timers, services, etc.
* The router creates a new controller instance per request — modules handle startup/teardown

## Naming convention

Use the pattern `COMPANY.CATEGORY.SERVICE[.SUBSERVICE]`:

* `TAG.Service.NeuroStripe` — business logic and payment interface
* `TAG.Networking.NeuronStripe` — API integration layer
* `TAG.Networking.HttpRouter` — HTTP routing infrastructure

## How the build system works

Most packages use a post-build step to install content into a local dev Neuron folder:

* Persistent storage and content: `C:\ProgramData\IoT Gateway Dev`
* Executables and `.dll` files: `C:\My Projects\IoTGateway\Waher.IoTGateway.Console\bin\Debug\net8.0\`

The post-build step uses `Waher.Utility.Install.exe` from the IoTGateway repo to install a package manifest from the project output.

See example paths in `neuro-ledger/Waher.Service.NeuroLedger/Waher.Service.NeuroLedger.csproj`.

## Existing packages (examples)

* [NeuronStripe](https://github.com/Trust-Anchor-Group/NeuronStripe) — payment service
* [NeuronScriptProviders](https://github.com/Trust-Anchor-Group/NeuronScriptProviders) — payment service with Script
* [NeuronDockerRegistry](https://github.com/Trust-Anchor-Group/NeuronDockerRegistry) — larger web service
