The Zero-Dollar Database: How filament-tracker Perfects the Hobbyist Stack
A masterclass in using Cloudflare D1 and GitHub Pages to build a permanent, serverless inventory system for 3D printing enthusiasts.
- Cloudflare D1 and GitHub Pages enable a professional database stack with zero recurring hosting costs.
- A dedicated normalization layer transforms inconsistent human input into standardized relational data.
- Edge-based passcode validation provides sufficient security for personal tools without the complexity of full user authentication.
- The project demonstrates a middle ground between brittle spreadsheets and resource-heavy self-hosted Docker containers.
The Sovereign Hobbyist Stack
Most people associate a dedicated database application with recurring monthly server costs. For hobbyists managing 3D printer filament, the traditional choices are stark. You can either wrestle with a messy Google Sheet or deploy a heavy Docker container on a Raspberry Pi. The filament-tracker repository takes a third path. It leverages the modern edge to create a professional-grade inventory system that costs exactly zero dollars to run.
The architecture relies entirely on generous free tiers. The React frontend is hosted statically on GitHub Pages. The backend logic runs on Cloudflare Workers. Persistence is handled by Cloudflare D1, a serverless SQLite database. This combination forms a sovereign stack that requires zero maintenance and outlives the hardware it tracks.
Beyond the Spreadsheet
Moving from a spreadsheet to a relational database requires a bridge. The project includes a custom Node script designed specifically to ingest fuzzy human data. A user might type 'PLA+' one day and 'pla plus' the next. The system uses a dedicated normalization layer to clean and standardize this text before it ever reaches the database.
Security Without the Overhead
Implementing OAuth or JWT sessions for a single-user personal tool is an architectural overreaction. Instead, filament-tracker uses a pragmatic security model. Read access is entirely public, allowing the user to check their inventory from any device. Write operations require a simple, shared alphanumeric passcode.
const token = request.headers.get('Authorization')?.replace('Bearer ', '');
if (token !== env.EDIT_TOKEN) {
return new Response('Unauthorized', { status: 401 });
}
This single check happens at the edge within the Cloudflare Worker. It provides exactly the right amount of friction to stop random internet edits without burdening the developer with user management scaffolding.
The Competitive Landscape
The 3D printing community has built several ways to track plastic. Heavyweight options offer incredible power but demand infrastructure. Spreadsheets offer zero friction but terrible data integrity. This project strikes a deliberate balance.
| Feature | Google Sheets | Spoolman | filament-tracker |
|---|---|---|---|
| Hosting Cost | $0.00 | Requires Server/Pi | $0.00 |
| Data Integrity | Low (Free text) | High (Relational DB) | High (SQLite) |
| Setup Complexity | Trivial | High (Docker) | Medium (Wrangler/GitHub) |
| API Access | Difficult | Excellent | Excellent (REST) |
The Future of Small Tools
The era of paying five dollars a month to host a tiny personal database is over. By combining edge compute with static hosting, developers can now build permanent utilities that cost nothing. The filament-tracker repository is not just an inventory app. It is a blueprint for the next decade of personal software.