HomeAll 07 Systems
API · 2025

/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.

ROLE
  • Backend Engineering
  • Query Optimization
  • API Design
TIMELINE & STUDIO
2025
Independent
DELIVERABLES
  • Documented REST endpoints
  • Multi-warehouse batch logging
  • Query & index tuning
  • Critical stock notifications
STACK
NestJSNode.jsPostgreSQLPrisma ORMRedis
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.
/04 BUILD TIMELINE
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.