home
← back to projects

mirai inventory management system

a full-stack inventory management system built for mirai arcade, replacing its previous system with a faster, more cost-efficient solution.

the system centralizes inventory operations, uses event-driven services to update demand forecasts, and automates low-stock alerts to help staff plan restocks and analyze product trends.

next.js · spring boot · postgresql · kafka · python

the client

Claw machines inside Mirai Arcade

mirai arcade is an arcade and collectibles shop managing over 1,200 products across 11 types of storage locations, including claw machines, racks, cabinets, and bins. with hundreds of inventory updates made daily, maintaining accurate stock information is essential to operations.

the previous system faced performance and scalability limitations as inventory operations grew. the rebuilt web app provides a centralized place for staff to manage products, update stock, transfer items, receive shipments, and review movement history across physical sites.

system design

Diagram of the inventory API, Kafka events, forecasting service, and messaging service

the system uses a next.js frontend connected to a spring boot inventory api backed by postgresql. the api handles product management, inventory transactions, shipments, and role-based access across physical sites.

to support frequent inventory changes without blocking core operations, the backend publishes events to kafka. downstream python services consume these events to update demand forecasts and deliver low-stock alerts through slack.

demand forecasting

Diagram of the event-driven demand forecasting and restock alert flow

the forecasting service consumes inventory events from kafka, validates and batches them, then combines them with historical sales data to analyze demand trends and calculate suggested reorder quantities. updated forecasts are stored in postgresql and displayed in the analytics dashboard.

when stock falls below a threshold, the messaging service sends automated restock alerts through slack, helping staff plan ahead and prevent stockouts.

results

the rebuilt system now supports 30+ employees managing over 1,200 products and hundreds of daily inventory updates. compared with the previous system, it delivers 10x faster response times and reduced monthly system costs by 50%.

the system improves daily operations across the team:

  • employees manage inventory updates, transfers, and shipments through a centralized workflow.
  • managers gain visibility into stock levels, inventory movement, and product demand.
  • automated forecasts and low-stock alerts help staff plan restocks before products run out.