The most expensive line of code is the one written before anyone understood the problem.

This is Part 2 of our series "How We Build: Methods and Projects at Apexxtech". Part 1 introduced our Align, Build, Ship method. This post shows what Align looks like on a complex platform.

Some projects can go from brief to design in a matter of days. An agribusiness management platform is not one of them.

MKA Agribusiness Co. operates in Uganda across 512 acres, working with 184 outgrowers. When they asked us to build a platform to manage their operations, the temptation was obvious: pick a stack, sketch some screens and start shipping. We chose to do full discovery first, and to write it down in a 14-section specification before building the product itself.

The platform is in delivery as we write this. This post is about the decisions that came before the code, and why we think they were the right ones.

Why Agriculture Punishes Assumptions

Software teams often come to agriculture with a mental model borrowed from e-commerce or SaaS: users, orders, payments, dashboards. That model breaks quickly.

An agribusiness with an outgrower network is not one organisation doing one thing. It is a central operation working alongside many independent farmers, each with their own land, schedules and relationship with the business. Seasons shape everything. Information arrives from the field, not from a checkout page.

If you build on the wrong assumptions, you do not find out in the first sprint. You find out months later, when a real workflow does not fit the data model and the fix touches everything.

Discovery is how we find those mismatches while they are still cheap to fix.

What Full Discovery Looked Like

Discovery is not a single meeting. It is a structured effort to understand the business well enough to describe it precisely. For MKA, that meant working through:

  • How the operation is organised, and who does what
  • How the central business and its outgrowers relate to each other
  • Which workflows the platform must support from day one, and which can wait
  • What information needs to be captured, by whom and when
  • How people will actually access the system in their working conditions

The goal was not to design screens. It was to agree on what the system needs to know and do, in language both the client and our engineers could read.

Why We Wrote a 14-Section Spec

The output of discovery was a specification with 14 sections. The number itself is not the point. Each section exists because it answers a question that would otherwise have been answered implicitly, by whoever happened to write the code first.

A long spec can sound like old-fashioned waterfall planning. We see it differently. A good spec is not a contract that freezes the product. It is a shared map that makes change visible.

What a written spec gives you

  • One source of truth. When the client, the designer and the engineer disagree, the spec is where the conversation starts.
  • Explicit scope. Things that are out of scope are written down as out of scope, so nobody is surprised later.
  • Better estimates. You cannot estimate work you have not described.
  • Easier onboarding. New team members read the spec instead of reconstructing context from old messages.
  • Visible tradeoffs. When a change is requested, you can see which sections it affects before agreeing to it.

What it does not do

A spec does not replace seeing working software. It describes intent. Only a running system shows whether that intent survives contact with real users. That is why the next step mattered just as much.

The Walking Skeleton

Once the spec was in place, we did not start by building features one at a time. We built a walking skeleton: a thin, working version of the platform that connects every major layer end to end.

A walking skeleton does very little on its own, but it proves that the architecture holds together. Data can flow from the interface to the database and back. Deployment works. The pieces that every later feature depends on are already in place.

From there, each build cycle adds real capability to something that already runs, rather than assembling separate parts and hoping they fit at the end.

Why a configuration engine

At the core of the skeleton is a configuration engine. Instead of hard-coding every rule and category into the application, key parts of the system's behaviour are defined as configuration.

We made this choice because discovery taught us something important: an agricultural operation changes. New crops, new outgrowers and new ways of organising work all appear over time. If every one of those changes requires a developer, the platform becomes a bottleneck for the business it is supposed to support.

A configuration engine moves those decisions closer to the people who understand the operation. It costs more thought at the start, and it has to be designed carefully so that flexibility does not turn into chaos. For a business like MKA, we judged that cost worth paying.

The Stack and Why We Chose It

The platform is built with Django, Next.js, PostgreSQL and Tailwind.

  • Django gives us a mature, well-understood backend with a strong data layer and admin tooling, which suits a data-heavy operational system.
  • PostgreSQL provides a reliable relational foundation. Agricultural operations are full of relationships between people, land and activity, and a relational database models those cleanly.
  • Next.js lets us build a fast, modern interface on top of that backend.
  • Tailwind keeps the interface consistent as screens multiply across the platform.

None of these are exotic choices. That is deliberate. On a platform a business will depend on for years, boring and proven beats new and clever.

Lessons We Are Taking Forward

The project is still in delivery, so we are careful not to claim outcomes before they exist. But the discovery phase has already shaped how we approach complex work:

  1. Depth of discovery should match the size of the risk. A marketing site needs a brief. An operational platform needs a spec.
  2. Write down what is out of scope. It prevents more arguments than anything else in the document.
  3. Build the skeleton before the features. Proving the architecture early removes a whole category of late surprises.
  4. Design for the business changing. Configuration over hard-coding, where the domain demands it.
  5. Keep the stack proven. Spend your innovation budget on the problem, not the tools.

Final Thought

Discovery can feel like a delay when everyone is eager to see screens. In practice, it is the fastest route to a product that fits the business it serves.

Write it down. Build the skeleton. Then build the rest.

Next in the series: Part 3, Design That Routes Intent. Also in the series: Part 4, Part 5 and Part 6.

Planning a platform with a complex domain behind it? Book a call or email contact@apexxtech.io and we will help you scope discovery before you commit to a build.