Skip to main content
Back to Blog
EngineeringApr 5, 2026·12 min read

Building an ERP System from Scratch

Lessons from building a custom enterprise resource planning system for a 200-person manufacturing company.

ERPBackend
Enterprise ERP dashboard

Building an ERP from the ground up is often considered an engineering anti-pattern. "Just buy SAP," they say. But when a mid-sized UK manufacturer approached us with highly specialized workflows that off-the-shelf software couldn't handle, we decided to take the plunge.

The Stack

  • Frontend: Next.js (App Router) for rapid UI development and RSC performance.
  • Backend: Node.js microservices with tRPC for end-to-end type safety.
  • Database: PostgreSQL managed via Prisma, optimized for complex relational queries.

Tackling State Complexity

One of the biggest hurdles was managing state across thousands of real-time inventory updates. We implemented a hybrid approach using Redis for ephemeral locking and Postgres with strict transaction isolation levels to prevent race conditions during high-volume production runs.

PostgreSQL schema diagram

Scaling Through Observability

Building the system is only half the battle; maintaining it under the stress of 10,000 daily transactions is where the real engineering happens. We integrated comprehensive observability suites from day one. Every database query, API route, and background cron job was instrumented with OpenTelemetry.

This allowed us to identify N+1 query problems before they ever reached production. By the time the ERP was rolled out to the factory floor, the tech team had a dashboard that provided a god's-eye view of the entire operation.

The Result

The custom ERP cut their processing overhead by 40%. It wasn't easy, but by keeping the architecture modular, embracing strict observability, and writing relentless integration tests, we proved that custom enterprise software doesn't have to be a nightmare.