A 3D model database and WebGL previewer written in Rust featuring a modern Libadwaita interface.
143
A high-performance, containerized 3D model database and WebGL interactive previewer written in Rust (Axum, Tokio, Tower) featuring a modern GTK4 / GNOME Libadwaita interface.
Developed by tiwut (github.com/tiwut).
services:
vault:
build:
context: .
dockerfile: Dockerfile
image: tiwutdev/model3d-vault:latest
container_name: model3d-vault
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./data:/app/data
environment:
- PORT=8080
- DATA_DIR=/app/data
- STATIC_DIR=/app/static
- RUST_LOG=info,model3d_vault=info
labels:
org.opencontainers.image.title: "model3d-vault"
org.opencontainers.image.description: "Professional 3D Model Vault & WebGL Viewer"
org.opencontainers.image.authors: "https://github.com/tiwut"
org.opencontainers.image.source: "https://github.com/tiwut/3D-Vault---Model-Database"
org.opencontainers.image.vendor: "tiwutdev"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
.glb, .gltf, .obj, .stl, .ply, .fbx, .dae, .3mf)..png, .jpg, .jpeg, .webp, .svg, .hdr).docker pull tiwutdev/model3d-vault:latest
docker run -d --name model3d-vault -p 8080:8080 -v $(pwd)/data:/app/data tiwutdev/model3d-vault:latest
docker compose up -d
Visit http://localhost:8080 in your browser.
To stop the container:
docker compose down
Build the Docker Image:
docker build -t tiwutdev/model3d-vault .
Run the Container with Persistent Storage:
docker run -d \
--name model3d-vault \
-p 8080:8080 \
-v $(pwd)/data:/app/data \
tiwutdev/model3d-vault:latest
Check Container Health:
docker inspect --format='{{json .State.Health.Status}}' model3d-vault
Ensure you have Rust (1.80+) installed.
# Run release build
cargo run --release
# The server listens on http://0.0.0.0:8080
| Variable | Default | Description |
|---|---|---|
PORT | 8080 | Port for the HTTP server to bind |
DATA_DIR | ./data | Directory where 3D files and JSON metadata are persisted |
STATIC_DIR | ./static | Directory containing web assets |
RUST_LOG | info | Tracing logger filter level |
| Method | Endpoint | Description |
|---|---|---|
GET | /healthz | System health check ({"status": "healthy"}) |
GET | /api/stats | Aggregated catalog and format statistics |
GET | /api/models | List all models (Supports ?q=query, ?tag=tag, ?format=fmt) |
GET | /api/models/:id | Fetch details and file list for a specific model |
POST | /api/models | Multipart upload to create model with metadata and files |
PUT | /api/models/:id | Update metadata, primary 3D preview file, or cover thumbnail |
DELETE | /api/models/:id | Permanently delete a model and its disk files |
POST | /api/models/:id/files | Append additional 3D files, images, or textures to a model |
GET | /api/models/:id/files/:filename | Stream or download attached file |
3d-DB/
├── Cargo.toml # Rust package manifest & dependencies
├── Dockerfile # Multi-stage optimized Docker build
├── docker-compose.yml # 1-command deployment setup
├── src/
│ ├── main.rs # Axum HTTP server entrypoint
│ ├── models.rs # Data structures (ModelItem, ModelFile, FileKind)
│ ├── store.rs # Disk persistence & in-memory index
│ ├── api.rs # Axum REST endpoints & multipart streaming
│ └── samples.rs # Pre-loaded benchmark models (GLB, OBJ, STL, PLY)
├── static/
│ ├── index.html # GTK4 Libadwaita SPA markup
│ ├── css/
│ │ ├── adwaita.css # GNOME / Libadwaita design tokens (dark/light)
│ │ └── viewer.css # 3D viewport canvas, HUD overlays, inspector
│ ├── js/
│ │ ├── icons.js # Symbolic SVG icons library (no emojis)
│ │ ├── viewer.js # Three.js 3D engine (GLTF, OBJ, STL, PLY)
│ │ └── app.js # Catalog state, search, and upload workflow
│ └── vendor/ # Vendored Three.js & loaders (100% offline)
└── default_assets/ # Embedded reference 3D models & SVG thumbnails
MIT License
Content type
Image
Digest
sha256:3b5926b26…
Size
36 MB
Last updated
8 days ago
docker pull tiwutdev/model3d-vault