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

# pnpm monorepo and modular monolith

> Repository and deployment boundaries for the first production version — a pnpm workspace and a Python modular monolith.

# ADR 0001: Organize the neobank as a pnpm monorepo and modular monolith

This record fixes the repository and deployment boundaries for the first production version.

## Context

The product needs one Python API, one background worker, and one React application. Its authorization and financial-operation boundaries will change while Perflo adds partner contracts.

## Decision

Use a pnpm workspace for repository orchestration. Keep the uv-managed Python project under `apps/api`, the React application under `apps/web`, and deploy the API and worker from the same Python package.

Organize the API by business domain. Share pure policies and application services between HTTP handlers and workers.

## Consequences

PostgreSQL transactions can protect idempotency, mandate reservations, and the outbox. API and worker releases remain coupled until an observed scaling or ownership boundary warrants separation.

## Rejected alternatives

* **Independent repositories**: they would make OpenAPI generation and coordinated security changes harder.
* **Microservices**: they would add distributed consistency before domain boundaries are stable.
