HomeIdentityEngineeringContact
Back to All Projects
FEATURED08 / 10

Inventory Management

Enterprise-grade inventory system with e-commerce integration, live counter billing, advanced audit logging, staff performance tracking, and SKU label printing.

Next.jsPostgreSQLPrismaVercelReactNode.js
Live Demo View Source

Demo Credentials

Admin
admin
admin123
Manager
manager
manager123
Staff
staff
staff123
Solo Project
Live
E-Commerce Sync
Real-time
Counter Billing
Advanced
Audit Logging
SKU
Label Printing

The Challenge

SMEs struggle with disconnected inventory and sales systems. Stock isn't synced with e-commerce listings, expired products stay listed, staff activity is untracked, and there's no audit trail for who accessed what and when.

  • No inventory-to-storefront sync — out-of-stock or expired items still show on the e-commerce website
  • No audit trail — no logging of IP, timestamps, accessed routes, or suspicious activity
  • No staff tracking — no visibility into work hours, sales-per-staff, or performance metrics
  • No automated alerts — minimum stock levels, expiry dates, and suspicious access go unnoticed
  • Manual label printing — product labels with SKU codes created manually for each item

Engineering Thinking

Designed as an all-in-one platform where inventory is the single source of truth. The e-commerce storefront only displays products that are in-stock, non-expired, and approved in the inventory system — no manual sync needed.

The audit system logs every API call with IP address, timestamp, accessed route, and user session details. Rate limiting prevents abuse. If the same IP shows unusual patterns (rapid requests, accessing restricted routes), alerts trigger automatically.

Scheduled email reports compile daily/weekly summaries — stock levels, sales performance, staff hours, and alert history — and send them to the admin at configured times without any manual action.

CHOSEN

Inventory as single source of truth

E-commerce auto-syncs from inventory. Expired/out-of-stock items automatically hidden from storefront.

CHOSEN

Defense-in-depth audit system

Every request logged with IP + timestamp + route. Rate limiting + anomaly detection + scheduled email reports.

Key Modules

E-Commerce Integration

  • Only approved, in-stock products displayed on storefront
  • Expiry tracking — auto-hide expired items
  • Real-time stock counter synced with inventory DB
  • Minimum stock level checking + auto-order page

Live Counter Billing

  • Real-time POS billing at physical counter
  • Instant stock deduction on sale
  • Receipt generation with itemized breakdown
  • Staff-wise sales tracking per billing session

Advanced Audit Logging

  • Every API call logged: IP, timestamp, route, user
  • Rate limiting on all endpoints
  • Anomaly detection: unusual patterns trigger alerts
  • Same-IP login tracking across sessions

Staff & Reports

  • Staff work-time tracking with clock in/out
  • Staff-wise sales and performance metrics
  • Scheduled email reports (daily/weekly summaries)
  • SKU label printing — customizable per product

What Broke & What I Learned

Challenge 01
Real-Time Stock Sync Across Systems
Keeping inventory counts consistent between counter billing, e-commerce orders, and admin adjustments simultaneously was error-prone. Race conditions caused stock going negative. Fixed with database-level atomic transactions and optimistic locking.
Lesson: Multi-source inventory updates need transactional integrity. Application-level checks aren't enough — use DB-level constraints.
Challenge 02
Audit Log Volume Explosion
Logging every API call with full context generated massive data volumes. The audit log table grew faster than any other table. Had to implement log rotation, archival policies, and indexed queries to keep the system responsive.
Lesson: Comprehensive logging is expensive. Design retention policies from day one, not after the database slows down.

What It Achieved

Outcome
Full Retail Stack
Inventory + e-commerce + billing + staff tracking + audit logging in one unified platform. Single source of truth.
Outcome
Security-First Audit System
Every access logged with IP, timestamp, route, and user. Rate limiting + anomaly alerts + scheduled email reports.
Outcome
Live Deployed on Vercel
Production-deployed with SSR via Next.js and Prisma ORM on serverless Vercel infrastructure.

Screenshots

Inventory management dashboard
Dashboard — Products, Billing, Audit, Staff
*Note: These images are generated by AI, the images will be replaced new very soon
Try Live Demo
Previous
Student ERP
Next
AttendPro