Skip to main content
Harvested & in ProductionDecember 2024 – March 2026

Haebot Enterprise ERP Rewrite

An ERP rebuild for a 25-employee company, cutting query latency from ~2.5s to <400ms (>84%) and setup from ~1hr to <5min.

Role & ContextFull Stack Engineer (PT Haebot Teknologi Indonesia)

What is this system?

A plain explanation of the project, its scope, and the real tasks it carries out.

A ground-up rewrite of the ERP used for daily Sales, Inventory, and Finance operations at PT Haebot Teknologi Indonesia.

The system handles real-time stock allocation, multi-role checkout, financial ledger generation, and asset management for a 25-employee business and a catalog of 1,000+ products.

Primary Technologies

TypeScriptKyselyPostgreSQLDocker ComposeCloudflare R2REST APIs

Why did it need to exist?

The practical friction, human fatigue, or operational constraints that demanded this solution.

Inefficient ORM queries in the old ERP meant financial reports and inventory lookups took ~2.5 seconds. Those delays were slowing daily operations.

Local setup and update deployments took nearly an hour of manual dependency installation. Daily reporting required hours of error-prone spreadsheet work. High-resolution product media was also filling up the VPS disk.

Technical Craft & Architecture

Engineering decisions, query plans, containerization, and measured benchmarks.

Field Benchmark

>84% latency cut (2.5s to <400ms) · >90% faster setup · 25 employees served

I led the full rewrite, auditing database query plans and containerizing deployments. I also moved media storage off the server and into the cloud.

Query latency: 2.5s → <400ms (>84% reduction)

Replaced deeply nested Eloquent queries with explicit Kysely queries optimized to use PostgreSQL indexes.

Environment setup: ~1hr → <5min (>90% reduction)

Used Docker Compose to containerize the rebuilt ERP stack. One repeatable command replaced the manual configuration steps.

Automated business workflows

Replaced spreadsheet tracking for 25 staff across Sales, Inventory, and Finance. Transaction rollups run automatically in real time, and financial figures are available immediately.

Cloudflare R2 media offload

Moved business files and media for 1,000+ products, each with 3+ images, from the VPS disk to Cloudflare R2 to free up server storage.

Implementation Notes

  • Analyzed PostgreSQL EXPLAIN ANALYZE traces on slow production transactions, eliminating full table scans on historical ledger tables and adding compound B-tree indexes.
  • Shipped weekly releases with zero downtime and added configurable role-based access control (RBAC) for 5+ employee tiers defined by the business.

Atmosphere & Feeling

How the project feels in production: its sensory texture and quiet rhythm.

“Staff used to wait for loading indicators. Now the figures update as soon as a transaction completes, which feels like clearing a blocked irrigation channel.”

A Note from the Field

The part I was happiest about was seeing colleagues get back the hours they’d spent reconciling spreadsheets by hand. I want software to make their day less tiring.

Choose another station stop

Station Stop · STN 03 · Rice Fields (稲田)

Visit another room or return to the main platform.

LINCIE LINE · 鉄道STN · 03稲田RICE FIELDS · PROJECTS◂ PREV · 前の駅駅舎Station HouseNEXT · 次の駅 ▸工房Workshop