Skip to main content

Algorithm Driven Logistics

Macro Meals Shipping Dashboard

Chief Technology Officer

Product Manager

Quality Assurance Lead

JavaScript

PHP

YII Framework

PHP Unit

REST APIs

Sass

Trello

Adobe Illustrator

Adobe Photoshop

Competing with GiantsHow a Bootstrap Startup Carved Out Its Niche

In 2016, meal delivery was exploding. Blue Apron and HelloFresh had raised hundreds of millions. We had a small team and a simple idea: fresh meals customized to your exact macros, shipped nationwide.

As CTO, I built the entire platform in six months. Our secret weapon was a shipping algorithm that found the cheapest way to get perishable food anywhere in the country. That algorithm let us hit 20% margins while our competitors burned through VC cash.

Macro calculator interface showing personalized meal recommendations

The Macro Calculator

Making Nutrition Math Easy

Macro calculator interface showing personalized meal recommendations

Counting macros is powerful but complicated. Athletes have done it for decades, but most people don't want to weigh food and do math. We built a calculator that did the hard work.

You'd tell us your goals (lose weight, build muscle, maintain) and we'd figure out your ideal protein, carbs, and fat. Then we'd match you with meals that hit those numbers.

  • Enter your weight, activity level, and goals
  • Get a personalized macro breakdown
  • See meals ranked by how well they fit your plan
  • Visualize your weekly nutrition at a glance

After we launched the calculator, orders jumped. People finally understood what they were eating and why. Retention went up because customers saw real results.

The Shipping Problem

Solving the Perishable Puzzle

Shipping optimization algorithm visualization

Fresh food and nationwide shipping don't mix well. Everything has to stay cold. Delays mean spoilage. And shipping costs can eat your entire margin.

We started local, within a 50-mile radius. But customers wanted us everywhere. So I built a multi-carrier system that compared rates across UPS, FedEx, USPS, and DHL in real-time.

The core was a greedy algorithm. (A 'greedy algorithm' makes the best choice at each step without looking ahead, like always taking the lowest price that meets the constraints.) It checked each carrier's rates for the specific package weight, destination, and delivery speed. Then it picked the cheapest option that got there on time and kept the food cold.

Some orders went ground. Some went overnight. Some split across carriers. The system figured it out automatically, and customers saw lower shipping costs than our competitors.

Balancing the Business

When the Best Price Isn't Best

Dynamic business logic flow chart

The algorithm worked great for customers. Too great. We'd have ten orders going to ten carriers on the same day. Our fulfillment team was drowning in different packaging requirements and pickup schedules.

So I added business rules on top of the raw optimization:

  • Batch orders by carrier when the price difference is small
  • Factor in our team's actual capacity for each carrier
  • Build in buffer for carrier policy changes

The result was a system that balanced customer value with operational sanity. Shipping costs stayed competitive, but we weren't killing ourselves behind the scenes.

What Happened

Lessons from the Arena

Vegan meal options dashboard

After a profitable first year, we made the hard call to shut down. Not because we were failing; we were still making money. But the math on growth didn't work.

  • Big players were losing money on every customer to grab market share
  • Customer acquisition costs kept climbing
  • Physical food limits how fast you can scale

We could have raised more money and joined the land grab. Instead, we exited while profitable and moved on.

The technology lived on. That shipping algorithm pattern showed up in other e-commerce projects. The rapid MVP approach became a template. The macro calculator logic evolved into other personalization tools.

Sometimes the best outcome isn't winning the war. It's learning what you can take to the next battle.