All Projects
Confidential context: Canteen / retail businessDesktop systemLive

Inventory Management System

Offline stock tracking became an offline desktop inventory system that runs on existing Windows machines.

Inventory Management System cover screenshot

How the project is put together

Architecture map

6 layers / 5 directed links

100%

feedsfeedsfeedsfeedsfeeds
  1. 01
    Interface

    Desktop inventory, POS, reports, staff, scheduling, and settings screens for canteen operations.

    React 18 / TypeScript / MUI / Radix
  2. 02
    Application

    Route-level access, domain hooks, forms, charts, and desktop workflow state.

    React Router / Hooks / Contexts / React Query
  3. 03
    Services/API

    Rust command layer handles auth, inventory, sales, delivery intake, reports, and staff operations.

    Tauri 2 RC / Rust / IPC commands
  4. 04
    Data

    Local database and assets support offline stock, POS, supplier, attendance, and audit flows.

    SQLite / rusqlite / r2d2 / Migrations
  5. 05
    Auth/Permissions

    Local login, role permissions, and protected routes separate admin and staff operations.

    bcrypt / JWT-style tokens / ProtectedRoute / RBAC
  6. 06
    Runtime

    Native desktop runtime and installer packaging for existing Windows machines.

    Tauri / Vite / Cargo / Windows installers

From broken workflow to operating system

Inventory depended on manual counts and internet-dependent tooling was a poor fit.

A native desktop app with local SQLite storage, sub-100ms queries, and a small Windows installer.

The workflow constraint

Small canteen and retail businesses needed an offline-capable, lightweight inventory system that runs on their existing Windows machines without requiring a server or internet connection.

What changed

Native desktop app with sub-100ms queries
~5MB installer vs ~150MB for Electron equivalent
Fully offline — zero internet dependency
Role-based access with secure authentication

Decisions and trade-offs

Tauri over Electron

Needed a lightweight desktop app — Electron bundles Chromium (~150MB), too heavy for the use case.

Decision: Chose Tauri which uses the system webview (WebView2 on Windows), resulting in ~5MB binary vs ~150MB for Electron.

Trade-off: Smaller community and ecosystem than Electron, Rust learning curve, but 97% smaller bundle and lower memory usage.

SQLite over a client-server database

Target environment is a single-machine deployment — no need for network database access.

Decision: SQLite embedded directly in the Tauri Rust backend for zero-config, zero-dependency data persistence.

Trade-off: No concurrent multi-machine access, but perfect for single-store retail use and no setup burden on the end user.

MUI + Tailwind for UI layer

Needed rapid UI development with complex form components (date pickers, selects, data tables).

Decision: Combined MUI for complex pre-built components with Tailwind CSS for custom layout and spacing.

Trade-off: Larger CSS bundle from two styling systems, but significantly faster development with MUI's component library.

Constraints, architecture, and proof

Tauri framework (Rust) hosts a React + TypeScript frontend via Vite. SQLite database stored in the application data directory. MUI and Tailwind CSS for UI components. Recharts for data visualization dashboards. TanStack Query for data fetching from Tauri commands.

Must run entirely offline without a server or internet connection
Must work on Windows 10/11 with minimal system requirements (4GB RAM)
SQLite for local persistence — no external database setup
Distributable as a standard Windows installer (Inno Setup)

Deployment, security, and maintenance

Role-based access control (admin, staff, viewer), secure login system, SQLite WAL mode for crash-resistant writes, local data directory with user-scoped access permissions.

What I would improve next

Add barcode scanning integration via USB scanner input
Implement data export/import for multi-machine sync
Add macOS and Linux builds (Tauri supports all platforms)

Screenshots from the build