Backend:
- Add User model with username, hashed password, role, is_active
- Add passlib[bcrypt] and python-jose[cryptography] dependencies
- Create auth.py with JWT utilities, password hashing, role checking
- Add /auth endpoints: status, setup, login, me, users CRUD
- Add role-based permission system (viewer/operator/editor/admin)
- Environment: SPOOLMAN_AUTH_ENABLED, SPOOLMAN_AUTH_SECRET_KEY
- Migration for user table
Frontend:
- Add AuthProvider context with login/logout/setup
- Add LoginPage component with setup mode for first user
- Add ProtectedRoute wrapper for auth-required pages
- Add axios interceptor to attach JWT token to requests
- Add User Management tab in Settings (admin only)
- Add translation keys for auth UI
When SPOOLMAN_AUTH_ENABLED=true:
- Users must login to access the app
- First visit shows setup page to create admin account
- Role-based access control for future endpoint protection
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add remaining_weight_lt and remaining_weight_gt filter params to spool API
- Filter uses computed formula: initial_weight - used_weight (falls back to filament.weight)
- Update home page to use queryParams instead of Refine filters
- Fixes low stock badge count on dashboard
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds computed spool statistics to filament list:
- spool_count: Number of non-archived spools of this filament
- total_remaining_weight: Sum of remaining weight across all spools
Backend changes:
- Modified database/filament.py find() to compute stats via subquery
- Added fields to Filament pydantic model in api/v1/models.py
- Updated filament API endpoint to include stats in response
Frontend changes:
- Added fields to IFilament interface
- Added columns to filament list table
- Added translation keys
Closes#15
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create Print Queue page showing pending/completed/cancelled jobs
- Add needs_weighing filter to spool API for flagged spools
- Add IPrintJob interface and needs_weighing to ISpool model
- Add slicer_post_process.py for Elegoo/Orca Slicer integration
- Add translations for print queue feature
- Bump version to 0.23C.3
The workflow:
1. Slicer post-processing script creates pending print job
2. After print, user confirms (deducts filament) or cancels (flags for weighing)
3. Spools needing weigh-in are shown in Print Queue UI
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Backend for tracking print jobs from Elegoo/Orca Slicer:
- PrintJob model: tracks pending/completed/cancelled jobs
- API endpoints: create, list, complete, cancel jobs
- needs_weighing flag on Spool: for cancelled print recalibration
- Database migration for new table and column
Workflow:
1. Slicer post-processing script creates pending job
2. User completes job → auto-deducts filament
3. User cancels job → flags spool for manual weigh-in
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Backend:
- New /api/v1/backup/export endpoint - exports all data as single JSON
- New /api/v1/backup/import endpoint - imports JSON with merge or replace
- Handles vendors, filaments, spools, adjustments, settings
- Remaps IDs to maintain relationships during import
Frontend:
- Added Backup & Restore section to Settings page
- Download Backup button for export
- Import with merge or replace options
- Warning confirmation for replace mode
This enables migrating between PostgreSQL and SQLite databases.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Track history of all spool weight/length adjustments with timestamps and comments:
Backend:
- Add SpoolAdjustment database model with spool_id, timestamp, type, value, comment
- Add Alembic migration for spool_adjustment table
- Add SpoolAdjustment Pydantic model for API responses
- Update use_weight, use_length, and measure functions to record adjustments
- Add GET /api/v1/spool/{id}/adjustments endpoint for history retrieval
- Add optional comment parameter to use/measure endpoints
Frontend:
- Add ISpoolAdjustment interface to spool model
- Add collapsible adjustment history table to spool show page
- Display timestamp, type (weight/length), amount, and comment
- Add translation keys for history table
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Store extruder and bed temperatures as min/max ranges instead of
single values for more accurate filament specifications.
Backend changes:
- Add 4 new columns: settings_extruder_temp_min/max, settings_bed_temp_min/max
- Keep old columns for backward compatibility (marked deprecated)
- Alembic migration copies existing values to both min and max
- Update Pydantic models and API endpoints
Frontend changes:
- Filament model updated with new fields
- Create form uses min/max input pairs with Space.Compact
- Import from external DB populates both min and max with same value
- Label template updated to show ranges: "ET: 190-220 °C"
- Template help includes new tags
Labels now display temperature ranges like "190-220°C" which is more
useful for printing than a single recommended value.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Events are now sent for not only when an object changes but also when one is created or deleted.
For now it's not really possible to subscribe to these events however.
This breaks backwards-compatibility with the websocket messages.