# peakthedev-art/workspace architecture

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

- Interactive diagram: https://gitdiagram.com/peakthedev-art/workspace
- Repository: https://github.com/peakthedev-art/workspace

## Overview

WorkSpace is a small FastAPI service described as a local spacecraft access-control API. The only implemented user-facing behavior shown is a root health check that returns a greeting; access-control modules are empty. A separate module configures a PostgreSQL SQLAlchemy engine, but the shown API does not use it. The hardware directories are undocumented here, so their role and connections are omitted.

Main entry points: [`app/main.py`](https://github.com/peakthedev-art/workspace/blob/main/app/main.py) (FastAPI app), [`app/database.py`](https://github.com/peakthedev-art/workspace/blob/main/app/database.py) (DB engine setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API runtime"]
  node_fastapi["FastAPI app<br/>[main.py]"]
  node_health["Health check<br/>[main.py]"]
end

subgraph group_persistence["Database setup"]
  node_dbconfig["DB engine setup<br/>[database.py]"]
end

node_caller(("HTTP client"))
node_postgres[("PostgreSQL")]

node_caller -->|"sends request"| node_fastapi
node_fastapi -->|"registers route"| node_health
node_dbconfig -->|"configures connection"| node_postgres

click node_fastapi "https://github.com/peakthedev-art/workspace/blob/main/app/main.py"
click node_health "https://github.com/peakthedev-art/workspace/blob/main/app/main.py"
click node_dbconfig "https://github.com/peakthedev-art/workspace/blob/main/app/database.py"

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_fastapi,node_health,node_caller toneBlue
class node_dbconfig,node_postgres toneAmber
```

## Components

### API runtime

- [FastAPI app](https://github.com/peakthedev-art/workspace/blob/main/app/main.py): `app/main.py`
- [Health check](https://github.com/peakthedev-art/workspace/blob/main/app/main.py): `app/main.py`

### Database setup

- [DB engine setup](https://github.com/peakthedev-art/workspace/blob/main/app/database.py): `app/database.py`

### Other components

- **HTTP client**
- **PostgreSQL**

## Connections

- HTTP client → FastAPI app: sends request (evidence: `app/main.py`)
- FastAPI app → Health check: registers route (evidence: `app/main.py`)
- DB engine setup → PostgreSQL: configures connection (evidence: `app/database.py`)
