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

How the project is put together
6 layers / 5 directed links
100%
- 01Interface
Desktop inventory, POS, reports, staff, scheduling, and settings screens for canteen operations.
React 18 / TypeScript / MUI / Radix - 02Application
Route-level access, domain hooks, forms, charts, and desktop workflow state.
React Router / Hooks / Contexts / React Query - 03Services/API
Rust command layer handles auth, inventory, sales, delivery intake, reports, and staff operations.
Tauri 2 RC / Rust / IPC commands - 04Data
Local database and assets support offline stock, POS, supplier, attendance, and audit flows.
SQLite / rusqlite / r2d2 / Migrations - 05Auth/Permissions
Local login, role permissions, and protected routes separate admin and staff operations.
bcrypt / JWT-style tokens / ProtectedRoute / RBAC - 06Runtime
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
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.
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.