Back to projects

Shop Inventory & Sales Management System

A multi-tenant inventory and sales system. I separated calculation logic from the app so business rules can be tested independently.

How it works

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
  1. The workflow

    Inventory and POS workflows connect stock movements with financial records.

  2. The rules

    Domain modules separate business logic from facades and database queries.

  3. The calculation

    Pure calculation functions can be unit tested independently.

  4. The data changes

    Prisma transactions group related database changes.

My contribution

  1. System architecture and database schema design
  2. Service layer refactoring using Facade and Domain patterns
  3. Implementation of authentication and RBAC workflows
  4. Development of inventory tracking and financial logic
  5. Creation of unit test suites to verify business requirements
  6. Configuration of CI/CD pipelines and deployment via Vercel

Design & engineering decisions

  1. Service Layer Refactoring into modular subdomains
  2. Implementation of pure functions for calculation engines to facilitate testing
  3. Type safety enforcement using TypeScript and Zod
  4. Database query optimization to manage connection pooling

What it does

  1. Multi-tenant architecture for independent shop data isolation
  2. Hybrid Domain-Driven Design separating Facades, Domain Logics, and DB Queries
  3. Database Transactions via Prisma to manage data concurrency
  4. Stock Availability Engine for real-time inventory adjustments
  5. Automated Financial Postings for Ledgers, Taxes, and Invoices
  6. Role-Based Access Control (RBAC) for permission management
  7. Centralized Audit Trail for logging critical system actions
  8. Unit testing implementation (199 test cases via Vitest)

Technologies

  • Next.js 14
  • TypeScript
  • Prisma ORM
  • PostgreSQL
  • Vitest
  • TailwindCSS
  • NextAuth.js
  • Supabase
  • Zod

Web development and testing

Work with me

Get in touch about development or testing projects.

[email protected]