> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manthan.systems/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 (`DATABASE_PROVIDER=memory 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](/trust-record/overview).

## Configuration

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

Both env vars are read; this repo's routes and examples set both to the same value. 8
tests, `packages/storage/test/`.
