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

# Implementer Guide

> Everything needed to deploy, configure and operate the bridge — not customer-facing

<Warning>
  This tab is for whoever **implements and operates** the service. It
  documents internal endpoints, credentials, infrastructure and open
  confirmation points. The customer-facing documentation is the
  **Documentation** and **API Reference** tabs — keep internal details out
  of those.
</Warning>

## What you are deploying

A single FastAPI service (plus a scheduled orchestrator job) that turns
customer portfolio data into balanced schedules for the four German
balancing groups n:lead operates:

```mermaid theme={null}
flowchart LR
    C[Customer] -->|external scope| B(Scheduling Bridge)
    T[Timer job] -->|process scope| B
    B --> S[(Trader sFTP)]
    B --> E[Engrate → TSOs]
    O[Operator] -->|/console| B
```

## Two API scopes

| Scope        | Key                | Grants                                                                    | Used by                                                |
| ------------ | ------------------ | ------------------------------------------------------------------------- | ------------------------------------------------------ |
| **external** | `EXTERNAL_API_KEY` | Forecast and data-delivery endpoints only                                 | The customer / their market-communication provider     |
| **process**  | `PROCESS_API_KEY`  | Everything: `/v1/process/*`, `/v1/console/*`, plus the external endpoints | n:lead operations, the orchestrator timer, the console |

Hand the customer **only** the external key. If no key is configured at
all, the API is open — local development only, never deployed.

## Order of work

<Steps>
  <Step title="Deploy the infrastructure">
    One Bicep file provisions the container app, registry, logs, file share
    and the orchestrator job — see
    [Azure deployment](/setup/azure-deployment).
  </Step>

  <Step title="Configure the market setup">
    Home control area, active areas, balancing-group EICs, Engrate
    credentials, trader sFTP — see [Configuration](/setup/configuration).
    Most of it can be changed at runtime from the console.
  </Step>

  <Step title="Close the confirmation points">
    Real EIC codes, the ECC counterparty, the trader's CSV format — see
    [Assumptions](/setup/assumptions). **Do not go live before these are
    settled.**
  </Step>

  <Step title="Run it">
    Start the service, watch the [console](/setup/console), and understand
    how the [pipeline](/setup/pipeline) decides what to re-run.
  </Step>
</Steps>

## Where things live

| Topic                                   | Page                                              |
| --------------------------------------- | ------------------------------------------------- |
| Environment variables and secrets       | [Configuration](/setup/configuration)             |
| Azure resources and bootstrap           | [Azure deployment](/setup/azure-deployment)       |
| Internal pipeline and change detection  | [Pipeline](/setup/pipeline)                       |
| Live events, runtime config, start/stop | [Console](/setup/console)                         |
| Building forecasts from mirrored data   | [Forecast generation](/setup/forecast-generation) |
| Per-day artefacts and state             | [Audit trail](/setup/audit-trail)                 |
| Code layout and testing strategy        | [Architecture](/setup/architecture)               |
| Open confirmation points                | [Assumptions](/setup/assumptions)                 |
| Internal endpoint reference             | Internal API group in this tab                    |
