From Spreadsheets to a Self-Hosted Mini-ERP: Building an Inventory System with an AI Layer
Inventory at the company I work for used to live in spreadsheets scattered across warehouses. Nobody could see another site's stock, shortages got caught too late, and goods sent out to events came back unreconciled. So I built a replacement — end to end, from the database to the server it runs on. The constraint that shaped everything This wasn't a greenfield side project with unlimited time. It…
The inventory management system at the company the writer works for had become a jumble of spreadsheets spread across warehouses. This made it impossible for any site to see another site's stock, shortages were caught too late and goods sent out to events often came back unreconciled. So, the writer decided to build a replacement system from the database to the server it would run on.
The primary constraint was that the project had to ship, work for non-technical warehouse staff, and run on infrastructure that the writer could maintain alone. This led to the writer abandoning ambitious ideas in favor of reliable, straightforward solutions.
The writer designed a single React Native + Expo client that could compile to both an Android APK and a static web export, with no duplicated code. This allowed for a single codebase to produce two artifacts, facilitating distribution without shipping through app stores. The writer also implemented multi-branch functionality, with each warehouse managing its own inventory independently.
A dedicated events module handled temporary dispatches, automatic reconciliation on return, and ensured that any issues with AI did not bring down the entire system. The AI layer incorporated an admin chatbot, invoice reading through vision, and product-rotation analysis. If there was an issue with the AI layer, such as a missing API key, a timeout, or a rate limit, it did not crash the request pipeline but instead degraded that feature gracefully.
The writer migrated the entire system to a self-hosted VPS, managing it using Coolify. This meant using containerized Postgres, a custom domain, and Let's Encrypt SSL, ensuring zero downtime during the cut-over. The system was completely collapsed into one Docker deployment, with updates delivered directly to users without requiring them to reinstall anything.
The writer, a full stack developer and computer engineering student in Venezuela, is open to remote roles. The full case study, architecture diagram and stack breakdown can be found at https://www.gmarinelly.com/proyectos/inventario.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.