Filament inventory management system for 3D printing enthusiasts and makers.
- Filament Management: Track filament inventory with detailed information (material, color, manufacturer, notes)
- Spool Tracking: Multiple spools per filament with individual weight tracking
- Consumption Logging:
- Manual consumption entry
- Automatic consumption from G-code file upload (Anycubic Slicer Next support)
- Consumption history with filtering and editing
- Template System: Reusable filament templates for quick creation
- Restocking: Add new spools to existing filaments with configurable quantities and weights
- Notifications: Low-stock alerts when filament remaining weight falls below threshold
- Auto-archiving: Spools automatically archive when weight reaches zero
- Modern UI: Clean, responsive design with light/dark mode support
- Inventory Overview: Dashboard with progress bars, color indicators, and low-stock warnings
- Filament Detail Page: Comprehensive view with spool overview, consumption history, and actions
- Modal-based Forms: Streamlined creation and editing experience
- Floating Action Button (FAB): Quick access to common actions (Add Filament, Log Consumption, Restock)
- Custom Color Picker: Visual color selection with most-used colors
- Searchable Dropdowns: Manufacturer autocomplete and filament selection with color dots
- Custom Materials: Add your own material types
- Custom Colors: Extend color palette with hex color picker
- Settings Page: Configure restock threshold and manage custom materials
- Internationalization: Multi-language support (English, German) with easy extension
- Translation Warning: Development mode indicator for missing translations
- API Documentation: Integrated Swagger/OpenAPI documentation
- Database Migrations: Automatic schema migrations on startup
- RESTful API: Complete CRUD operations for all entities
- Type Safety: Full TypeScript implementation
- Single Container: Deploy as one Docker container
- Backend: Node.js + Express + TypeScript
- Database: SQLite (better-sqlite3) with Drizzle ORM
- Frontend: React + TypeScript + Vite
- Validation: Zod
- API Docs: Swagger/OpenAPI (swagger-ui-express, swagger-jsdoc)
- File Upload: Multer (for G-code files)
- Deployment: Docker (multi-stage build)
Option 1: Local Development
- Node.js 18+ (LTS recommended)
- npm or yarn
- Windows users: Visual Studio Build Tools 2022 with "Desktop development with C++" workload
Option 2: Docker Development (Recommended for Windows)
- Docker Desktop
- No build tools needed!
# Install dependencies
npm install
# Start development server (runs both backend and frontend)
npm run devThe application will be available at:
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:8080 - API Documentation:
http://localhost:8080/api-docs
# Build and start
docker-compose up --build
# Application available at http://localhost:8080See Docker Deployment Guide for production deployment details.
SpoolDB/
├── backend/ # Node.js/Express backend
│ ├── src/
│ │ ├── db/ # Database schema, migrations, seeding
│ │ ├── repositories/ # Data access layer
│ │ ├── routes/ # API endpoints
│ │ ├── swagger/ # API documentation config
│ │ ├── types/ # TypeScript type definitions
│ │ └── utils/ # Utilities (G-code parser)
│ └── data/ # SQLite database files
├── frontend/ # React frontend
│ ├── src/
│ │ ├── api/ # API client
│ │ ├── components/ # Reusable UI components
│ │ ├── contexts/ # React contexts (i18n, theme)
│ │ ├── pages/ # Page components
│ │ └── theme/ # Theme configuration
│ └── public/ # Static assets
├── locales/ # Translation files (en.json, de.json)
└── PRD/ # Product Requirements Document
GET /api/filaments- List all filamentsPOST /api/filaments- Create filamentGET /api/filaments/:id- Get filament detailsPUT /api/filaments/:id- Update filamentDELETE /api/filaments/:id- Delete filamentPOST /api/filaments/:id/archive- Archive/unarchive filamentPOST /api/filaments/:id/restock- Restock filament (add spools)
GET /api/spools- List all spoolsGET /api/spools/filament/:filamentId- Get spools for a filamentPOST /api/spools- Create spoolPUT /api/spools/:id- Update spoolDELETE /api/spools/:id- Delete spoolPOST /api/spools/:id/archive- Archive/unarchive spool
GET /api/consumption- List consumption entries (with filters)POST /api/consumption- Create consumption entryGET /api/consumption/:id- Get consumption entryPUT /api/consumption/:id- Update consumption entryDELETE /api/consumption/:id- Delete consumption entry
GET /api/templates- List all templatesPOST /api/templates- Create templateGET /api/templates/:id- Get templatePUT /api/templates/:id- Update templateDELETE /api/templates/:id- Delete template
GET /api/materials- List all materialsPOST /api/materials- Create custom materialDELETE /api/materials/:id- Delete materialGET /api/colors- List all colorsGET /api/colors/most-used- Get 15 most used colorsPOST /api/colors- Create custom colorDELETE /api/colors/:id- Delete color
POST /api/gcode/parse- Parse G-code file and extract metadataPOST /api/gcode/upload- Upload G-code and create consumption entry
GET /api/settings- Get all settingsGET /api/settings/:key- Get specific settingPUT /api/settings/:key- Update settingGET /api/notifications- Get low-stock notifications
GET /api/i18n/list- List available languagesGET /api/i18n/:language- Get translations for language
GET /api-docs- Swagger UI interfaceGET /api-docs.json- OpenAPI specification (JSON)
- Core entity representing a type of filament
- Contains: name, material, color, manufacturer, notes
- Has multiple child spools
- Child entity of filament
- Tracks: starting weight, empty weight, current weight, created/updated timestamps
- Automatically archived when weight reaches zero
- Records filament usage
- Types: manual, success, failed, test
- Links to filament (not individual spool)
- Automatically deducts weight from appropriate spool
- Reusable filament configuration
- Pre-fills filament form when creating from template
- ✅ Milestone 1: Core Data & Backend (SQLite schema, repository layer, REST API)
- ✅ Milestone 2: UI MVP (Full React frontend with all features)
- ✅ Milestone 3: Dockerization (Single-container deployment, configurable via env vars)
- ⏳ Milestone 4: CI/CD (GitHub Actions for GHCR)
- Fork the repository
- Create a feature branch
- Make your changes
- Ensure all features work in both light and dark mode
- Add/update translations if adding new UI strings
- Submit a pull request
MIT