Devsdesk
← Index
Full-StackSaaSMulti-TenantReal-TimeReactNode.js

Inventory System

Multi-tenant SaaS inventory platform giving small teams real-time stock visibility across warehouses — shipped as both hosted SaaS and a self-hosted Docker stack from a single codebase.

stock.devsdesk.site
Inventory System — primary screen
Fig. 01 · Dashboard

Problem

Small businesses managing stock across multiple warehouses lack affordable, modern tools for centralized inventory visibility, low-stock alerts, and audit trails. Most existing options are either enterprise-priced or stuck in spreadsheet territory.

Architecture

  1. H01

    Two deployment modes from one codebase

    A DEPLOYMENT_MODE flag switches between SaaS (shared infra, many tenants) and self-hosted (single tenant, single compose stack).

  2. H02

    Strict tenant isolation

    Enforced at both the database layer (tenant-scoped collections) and the application layer (request middleware).

  3. H03

    ACID multi-document transactions

    Replica-set MongoDB enables atomic stock-movement operations that touch products, stock levels, and audit logs in one transaction.

  4. H04

    Background workers keep requests fast

    8 BullMQ queues handle KPI aggregation, search indexing, alert evaluation, email dispatch, and CSV imports off the request path.

  5. H05

    Shared-infra hosting pattern

    Caddy and MongoDB deployed once per VPS and shared across projects via external Docker networks. Each project ships only its own Redis, MeiliSearch, and app containers.

Product gallery · 6 views

Inventory System — Dashboard
Fig. 02Dashboard
Inventory System — Products
Fig. 03Products
Inventory System — Stocks
Fig. 04Stocks
Inventory System — Reports
Fig. 05Reports
Inventory System — Import
Fig. 06Import
Inventory System — Purchase Order
Fig. 07Purchase Order

Key features

Stack

Frontend

React 19ViteTypeScriptTailwind CSS 4shadcn/uiTanStack Query / Table / VirtualReact Router 7ZustandSocket.IO ClientRechartsReact Hook Form + Zod

Backend

Node.js 20ExpressTypeScriptMongoose 8BullMQSocket.IOMeiliSearch SDKJWT with refresh-token rotationHelmet / rate-limit / sanitization

Data

MongoDB 7 (replica set, transactions)Redis 7 (sessions, BullMQ, cache)MeiliSearch v1.7

Infra

DockerDocker ComposeCaddy with auto Let's EncryptOracle Cloud ARM64 VPS

Status

Live and in active development

04 — Start a project

An idea, an existing app, or something in between?

Tell us what you're trying to ship. We reply within one business day with a written take on scope and timeline — not a sales pitch.