# jedbonheur/dtpm architecture

> Architecture diagram of the GitHub repository jedbonheur/dtpm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jedbonheur/dtpm
- Repository: https://github.com/jedbonheur/dtpm

## Overview

This repository is a Phase 0 skeleton for a Montreal immediate-delivery marketplace, not yet an implemented delivery workflow. The only demonstrated request-to-result path is an HTTP health request handled by the API, which returns a health payload with a per-request correlation ID. The API also exposes example error responses and initializes configuration and logging. Sender, driver, admin, worker, domain, and persistence product behavior is not demonstrated in the sampled sources, so they are not connected speculatively. The database and Redis are configuration values only here.

Main entry points: [`apps/api/src/index.ts`](https://github.com/jedbonheur/dtpm/blob/master/apps/api/src/index.ts) (API server), [`packages/config/src/index.ts`](https://github.com/jedbonheur/dtpm/blob/master/packages/config/src/index.ts) (Environment config), [`packages/observability/src/index.ts`](https://github.com/jedbonheur/dtpm/blob/master/packages/observability/src/index.ts) (Correlation and errors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_api_server["API server<br/>[index.ts]"]
  node_health_response["Health response<br/>[index.ts]"]
end

subgraph group_shared["Shared foundations"]
  node_config["Environment config<br/>[index.ts]"]
  node_observability["Correlation and errors<br/>[index.ts]"]
end

node_caller(("HTTP caller"))

node_caller -->|"requests health"| node_api_server
node_api_server -->|"returns payload"| node_health_response
node_api_server -->|"loads settings"| node_config
node_api_server -->|"creates IDs and logs"| node_observability

click node_api_server "https://github.com/jedbonheur/dtpm/blob/master/apps/api/src/index.ts"
click node_config "https://github.com/jedbonheur/dtpm/blob/master/packages/config/src/index.ts"
click node_observability "https://github.com/jedbonheur/dtpm/blob/master/packages/observability/src/index.ts"
click node_health_response "https://github.com/jedbonheur/dtpm/blob/master/apps/api/src/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api_server,node_health_response toneBlue
class node_config,node_observability toneAmber
class node_caller toneIndigo
```

## Components

### API runtime

- [API server](https://github.com/jedbonheur/dtpm/blob/master/apps/api/src/index.ts): `apps/api/src/index.ts`
- [Health response](https://github.com/jedbonheur/dtpm/blob/master/apps/api/src/index.ts): `apps/api/src/index.ts`

### Shared foundations

- [Environment config](https://github.com/jedbonheur/dtpm/blob/master/packages/config/src/index.ts): `packages/config/src/index.ts`
- [Correlation and errors](https://github.com/jedbonheur/dtpm/blob/master/packages/observability/src/index.ts): `packages/observability/src/index.ts`

### Other components

- **HTTP caller**

## Connections

- HTTP caller → API server: requests health (evidence: `apps/api/src/index.ts`)
- API server → Health response: returns payload (evidence: `apps/api/src/index.ts`)
- API server → Environment config: loads settings (evidence: `apps/api/src/index.ts`)
- API server → Correlation and errors: creates IDs and logs (evidence: `apps/api/src/index.ts`)
