STAX
A Next.js mini-ERP for managing customers, inventory, sales, invoicing, receipts, payments, and reporting in one place.

The problem
Small businesses tracking customers, stock, and sales across spreadsheets or paper lose time and accuracy. STAX centralizes that workflow into one role-based, auditable system.
Architecture & stack
STAX is built on Next.js 15's App Router with TypeScript throughout the stack. The data layer is a relational schema in PostgreSQL, modeled and queried through Prisma — customers, inventory items, sales, invoices, receipts, and payments are normalized tables with real foreign-key relationships, not flat records, so reporting can join across them directly. Auth.js handles authentication and role-based access, so staff and admin users see different capabilities against the same data. Complex views — the inventory and sales tables in particular — use TanStack Table for sorting, filtering, and pagination over large datasets. Invoice and receipt generation renders structured records into downloadable PDFs. The UI is Tailwind v4 and shadcn/ui components, restyled to a consistent internal design system rather than left on defaults.