# moddroid94/stlvault architecture

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

- Interactive diagram: https://gitdiagram.com/moddroid94/stlvault
- Repository: https://github.com/moddroid94/stlvault

## Overview

STLVault is a web-based library manager for 3D-printable models. A user organizes a collection through the frontend, which calls the FastAPI backend for model and folder operations; the backend persists metadata in SQLite and model files in storage. The interface also supports URL imports, print groups, manuals, settings, search, slicer launching, and 3D previews. Edges reflect shown imports/calls or README-documented capabilities; some backend routes and persistence details are only partially excerpted.

Main entry points: [`frontend/App.tsx`](https://github.com/moddroid94/stlvault/blob/main/frontend/App.tsx) (App coordinator), [`backend/app.py`](https://github.com/moddroid94/stlvault/blob/main/backend/app.py) (REST API), [`frontend/services/api.ts`](https://github.com/moddroid94/stlvault/blob/main/frontend/services/api.ts) (API client), [`frontend/components/ModelList.tsx`](https://github.com/moddroid94/stlvault/blob/main/frontend/components/ModelList.tsx) (Model list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Library interface"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_sidebar["Folder navigation<br/>[Sidebar.tsx]"]
  node_model_list["Model list<br/>[ModelList.tsx]"]
  node_detail["Model details<br/>[DetailPanel.tsx]"]
  node_navbar["Navigation bar<br/>[Navbar.tsx]"]
  node_settings["Settings<br/>[Settings.tsx]"]
end

subgraph group_model["Model workflows"]
  node_manual["Manual editor<br/>[ManualModal.tsx]"]
  node_viewer["3D viewer<br/>[Viewer3D.tsx]"]
  node_step_loader["STEP loader<br/>[STEPLoader.tsx]"]
  node_thumbnail["Thumbnail generator"]
  node_group_view["Print group view<br/>[modelGroupView.ts]"]
end

subgraph group_backend["Backend services"]
  node_api_client["API client<br/>[api.ts]"]
  node_backend_api["REST API<br/>[app.py]"]
  node_printables["Printables importer<br/>[printables.py]"]
  node_makerworld["MakerWorld importer<br/>[makerworld.py]"]
end

subgraph group_storage["Persistence and files"]
  node_sqlite[("SQLite database<br/>[app.py]")]
  node_model_files["Model and manual files<br/>[app.py]"]
end

node_user(("Library user"))
node_printables_service{{"Printables service"}}
node_makerworld_service{{"MakerWorld service"}}

node_user -->|"uses"| node_app
node_app -->|"renders"| node_sidebar
node_app -->|"renders"| node_model_list
node_app -->|"renders"| node_detail
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_settings
node_app -->|"renders"| node_manual
node_app -->|"calls"| node_api_client
node_app -->|"generates thumbnails"| node_thumbnail
node_detail -->|"renders"| node_viewer
node_detail -->|"generates thumbnails"| node_thumbnail
node_viewer -->|"loads STEP"| node_step_loader
node_thumbnail -->|"loads STEP"| node_step_loader
node_model_list -->|"uses"| node_group_view
node_model_list -->|"gets slicer settings"| node_api_client
node_manual -->|"loads manual URL"| node_api_client
node_api_client -->|"sends API requests"| node_backend_api
node_backend_api -->|"reads and writes"| node_sqlite
node_backend_api -->|"stores and serves"| node_model_files
node_backend_api -->|"dispatches import"| node_printables
node_backend_api -->|"dispatches import"| node_makerworld
node_printables -->|"requests model data"| node_printables_service
node_makerworld -.->|"imports from"| node_makerworld_service

click node_app "https://github.com/moddroid94/stlvault/blob/main/frontend/App.tsx"
click node_sidebar "https://github.com/moddroid94/stlvault/blob/main/frontend/components/Sidebar.tsx"
click node_model_list "https://github.com/moddroid94/stlvault/blob/main/frontend/components/ModelList.tsx"
click node_detail "https://github.com/moddroid94/stlvault/blob/main/frontend/components/DetailPanel.tsx"
click node_navbar "https://github.com/moddroid94/stlvault/blob/main/frontend/components/Navbar.tsx"
click node_settings "https://github.com/moddroid94/stlvault/blob/main/frontend/components/Settings.tsx"
click node_manual "https://github.com/moddroid94/stlvault/blob/main/frontend/components/ManualModal.tsx"
click node_viewer "https://github.com/moddroid94/stlvault/blob/main/frontend/components/Viewer3D.tsx"
click node_step_loader "https://github.com/moddroid94/stlvault/blob/main/frontend/components/STEPLoader.tsx"
click node_thumbnail "https://github.com/moddroid94/stlvault/blob/main/frontend/services/thumbnailGenerator.ts"
click node_group_view "https://github.com/moddroid94/stlvault/blob/main/frontend/services/modelGroupView.ts"
click node_api_client "https://github.com/moddroid94/stlvault/blob/main/frontend/services/api.ts"
click node_backend_api "https://github.com/moddroid94/stlvault/blob/main/backend/app.py"
click node_printables "https://github.com/moddroid94/stlvault/blob/main/backend/importers/printables.py"
click node_makerworld "https://github.com/moddroid94/stlvault/blob/main/backend/importers/makerworld.py"
click node_sqlite "https://github.com/moddroid94/stlvault/blob/main/backend/app.py"
click node_model_files "https://github.com/moddroid94/stlvault/blob/main/backend/app.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_app,node_sidebar,node_model_list,node_detail,node_navbar,node_settings,node_user toneBlue
class node_manual,node_viewer,node_step_loader,node_thumbnail,node_group_view toneAmber
class node_api_client,node_backend_api,node_printables,node_makerworld toneMint
class node_sqlite,node_model_files toneRose
class node_printables_service,node_makerworld_service toneIndigo
```

## Components

### Library interface

- [App coordinator](https://github.com/moddroid94/stlvault/blob/main/frontend/App.tsx): `frontend/App.tsx`
- [Folder navigation](https://github.com/moddroid94/stlvault/blob/main/frontend/components/Sidebar.tsx): `frontend/components/Sidebar.tsx`
- [Model list](https://github.com/moddroid94/stlvault/blob/main/frontend/components/ModelList.tsx): `frontend/components/ModelList.tsx`
- [Model details](https://github.com/moddroid94/stlvault/blob/main/frontend/components/DetailPanel.tsx): `frontend/components/DetailPanel.tsx`
- [Navigation bar](https://github.com/moddroid94/stlvault/blob/main/frontend/components/Navbar.tsx): `frontend/components/Navbar.tsx`
- [Settings](https://github.com/moddroid94/stlvault/blob/main/frontend/components/Settings.tsx): `frontend/components/Settings.tsx`

### Model workflows

- [Manual editor](https://github.com/moddroid94/stlvault/blob/main/frontend/components/ManualModal.tsx): `frontend/components/ManualModal.tsx`
- [3D viewer](https://github.com/moddroid94/stlvault/blob/main/frontend/components/Viewer3D.tsx): `frontend/components/Viewer3D.tsx`
- [STEP loader](https://github.com/moddroid94/stlvault/blob/main/frontend/components/STEPLoader.tsx): `frontend/components/STEPLoader.tsx`
- [Thumbnail generator](https://github.com/moddroid94/stlvault/blob/main/frontend/services/thumbnailGenerator.ts): `frontend/services/thumbnailGenerator.ts`
- [Print group view](https://github.com/moddroid94/stlvault/blob/main/frontend/services/modelGroupView.ts): `frontend/services/modelGroupView.ts`

### Backend services

- [API client](https://github.com/moddroid94/stlvault/blob/main/frontend/services/api.ts): `frontend/services/api.ts`
- [REST API](https://github.com/moddroid94/stlvault/blob/main/backend/app.py): `backend/app.py`
- [Printables importer](https://github.com/moddroid94/stlvault/blob/main/backend/importers/printables.py): `backend/importers/printables.py`
- [MakerWorld importer](https://github.com/moddroid94/stlvault/blob/main/backend/importers/makerworld.py): `backend/importers/makerworld.py`

### Persistence and files

- [SQLite database](https://github.com/moddroid94/stlvault/blob/main/backend/app.py): `backend/app.py`
- [Model and manual files](https://github.com/moddroid94/stlvault/blob/main/backend/app.py): `backend/app.py`

### Other components

- **Library user**
- **Printables service**
- **MakerWorld service**

## Connections

- Library user → App coordinator: uses (evidence: `README.md`)
- App coordinator → Folder navigation: renders (evidence: `frontend/App.tsx`)
- App coordinator → Model list: renders (evidence: `frontend/App.tsx`)
- App coordinator → Model details: renders (evidence: `frontend/App.tsx`)
- App coordinator → Navigation bar: renders (evidence: `frontend/App.tsx`)
- App coordinator → Settings: renders (evidence: `frontend/App.tsx`)
- App coordinator → Manual editor: renders (evidence: `frontend/App.tsx`)
- App coordinator → API client: calls (evidence: `frontend/App.tsx`)
- App coordinator → Thumbnail generator: generates thumbnails (evidence: `frontend/App.tsx`)
- Model details → 3D viewer: renders (evidence: `frontend/components/DetailPanel.tsx`)
- Model details → Thumbnail generator: generates thumbnails (evidence: `frontend/components/DetailPanel.tsx`)
- 3D viewer → STEP loader: loads STEP (evidence: `frontend/components/Viewer3D.tsx`)
- Thumbnail generator → STEP loader: loads STEP (evidence: `frontend/services/thumbnailGenerator.ts`)
- Model list → Print group view: uses (evidence: `frontend/services/modelGroupView.ts`)
- Model list → API client: gets slicer settings (evidence: `frontend/components/ModelList.tsx`)
- Manual editor → API client: loads manual URL (evidence: `frontend/components/ManualModal.tsx`)
- API client → REST API: sends API requests (evidence: `README.md`)
- REST API → SQLite database: reads and writes (evidence: `backend/app.py`)
- REST API → Model and manual files: stores and serves (evidence: `backend/app.py`)
- REST API → Printables importer: dispatches import (evidence: `backend/app.py`)
- REST API → MakerWorld importer: dispatches import (evidence: `backend/app.py`)
- Printables importer → Printables service: requests model data (evidence: `backend/importers/printables.py`)
- MakerWorld importer → MakerWorld service: imports from
