The workflow
Inventory and POS workflows connect stock movements with financial records.
The rules
Domain modules separate business logic from facades and database queries.
The calculation
Pure calculation functions can be unit tested independently.
The data changes
Prisma transactions group related database changes.
Shop Inventory & Sales Management System
A multi-tenant inventory and POS system connecting stock movements, financial records, and role-based access. Built with Next.js and TypeScript, with business logic separated into domain modules and calculation functions that can be unit tested independently.
- Fullstack Developer
- Next.js 14, TypeScript, Prisma ORM, PostgreSQL, Vitest
How do you test a calculation without running the whole app?
Stock movements, financial records, and access permissions meet in one application. Read the work through its workflow, business rules, calculations, and data changes.
Look inside this system
Shop Inventory ERP landing page with an embedded dashboard preview.
My contribution
- System architecture and database schema design
- Service layer refactoring using Facade and Domain patterns
- Implementation of authentication and RBAC workflows
- Development of inventory tracking and financial logic
- Creation of unit test suites to verify business requirements
- Configuration of CI/CD pipelines and deployment via Vercel
Design & engineering decisions
- Service Layer Refactoring into modular subdomains
- Implementation of pure functions for calculation engines to facilitate testing
- Type safety enforcement using TypeScript and Zod
- Database query optimization to manage connection pooling
What it does
- Multi-tenant architecture for independent shop data isolation
- Hybrid Domain-Driven Design separating Facades, Domain Logics, and DB Queries
- Database Transactions via Prisma to manage data concurrency
- Stock Availability Engine for real-time inventory adjustments
- Automated Financial Postings for Ledgers, Taxes, and Invoices
- Role-Based Access Control (RBAC) for permission management
- Centralized Audit Trail for logging critical system actions
- Unit testing implementation (199 test cases via Vitest)