{"slug": "from-spreadsheets-to-a-self-hosted-mini-erp-building-an-inventory-system-with-an", "title": "From Spreadsheets to a Self-Hosted Mini-ERP: Building an Inventory System with an AI Layer", "summary": "A full-stack developer in Venezuela built a self-hosted mini-ERP inventory system for a multi-warehouse company, replacing scattered spreadsheets with a single React Native + Expo client that compiles to Android and web. The system runs on a single self-hosted VPS managed with Coolify and includes an isolated Claude API layer for an admin chatbot, invoice vision reading, and product-rotation analysis that degrades gracefully if unavailable. It is now in daily use as the company's actual inventory system.", "body_md": "Inventory at the company I work for used to live in spreadsheets scattered\n\nacross warehouses. Nobody could see another site's stock, shortages got\n\ncaught too late, and goods sent out to events came back unreconciled. So I\n\nbuilt a replacement — end to end, from the database to the server it runs on.\n\nThis wasn't a greenfield side project with unlimited time. It had to ship,\n\nwork for non-technical warehouse staff, and run on infrastructure I could\n\nmaintain alone. That constraint killed a lot of \"clean\" ideas in favor of\n\nboring, reliable ones.\n\nInstead of a separate mobile app and web app, I built a single React Native +\n\nExpo client that compiles to both an Android APK and a static web export,\n\nwith no duplicated code:\n\n```\nbash\n# same codebase, two artifacts\neas build --platform android\nexpo export --platform web\n\nDistribution skips app stores entirely — direct APK install, plus JS-only\nOTA updates through EAS Update, so warehouse staff get fixes without\nreinstalling anything.\n\nMulti-branch by design, not by accident\n\nEach warehouse (\"casa\") manages its own inventory independently, with\nequivalences between boxes and loose units handled at the domain layer, not\nbolted on with if statements scattered across the codebase. A dedicated\nevents module handles temporary dispatch — checklist out, automatic\nreconciliation on return.\n\nAn AI layer that can fail without taking the app down\n\nI added a layer on the Claude API for three things: an admin chatbot, invoice\nreading through vision, and product-rotation analysis. The important design\ndecision wasn't the AI part — it was isolating it so that a missing API key,\na timeout, or a rate limit degrades that one feature gracefully instead of\ncrashing the request pipeline. If the AI layer is unavailable, the core\ninventory system doesn't even notice.\n\nThe migration nobody asks about until it's too late\n\nThe system started on Vercel + Render + Supabase — fast to prototype, but\nthree separate billing relationships and three separate points of failure\nfor one internal tool. I migrated everything to a single self-hosted VPS\nmanaged with Coolify: containerized Postgres, own domain, Let's Encrypt SSL,\nzero downtime during the cutover.\n\nThat's the unglamorous part of \"full stack\" that portfolios rarely show —\nnot just writing the API, but being the one who gets paged if the server\nfalls over.\n\nWhere it landed\n\n- In daily use as the company's actual inventory system, not a demo.\n- Three services (web, API, database) collapsed into one Docker deployment.\n- Users get improvements over the air, without reinstalling.\n\nFull case study, architecture diagram and stack breakdown:\nhttps://www.gmarinelly.com/proyectos/inventario\n\nI'm a Full Stack developer and Computer Engineering student in Venezuela,\nopen to remote roles. More projects (including a truck-weighing system with\nreal hardware integration) at https://www.gmarinelly.com.\n```\n\n", "url": "https://wpnews.pro/news/from-spreadsheets-to-a-self-hosted-mini-erp-building-an-inventory-system-with-an", "canonical_source": "https://dev.to/giusseppemarinelly/from-spreadsheets-to-a-self-hosted-mini-erp-building-an-inventory-system-with-an-ai-layer-1e8k", "published_at": "2026-09-15 18:31:04+00:00", "updated_at": "2026-09-15 18:49:13.413898+00:00", "lang": "en", "topics": ["ai-products", "developer-tools", "ai-tools"], "entities": ["Claude API", "React Native", "Expo", "Coolify", "Vercel", "Render", "Supabase", "Venezuela"], "alternates": {"html": "https://wpnews.pro/news/from-spreadsheets-to-a-self-hosted-mini-erp-building-an-inventory-system-with-an", "markdown": "https://wpnews.pro/news/from-spreadsheets-to-a-self-hosted-mini-erp-building-an-inventory-system-with-an.md", "text": "https://wpnews.pro/news/from-spreadsheets-to-a-self-hosted-mini-erp-building-an-inventory-system-with-an.txt", "jsonld": "https://wpnews.pro/news/from-spreadsheets-to-a-self-hosted-mini-erp-building-an-inventory-system-with-an.jsonld"}}