# sullaspqr/dobok architecture

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

- Interactive diagram: https://gitdiagram.com/sullaspqr/dobok
- Repository: https://github.com/sullaspqr/dobok

## Overview

This is a small Express application for managing a drum catalog through CRUD HTTP endpoints. Requests reach the API, which reads and mutates a seeded in-memory array; changes are not shown being persisted to a database. The app also serves static files and exposes generated Swagger documentation. The README describes starting the server, but does not document a separate client workflow. The map reflects the single sampled runtime file; the PDF’s role is unclear.

Main entry points: [`server.js`](https://github.com/sullaspqr/dobok/blob/master/server.js) (Drum CRUD API), [`public`](https://github.com/sullaspqr/dobok/tree/master/public) (Static Files)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Drum API"]
  node_drum_api["Drum CRUD API<br/>[server.js]"]
  node_express_app["Express App<br/>[server.js]"]
end

subgraph group_state["Catalog State"]
  node_drum_state["In-Memory Drums<br/>[server.js]"]
end

subgraph group_support["Serving and Docs"]
  node_swagger_ui["Swagger UI<br/>[server.js]"]
  node_public_files["Static Files"]
end

node_client(("HTTP Client"))

node_client -->|"sends requests"| node_drum_api
node_drum_api -->|"reads and mutates"| node_drum_state
node_drum_api -->|"returns JSON"| node_client
node_express_app -->|"routes requests"| node_drum_api
node_express_app -->|"mounts at /swagger"| node_swagger_ui
node_express_app -->|"serves static files"| node_public_files

click node_drum_api "https://github.com/sullaspqr/dobok/blob/master/server.js"
click node_drum_state "https://github.com/sullaspqr/dobok/blob/master/server.js"
click node_express_app "https://github.com/sullaspqr/dobok/blob/master/server.js"
click node_swagger_ui "https://github.com/sullaspqr/dobok/blob/master/server.js"
click node_public_files "https://github.com/sullaspqr/dobok/tree/master/public"

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_drum_api,node_express_app,node_client toneBlue
class node_drum_state toneAmber
class node_swagger_ui,node_public_files toneMint
```

## Components

### Drum API

- [Drum CRUD API](https://github.com/sullaspqr/dobok/blob/master/server.js): `server.js`
- [Express App](https://github.com/sullaspqr/dobok/blob/master/server.js): `server.js`

### Catalog State

- [In-Memory Drums](https://github.com/sullaspqr/dobok/blob/master/server.js): `server.js`

### Serving and Docs

- [Swagger UI](https://github.com/sullaspqr/dobok/blob/master/server.js): `server.js`
- [Static Files](https://github.com/sullaspqr/dobok/tree/master/public): `public`

### Other components

- **HTTP Client**

## Connections

- HTTP Client → Drum CRUD API: sends requests (evidence: `server.js`)
- Drum CRUD API → In-Memory Drums: reads and mutates (evidence: `server.js`)
- Drum CRUD API → HTTP Client: returns JSON (evidence: `server.js`)
- Express App → Drum CRUD API: routes requests (evidence: `server.js`)
- Express App → Swagger UI: mounts at /swagger (evidence: `server.js`)
- Express App → Static Files: serves static files (evidence: `server.js`)
