PromptStack

Inventory and stock

A system for tracking what stock exists, where it is, and how it moves: products, locations, receipts, issues, transfers, suppliers, purchase orders, and reorder alerts.

You can change every choice once the builder opens.
Core features for the MVP
  • Product catalogue with SKU, unit of measure, and barcode
  • Stock levels per location, with transfers between locations
  • Recorded movements for receipts, issues, adjustments, and returns
  • Suppliers and purchase orders with expected delivery dates
  • Reorder points with low-stock alerts
  • Stock take with variance reporting
  • Barcode scanning from a phone camera
Left for later
  • Batch and serial number tracking with expiry dates
  • Stock valuation reports using FIFO or weighted average
  • Integration with an accounting system

Recommended stack

SectionRecommended
LanguageTypeScript
Frontend frameworkNext.js
UI and stylingTailwind CSSshadcn/ui
BackendNext.js server
API styleServer actions
Database enginePostgreSQL
Database providerNeon
ORM and data accessDrizzle
AuthenticationClerk
Authorization and rolesRole-based access control
SecurityInput validationRate limitingSecurity headers and CSPSecrets managementAudit logs
File storageAWS S3
Background jobs and cronVercel Cron
Email and notificationsResend
Hosting and deploymentVercel
CI/CDGitHub Actions
Monitoring and analyticsSentry
TestingVitestPlaywright
ExtrasCSV and Excel import/exportReports and PDF exportPWA and offlineBackupsDocumentation

Data model draft

Product

Something held in stock.

  • id
  • sku
  • name
  • barcode
  • unitOfMeasure
  • reorderPoint
  • isActive
  • Has many StockLevels
  • Has many StockMovements
Location

A warehouse, shelf, or store where stock is held.

  • id
  • code
  • name
  • parentLocationId
  • isActive
  • Has many StockLevels
  • May belong to one parent Location
StockLevel

The current quantity of one product at one location.

  • id
  • productId
  • locationId
  • quantityOnHand
  • quantityReserved
  • updatedAt
  • Belongs to one Product
  • Belongs to one Location
StockMovement

One recorded change in stock. The ledger the levels are derived from.

  • id
  • productId
  • fromLocationId
  • toLocationId
  • quantity
  • movementType
  • reference
  • recordedById
  • occurredAt
  • Belongs to one Product
  • Belongs to one User as recorder
PurchaseOrder

An order placed with a supplier.

  • id
  • reference
  • supplierId
  • status
  • expectedAt
  • createdAt
  • Belongs to one Supplier
  • Has many PurchaseOrderLines