Filaman is a full-stack IoT solution designed for FabLabs and 3D printing enthusiasts to track 3D printing filament usage in real-time. By combining a Next.js web application with ESP32-based hardware, it automates the tedious process of weighing and logging spools.
- Framework: Next.js (App Router, Server Actions)
- Runtime: Bun (Fastest JavaScript all-in-one toolkit)
- Database: PostgreSQL with Drizzle ORM
- Auth: Custom secure Cookie / Session-based Auth (bcrypt)
- Styling: Tailwind CSS v4
- Automated Tracking: Place a spool on the custom-built scale, scan the NFC tag, and the weight is automatically updated via REST API.
- Real-time Inventory: Keep track of remaining filament across multiple materials and colors.
- Hardware Integration: Custom ESP32 firmware that communicates with the Next.js backend.
- Admin Management: Built-in dashboard to manage users and roles efficiently.
- Mobile-First Design: Optimized for quick checks and updates on the workshop floor.
The system uses an ESP32 connected to:
- An NFC Reader to identify unique filament spools via their UID.
- A Load Cell (HX711) to calculate the remaining weight with precision.
- A REST API bridge to push data directly into the PostgreSQL database.
- Bun installed
- PostgreSQL instance (e.g., Supabase or local)
-
Clone the repository:
git clone https://github.com/LUPLUV/filaman.git cd filaman -
Install dependencies:
bun install
-
Environment Variables: Create a
.env.localfile and add your credentials:DATABASE_URL=your_postgres_url SESSION_PASSWORD=a_secure_random_string_with_at_least_32_characters
-
Database Migration:
bunx drizzle-kit push
-
Run the development server:
bun dev
MIT