/CASE STUDY · 05 · BACKEND
Inventory Management High-Throughput API
High-throughput RESTful API for warehouse inventory tracking, multi-warehouse batch logging, and critical stock notifications.
corecraft.my.id/work/inventory-api
GET /v1/stock/sku-09200 · 14ms
POST /v1/batch-log201 · Redis HIT
ALERT low_stock_qty< 5 units
40% faster search · Multi-warehouse
/01 THE PROBLEM
Problem & Friction
Legacy warehouse queries crawled across tens of thousands of rows, so a simple stock lookup could stall the operations team.
40%Faster inventory search queries
Tens of thousandsRows the legacy queries crawled
RedisCaching in front of repeated lookups
/02 SYSTEM DESIGN & ARCHITECTURE
Architectural Breakdown
- NestJS modules with DTO-validated endpoints
- PostgreSQL as the relational store
- Prisma ORM for typed queries and migrations
- Redis caching in front of repeated lookups
/03 IMPLEMENTED SOLUTIONS
Resilience & Outcomes
- Indexes were aligned to the query shapes that actually ran on the hot paths.
- Prisma queries were rewritten to stop over-fetching rows the caller never read.
- Critical stock levels emit notifications instead of waiting to be noticed.
Phase 01
Problem
Legacy warehouse queries crawled across tens of thousands of rows.
Phase 02
Build
Applied database indexing and Prisma query tuning to the hot paths.
Phase 03
Result
Inventory search queries became 40% faster.