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

# Storage

> Append-only persistence for Business Transactions, Trust Records, and policies.

<Info>**\[AVAILABLE]** for `memory` and `supabase`. **Declared but unimplemented** for `postgres`/`sqlite`, see below.</Info>

## Providers, precisely

```typescript theme={null}
// packages/storage/src/StorageFactory.ts
switch (configuration.provider) {
  case "memory":   return new MemoryStorageProvider();
  case "supabase": return new SupabaseStorageProvider();
  case "postgres": throw new Error("Postgres storage provider not implemented.");
  case "sqlite":   throw new Error("SQLite storage provider not implemented.");
}
```

`StorageConfiguration.provider` accepts `"memory" | "supabase" | "postgres" | "sqlite"` as
a type, but only the first two have a real class behind them. Setting
`PARMANA_STORAGE=postgres` or `sqlite` throws immediately at startup, by design (fails
closed rather than silently falling back).

| Provider   | Status                                                             | Notes                                                                                                                                                        |
| ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `memory`   | \[AVAILABLE]                                                       | In-process, non-persistent. Used throughout this site's live examples (`PARMANA_STORAGE=memory`) so they have no external dependency.                        |
| `supabase` | \[AVAILABLE] (source), not independently re-verified in this audit | `SupabaseStorageProvider`, `SupabaseBusinessTransactionRepository`, `SupabaseExecutionTrustRecordRepository`. This repo's committed `.env` defaults to this. |
| `postgres` | Declared, not implemented                                          | Throws at startup.                                                                                                                                           |
| `sqlite`   | Declared, not implemented                                          | Throws at startup.                                                                                                                                           |

## What's stored

`packages/storage/src/repositories/`: `ExecutionRepository`, `VerificationRepository`,
`CryptoProofRepository`, plus per-provider `BusinessTransactionRepository` and
`ExecutionTrustRecordRepository` implementations, the append-only ledger backing every
[Execution Trust Record](/concepts/execution-trust-records).

## Configuration

```bash theme={null}
PARMANA_STORAGE=memory     # or supabase
```

`PARMANA_STORAGE` is the only variable read. An older `DATABASE_PROVIDER` variable existed
briefly as a second, disconnected path to the same setting and is now retired: if it's
present in the environment, config loading fails at startup naming `PARMANA_STORAGE` as the
replacement, rather than silently ignoring it. 8 tests, `packages/storage/test/`.
