René Cano
All projects

No. 7

Home Inventory System

Household inventory with usage forecasting

My role
Sole author
Period
Dec 2025

The problem

At home, things run out without warning: nobody tracks how fast they're used and the grocery list is built from memory. I wanted an inventory that, beyond counting stock, would flag what's about to run out.

What I built

I built it alone, in 5 commits on December 22 and 23, 2025.

  • A FastAPI service with SQLAlchemy and 4 Alembic migrations: products with a minimum stock level, use and restock movements tied to a user, and a shopping list with checkboxes.
  • A Next.js app for daily use, with sign-in by user and PIN.
  • The days-left estimate: it adds up the last 14 days of use, divides by 14 and works out how many days the current stock will last. It shows items already below their minimum first, then the ones that will run out soonest.
  • A Docker Compose setup with PostgreSQL 16, the API and the frontend.

Architecture

Architecture diagram: the user signs in with a name and PIN to a Next.js app; the app calls a FastAPI service for products, stock movements, the shopping list and users, which stores data in PostgreSQL 16 with 4 Alembic migrations; the three services run in Docker Compose; the days-left forecast is computed in the browser from the last 14 days of use.

Results

It's a personal project with no usage metrics. What can be checked is the code: the schema and its migrations, the API and the days-left calculation.

Known limits

  • The API routes don't require authentication. Sign-in only identifies the user in the frontend, and the session lives in localStorage.
  • The PIN is stored as unsalted SHA-256, and JWT_SECRET is set in docker-compose but never used. Before exposing it outside the home it needs a slow salted hash and real tokens.
  • The forecast runs in the browser over the last 500 movements and is a plain average: it ignores seasons and bulk purchases.
  • There are no tests and no CI.

Links