opensource

Inventory App (Pure HTML + JS + IndexedDB)

Offline-first inventory/order/fulfilment web app with modular architecture.

Location

Features

Run

Open in browser:

  1. Open inventory-app/app/index.html directly, or
  2. Use a static server for best module compatibility.

Example (Node static server):

npx serve inventory-app/app

Architecture

How to Extend

  1. Add new store schema in app/core/db.js (STORE_SCHEMAS + version bump).
  2. Create repository in app/app.js.
  3. Add module folder under app/modules/<module> and initialize it in app/app.js.
  4. Emit/listen events via eventBus for refresh flows.

Replacing IndexedDB with APIs/RDBMS Later

The app already uses repository abstractions.

To replace IndexedDB:

  1. Keep module/UI code unchanged.
  2. Replace GenericRepository implementation with API client methods.
  3. Keep same repository method signatures (create, update, delete, get, getAll, queryByIndex).
  4. Keep events the same so refresh behavior remains unchanged.