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.

• View on GitHub • More from hwong103

A vintage mainframe computer made of 3D printer filament spools connected to a modern laptop.
The modern hobbyist stack combines physical hardware with serverless edge infrastructure.

Key Takeaways

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.

The zero-dollar request lifecycle from static frontend to serverless edge database.

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.

A mechanical sorting machine turning tangled yarn into uniform straight rods.
Data normalization ensures that fuzzy human input becomes strictly typed database records.

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.

FeatureGoogle SheetsSpoolmanfilament-tracker
Hosting Cost$0.00Requires Server/Pi$0.00
Data IntegrityLow (Free text)High (Relational DB)High (SQLite)
Setup ComplexityTrivialHigh (Docker)Medium (Wrangler/GitHub)
API AccessDifficultExcellentExcellent (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.