docs: Update CLAUDE.md with Issue #10 and Docker deployment notes
Some checks failed
CI / style (push) Has been cancelled
CI / build-client (push) Has been cancelled
CI / build-amd64 (push) Has been cancelled
CI / build-tester (push) Has been cancelled
CI / test (cockroachdb) (push) Has been cancelled
CI / test (mariadb) (push) Has been cancelled
CI / test (postgres) (push) Has been cancelled
CI / test (sqlite) (push) Has been cancelled
CI / build-arm64 (push) Has been cancelled
CI / build-armv7 (push) Has been cancelled
CI / publish-images (push) Has been cancelled
CI / publish-release (push) Has been cancelled
Some checks failed
CI / style (push) Has been cancelled
CI / build-client (push) Has been cancelled
CI / build-amd64 (push) Has been cancelled
CI / build-tester (push) Has been cancelled
CI / test (cockroachdb) (push) Has been cancelled
CI / test (mariadb) (push) Has been cancelled
CI / test (postgres) (push) Has been cancelled
CI / test (sqlite) (push) Has been cancelled
CI / build-arm64 (push) Has been cancelled
CI / build-armv7 (push) Has been cancelled
CI / publish-images (push) Has been cancelled
CI / publish-release (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
35
CLAUDE.md
35
CLAUDE.md
@@ -135,6 +135,7 @@ This is a fork with UX improvements. Issues are tracked on the Gitea instance ab
|
||||
| 7 | 3dfilamentprofiles Integration | ✅ DONE |
|
||||
| 8 | (see Gitea #8) | ✅ DONE |
|
||||
| 9 | Hierarchical Locations (Room/Bin) | Open |
|
||||
| 10 | Database Import/Export | ✅ DONE |
|
||||
|
||||
### Issue #1 Complete - Inline Creation Modals
|
||||
|
||||
@@ -241,6 +242,28 @@ Data mapping (3dfp → Spoolman):
|
||||
- Diameter defaults to 1.75mm (3dfp doesn't provide)
|
||||
- Density from material lookup table
|
||||
|
||||
### Issue #10 Complete - Database Import/Export
|
||||
|
||||
Full backup/restore functionality for migrating between databases (PostgreSQL ↔ SQLite).
|
||||
|
||||
Backend (`spoolman/api/v1/backup.py`):
|
||||
- `GET /api/v1/backup/export` - Downloads all data as single JSON file
|
||||
- `POST /api/v1/backup/import` - Imports JSON with `replace` option
|
||||
- Exports: vendors, filaments, spools, spool_adjustments, settings
|
||||
- Handles ID remapping to maintain relationships
|
||||
- Requires `python-multipart` package for file uploads
|
||||
|
||||
Frontend (`client/src/pages/settings/generalSettings.tsx`):
|
||||
- "Backup & Restore" section in Settings page
|
||||
- "Download Backup" button for export
|
||||
- File upload with "Import (Merge)" or "Import (Replace All)" options
|
||||
- Confirmation dialog for destructive replace operation
|
||||
|
||||
Migration workflow:
|
||||
1. Export from PostgreSQL instance via Settings → Download Backup
|
||||
2. Reconfigure container for SQLite
|
||||
3. Import via Settings → Import (Replace All)
|
||||
|
||||
---
|
||||
|
||||
## Local Development Setup
|
||||
@@ -292,5 +315,15 @@ The 3dfp GitHub repo only contains sample data (3 filaments). The full dataset m
|
||||
- Waiting for them to publish full JSON exports
|
||||
- Current implementation uses `sample-filaments.json` from the repo
|
||||
|
||||
### Next Up: Issue #9 - Hierarchical Locations
|
||||
### Next Up: Docker Deployment to Unraid
|
||||
Build and deploy this fork as a Docker container on Unraid with SQLite.
|
||||
|
||||
Steps:
|
||||
1. Build Docker image from this repo
|
||||
2. Push to registry (Docker Hub or Gitea)
|
||||
3. Deploy on Unraid with br0 network (own IP)
|
||||
4. Use SQLite (no external DB dependency)
|
||||
5. Import data via Settings → Import
|
||||
|
||||
### Future: Issue #9 - Hierarchical Locations
|
||||
Add room/bin/shelf support for locations. See Gitea issue #9 for details.
|
||||
|
||||
Reference in New Issue
Block a user