ERP system for CV Hafidz Buana Abadi (plywood factory), built using monorepo with Turborepo + pnpm.
All monetary values use Decimal(19,4) to eliminate floating-point errors, posted journals are immutable (corrections via reversal only), and every mutation is captured in an append-only audit log. Soft deletes on master data prevent accidental loss of financial history, and a custom COA migration pipeline preserved all 281 accounts — including 43 monthly VAT accounts — from the client's existing data export.
Tech: Prisma 6, PostgreSQL 16, Decimal.js, Zod
Schema changes in Prisma flow through Zod validators and tRPC routers directly into typed React Query hooks, catching contract mismatches at compile time instead of runtime. The Turborepo monorepo shares types across database, api, shared, and web packages, with session-aware protectedProcedure middleware enforcing per-company data isolation on every query.
Tech: tRPC v11, Prisma 6, Zod, TanStack Query, TypeScript 5, Turborepo, pnpm workspaces