mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-21 17:42:16 -05:00
e2a08c0cfd9d61dd35ad03b7cd3f4d3cf6562cfa
The page fetched every spool up front (limit 1000, sorted by location) and re-ran that query on every live spool event. On a 4158-spool collection that was 14.2 s and 1.82 MB, and it silently truncated: 76% of the spools never appeared, so the per-card counts were wrong too. One aggregate query (/spool/group?group_by=location, 10 ms / 2.1 KB) now supplies every location and its exact count, and each card fetches its own spools 30 at a time — starting when it scrolls into view, continuing as its list is scrolled, capped at three requests in flight so a screenful of cards doesn't queue behind the browser's per-host connection limit. Card bodies get a max height and scroll internally. Live spool events are applied to the loaded cards directly, with a single debounced aggregate refresh to re-authorize the counts, rather than reloading everything. Because a card now holds a page rather than the whole location, its saved custom spool order can only speak for what is loaded; ids from the previous order that aren't loaded are carried over behind the loaded ones instead of being dropped. Also fixes shelf reordering, which never worked under Svelte 5. The grid's drag zone was armed by setting dragDisabled from the grip's own mousedown handler, but svelte-dnd-action only attaches its mousedown/touchstart listeners while dragDisabled is already false, and Svelte 5 flushes state changes asynchronously — so the action updated after the press had passed and the drag was never seen. Arm it from pointerdown (which precedes both mousedown and touchstart) via flushSync so the listener is in place in time. Claude-Session: https://claude.ai/code/session_014Cwk5Yyze9yPvkYkUtMAP4
Keep track of your inventory of 3D-printer filament spools.
Spoolman is a self-hosted web service designed to help you efficiently manage your 3D printer filament spools and monitor their usage. It acts as a centralized database that seamlessly integrates with popular 3D printing software like OctoPrint and Klipper/Moonraker. When connected, it automatically updates spool weights as printing progresses, giving you real-time insights into filament usage.
Features
- Filament Management: Keep comprehensive records of filament types, manufacturers, and individual spools.
- API Integration: The REST API allows easy integration with other software, facilitating automated workflows and data exchange.
- Real-Time Updates: Stay informed with live spool updates through Websockets, providing immediate feedback during printing operations.
- Central Filament Database: A community-supported database of manufacturers and filaments simplify adding new spools to your inventory. Contribute by heading to SpoolmanDB.
- Web-Based Client: Spoolman includes a built-in web client that lets you manage data effortlessly:
- View, create, edit, and delete filament data.
- Add custom fields to tailor information to your specific needs.
- Print labels with QR codes for easy spool identification and tracking.
- Contribute to its translation into 18 languages via Weblate.
- Database Support: SQLite, PostgreSQL, MySQL, and CockroachDB.
- Multi-Printer Management: Handles spool updates from several printers simultaneously.
- Advanced Monitoring: Integrate with Prometheus for detailed historical analysis of filament usage, helping you track and optimize your printing processes. See the Wiki for instructions on how to set it up.
Spoolman integrates with:
- Moonraker and most front-ends (Fluidd, KlipperScreen, Mainsail, ...)
- OctoPrint
- OctoEverywhere
- Home Assistant
- MCP Server - Manage your filament inventory through AI assistants like Claude using the Model Context Protocol
Installation
Please see the Installation page on the Wiki for details how to install Spoolman.
Description
Keep track of your inventory of 3D-printer filament spools.
Readme
MIT
15 MiB
0 Stars
1 Watchers
0 Forks