Golden Vats Inventory

Offline-first procurement and stores software for a site with no server room.

Category
Desktop inventory & procurement
Stack
Electron · React · TypeScript · SQLite
Status
Packaged · installation pending
Documentation
Complete case study
Department dashboard — screenshot of the running application
HR department in the offline build — the data never leaves the PC.
01

Overview

Golden Vats Inventory is an offline-first desktop application for a manufacturing-style operation. Departments raise material requests, purchasing turns them into orders, stores receive and issue material, and every movement carries an audit trail. It runs on a single SQLite file on the client machine, with no server to maintain.

02

Business context

Departmental procurement is mostly a paper trail: an indent from a department, an approval, a purchase order, a goods receipt, an issue to production, and a statement at month end. When the trail is paper, the closing stock figure is an opinion rather than a calculation.

The site has no server room and no IT staff. The application has to live on one Windows PC, survive being switched off mid-entry, and be restorable from a backup by someone who is not a database administrator.

Both constraints point the same way: a local database with strong rules of its own, packaged as an application a non-technical user can double-click.

03

Problem statement

  • Requests, purchasing, receiving and issuing must form one chain with no re-typing between stages.
  • Stock quantity, value and department-wise consumption have to reconcile without a spreadsheet.
  • Every correction needs a reason and an author, because stock disputes are arguments about history.
  • The install must be a packaged application with a local database that can be backed up and moved.
  • Upgrades must not destroy data on an installed machine.
04

Solution overview

An Electron shell with a React and TypeScript renderer. The Electron main process owns the database and the filesystem; the renderer talks to it over typed IPC channels and never touches SQLite directly.

The schema is applied through numbered migrations with a version table, so an installed client can be upgraded in place. Audit rows and immutability rules are enforced by database triggers, which means they hold even when a code path forgets them.

Documents are part of the product: indents, vouchers, receipts and reports have print templates, because paper still leaves the building.

05

Core modules & workflows

Departments & requests

  • Department master and official department list
  • Material indent forms
  • Approval and status tracking
  • Project-wise request lines

Purchasing

  • Purchase orders and line items
  • Indent vouchers
  • Supplier records
  • Purchase history

Stores

  • Goods receipt and issue
  • Returns and adjustments
  • Stock ledger with opening and closing balances
  • Department-wise issue history

Financial control

  • Financial year handling
  • Historical opening balances
  • Valuation

Documents & reports

  • Printable orders, vouchers and receipts
  • Department report
  • Audit report
  • Stock and consumption reports

Operations

  • Google Drive backup (implemented, unverified)
  • Licence activation
  • LAN mode for multiple machines
06

System architecture

Shell

Electron main process owns the SQLite database, file system access and backup; the renderer has no direct database access.

Interface

React and TypeScript renderer, typed IPC channels between renderer and main process.

Data

SQLite: 42 tables, schema applied through 18 numbered migrations, 19 unique triggers guarding audit and immutability.

Verification

Vitest suite: 22 files, 204 tests passing at last run, executed against a temporary database built from the migrations.

Packaging produces a Windows installer and a portable build. Licence tooling generates and validates activation keys.

07

Technology stack

ElectronReactTypeScriptSQLite

Electron shell, React and TypeScript renderer, SQLite owned by the main process, Vitest for verification. There is no server component at all — that was the point.

08

Engineering decisions

01

Migrations, not a schema file

Numbered migrations with a version table let an installed client upgrade in place. Foreign key enforcement is suspended only for the duration of a migration that needs it, then restored.

02

Triggers own the audit trail

Audit and protection rules live in SQLite triggers rather than application code. On a single-developer codebase that guarantee matters more than the small overhead.

03

Offline-first, one file

A single database file is easier to back up, copy between machines and reason about than a server install. The backup feature copies that file off the machine.

04

The documents are the product

Indents, vouchers, receipts and reports leave the building every day. Their templates were designed and tested as features, not generated at the end.

05

Tests run the real migrations

The suite builds a temporary database by applying migrations, so a schema change is exercised the same way a client upgrade would be.

09

My contribution

Product & architecture

Mine. Workflow model, schema, migration strategy and the audit rules.

Implementation

AI-assisted. Feature code developed with AI assistance against written specifications, reviewed and corrected module by module.

Test suite

Mine in design and review: 204 tests across 22 files covering migrations, workflows, documents and reports.

Packaging & licensing

Mine. Electron build, portable release and the licence activation tooling.

10

Challenges

01

Upgrading without losing data

A client machine may hold years of movements. Migrations run inside a transaction with foreign keys temporarily suspended, and the version table makes a partial upgrade visible instead of silent.

02

Making corrections legitimate

Adjustments are not edits. They are new movements with a reason, an author and a timestamp, and the trigger layer blocks the shortcut.

03

Testing an Electron application properly

The database and business rules were kept out of the renderer so the suite can test them directly, without driving a UI. That is why 204 tests run in about ninety seconds.

04

Shipping to a site with no IT staff

Installer, portable build, backup path and licence activation all had to work without a technician on the phone.

11

Verified results

42 SQLite tables
18 migrations
19 triggers
204 tests passing 22 files
  • 204 tests pass across 22 files at last run. Developer-run Vitest suite, not a CI pipeline.
  • 42 tables, 18 migrations and 19 triggers in the shipped schema.
  • Packaged Windows installer and portable build are ready for installation.
  • No client production deployment has happened yet.
12

Status & limitations

Packaged · installation pending Built, tested and packaged for installation. No client deployment yet.
  • Google Drive backup is implemented but has not been verified against a real client account.
  • LAN mode for multiple machines on one database is implemented but not verified in production.
  • Installation at the client site is pending, so there is no production usage to report.
  • Licensing tooling works; commercial terms are still being settled.
  • Single-developer project.
13

Additional screenshots

Contact

Let’s build something useful.

Have a business workflow to improve, a product idea to develop, or a software role to discuss? Get in touch.

BaseIndia · IST · UTC+05:30