🌐Web AppsYear: 2025Complete

Sajjad Inventory

An offline-capable inventory-management PWA — stock-in, dispatch, history and Excel export.

HTML/CSS/JSIndexedDBPWA / Service WorkerChart.jsSheetJSflatpickr

What it is

A Persian, right-to-left inventory management app that runs entirely in the browser. Data lives in the browser’s IndexedDB, a service worker caches the assets, and the whole app works offline — like a desktop app, with no server.

The UI uses the Vazirmatn typeface and a Persian (Jalali) flatpickr date picker, and the product name comes from its user: “Sajjad — Inventory Management”.

Feature highlights

  • User login / registration with profiles
  • Item management — create, edit, search with suggestions (updateItemSuggestions), categories
  • Stock-in & dispatch — receive goods into the warehouse (saveItem) and dispatch them out (dispatchItem) with stock tracking
  • Full history — every transaction (displayHistory)
  • Low-stock alertscheckLowStock flags items running out
  • Inventory chartsupdateInventoryChart built on Chart.js, synced to light/dark theme (updateChartTheme)
  • Excel export — via SheetJS (xlsx.full.min.js)
  • PWA — manifest, icons, installable; versioned caching (sajjad-inventory-v24) in sw.js
  • UX details — toast feedback (showToast) and debounced search (debounce)

Project structure

index.html            # UI (Persian RTL)
script.js (773 lines) # logic: IndexedDB, CRUD, charts, Excel export
style.css (816 lines) # Persian styling with Vazirmatn
sw.js (64 lines)      # PWA service worker (full cache + offline)
manifest.webmanifest  # PWA manifest
cs.js                 # Jalali (Shamsi) date conversion helper
xlsx.full.min.js      # SheetJS for Excel export

Getting started

Put the files on any static host (or just open index.html) — no build step, no server dependency. To install it as an app, use the browser’s “Add to Home Screen”; the service worker caches everything for offline use.

Why it stands out

This project proves you can ship a genuinely useful product with zero framework dependencies: an IndexedDB database, an offline service worker, charts and Excel export — all in 773 lines of clean, self-contained JavaScript. The Persian UX (RTL, Vazirmatn, Jalali calendar) is designed in from day one, not bolted on.

More projects