Added part one of my locallygrown rebuild series

This commit is contained in:
Eric Wagoner 2025-09-08 20:00:36 -04:00
parent a1634e3cfe
commit 233a1c7482

View File

@ -0,0 +1,242 @@
---
title: "From Accidental Discovery to Agricultural Infrastructure: Building the World's First Online Farmers Market (2002-2011)"
description: The origin story of LocallyGrown.net - from failed cooperative to pioneering agricultural platform serving 100+ markets across North America.
date: 2025-09-08T23:13:31.219Z
preview: ""
draft: true
tags:
- locallygrown
categories:
- locallygrown
lastmod: 2025-09-08T23:28:22.451Z
slug: locallygrown-origin-story
---
_How a failed wholesale experiment in Athens, Georgia became the foundation for nationwide local food systems_
---
## TL;DR
What started as a failed restaurant wholesale cooperative in Athens, GA accidentally became what I believe was the world's first online farmers market platform. A simple innovation—letting customers pre-order exactly what they wanted before farmers harvested—addressed persistent problems that everyone in local food systems knew about but had struggled to solve with traditional farmers markets and CSAs. By 2010-2011, the Rails-powered platform served 100+ markets across North America through a sustainable 3% commission model. Our Athens market alone had 60 growers and 1,500 regular customers, processing $10K+ weekly. The architectural decisions made during intense 4 AM development sessions would shape the platform for the next 19 years.
---
## The Seeds: Growing Up in the Movement
My path to creating Locallygrown.net began in the 1970s as a child of "back to the land" parents. I grew up on a small homestead with a large garden, poultry, milk goats, and the joy that comes from tasting fresh food grown close at hand.
That sensibility never left me. By 1999, I was renting a hundred-year-old farmhouse outside Athens, Georgia, with my own garden providing the fresh ingredients I couldn't find at any store. In fall 2001, I got married and bought a patch of land with the dream of having our own small market farm. I attended planning meetings of the small Athens farmers markets that existed at the time, immersing myself in the small local food community.
It was at one of these meetings that Dan and Kris Miller, who ran their small farm Heirloom Organics, invited us to join the new cooperative they were starting as a grower. But they also approached me with a different problem: how could small local growers cooperate to reach more customers while staying independent? Their original idea was straightforward—pool produce, create a single point of sale, focus on restaurants. They weren't looking forward to managing spreadsheets to keep everything organized, but maybe, they wondered, I could help them make a better way.
As both a grower and a software developer, I was uniquely positioned to understand both sides of the equation: the challenges farmers faced getting their products to market, and the technical possibilities that the early internet offered.
---
## The Failed Experiment That Changed Everything
Dan and Kris valiantly ran their cooperative for two years, but it didn't work as they hoped. Athens, the consummate college town, was too inexpensive for the restaurant wholesale model they'd envisioned, and even aggregated, the farms were too small to supply commercial kitchens reliably.
But something unexpected happened during that failed experiment. Individual customers started placing small orders through the primitive system I'd cobbled together and Dan and Kris were happy to let them come pick up orders at their house. What began as a wholesale platform accidentally became something entirely new: the world's first online farmers market.
**The Business Handoff**
By 2004, recognizing that the technical platform and market management had become the heart of the operation, Dan and Kris handed the entire business over to me. They remained as vendors—growing and selling their produce through the system—but the market became all mine. This transition made me not just the platform developer, but the owner-operator of what would become the flagship Athens Locally Grown market.
> **Why this mattered to markets:** Farmers could finally sell directly to consumers with the convenience of online ordering, without the unpredictability of traditional markets.
> **Why this mattered technically:** I was building e-commerce infrastructure for a movement that barely existed, during the dial-up internet era, before "farm-to-table" was mainstream.
---
## The "Accidental Discovery" That Solved Everything
By focusing on individual customers instead of restaurants, we stumbled onto a model that addressed the well-known problems that growers and customers had been grappling with for years. These weren't hidden issues—they were accepted facts of life that everyone in the local food community understood, even if they couldn't figure out how to solve them:
**Traditional Farmers Market Problems We Solved:**
- Growers no longer faced grueling Saturday mornings with speculative harvesting
- Customers didn't need to arrive at dawn hoping the good stuff was still available
- No more rushed purchase decisions under market tents
**CSA Problems We Solved:**
- No more "mystery boxes" customers couldn't customize
- No more overwhelming customers with excess produce they didn't know how to use
- Flexible ordering instead of season-long commitments
**Buying Club Problems We Solved:**
- Hard to organize → Automated system management
- Limited local options → Direct farmer connections
The innovation wasn't recognizing these problems existed—farmers, customers, and market organizers had been wrestling with these trade-offs for decades. CSAs were one attempt at a solution, buying clubs were another, direct sales were yet another. Each approach solved some problems while creating others, forcing people to choose the least-bad option for their situation. What we stumbled onto was a way to get the benefits of all three models while avoiding most of their downsides.
> **Predictable Harvesting 101**
>
> - **Friday-Sunday:** Growers list what they expect to be able to harvest
> - **Monday-Tuesday:** Customers place orders for exactly what they want
> - **Wednesday:** Growers harvest knowing every item is presold
> - **Thursday:** Coordinated drop-off and pickup
>
> _This weekly cycle was liberating in 2002: imagine harvesting your produce already knowing that everything has been sold._
That structure didnt just reduce waste—it made new products possible. One grower with a single kefir lime tree could finally offer leaves for sale. At the traditional market, they often went unsold and spoiled, and he stopped bringing them. In our system, he could list five, sell two, and leave the rest on the tree. It was an unintended side effect: a much broader range of products became available to customers.
**"The Internet Works Locally Too"**
Our value proposition was simple: why shouldn't local customers have the same convenience buying from local farmers that they had buying from Amazon? The platform combined the benefits of traditional farmers markets, CSAs, and buying clubs while removing the downsides of each.
For growers: Set your own prices, describe products as thoroughly as you choose, harvest only what's presold, use auto-generated packing labels and reports.
For customers: Browse produce like a traditional market, plan menus without time pressure, buy exactly what you want from the growers you prefer, convenient pickup locations.
That single innovation changed everything for our small farmers, including myself. We could grow things that wouldn't possibly work at traditional farmers markets, experiment with new crops, and encourage our customers to try new things.
The timing was crucial. This was the era of dial-up internet, before social media, before mobile apps, before most people had even heard of "farm-to-table." I was building infrastructure for a movement that barely existed yet.
---
## Going National: From Local Solution to Infrastructure Platform
By 2006, our Athens market was attracting nationwide attention. I was being invited to farming conferences across the country to show off our system and explain how other communities could follow in our footsteps. One memorable conference was SSAWG (Southern Sustainable Agriculture Working Group) in January 2005 in New Orleans. My initial advice was always the same: use the open source tools I used (OSCommerce) and build your own version.
But conversations with farmers and market organizers quickly revealed how rare my combination of skills was. They had the agricultural expertise and community connections, but lacked the technical background to build and maintain complex e-commerce systems. What they really needed wasn't advice on replicating our approach—they needed someone to build out a system they all could use.
This realization changed everything. I wasn't just maintaining a local platform anymore; I was potentially building infrastructure for a nationwide movement toward local food systems. OSCommerce, which had served us well as a single-market solution, was fundamentally limiting what I could build for multiple independent markets.
**The Technology Decision That Shaped 19 Years**
Ruby on Rails had just hit version 1.0, and despite its newness, I saw the potential. I had been using it since it came out in pre-release several years prior, including for a small farm planning and marketing tool I had already been offering to other farms. Rails promised rapid development, elegant code, and the ability to build complex web applications quickly. More importantly, Rails was a perfect fit for the complex business model I was now tackling: multiple independent markets, each with their own growers, customers, pricing, and branding, all sharing the same underlying platform.
I made the decision to completely rewrite Athens Locally Grown in Rails. This wasn't a simple migration—it was a ground-up rebuild that took months of development while keeping the existing Athens system running and designing for the multi-market future I could see coming.
**The 4 AM Development Routine**
Those months of rebuilding required an intense schedule that I still remember vividly. My routine was getting up at 4 AM, driving into Athens, and coding on LocallyGrown for several hours at my desk at my day job before anyone else arrived. Then I'd switch to my regular work for eight hours, drive home to do farm work, and spend time with my wife and our new child.
It was incredibly hard but deeply rewarding. I was building something that mattered—not just for our local community, but potentially for local food systems across the country. The early morning hours in an empty office, fueled by coffee and the vision of what this platform could become, were some of the most focused and productive development sessions of my career.
---
## Key Architectural Decisions That Shaped Everything
**Multi-Market Subdomain Architecture (2006):**
```ruby
# This single decision shaped 19+ years of development
def get_market
uri_array = request.host.split('.')
subdomain = uri_array.first
$market = Market.where(:subdomain => subdomain).first
end
```
This simple method enabled `athens.locallygrown.net`, `madison.locallygrown.net`, and dozens of other markets to operate independently while sharing the same codebase. Each market could have its own branding, managers, growers, and customers, all isolated by subdomain.
> **Why Subdomains in 2006?**
>
> - **Isolation:** Each market's data completely separated
> - **Branding:** Markets could customize domains and appearance
> - **Scaling:** Single codebase serving multiple communities
> - **Trust:** Local URLs for local communities
> - **Technical simplicity:** One application, many markets
**Full HTML/CSS/JS Customization System:**
Perhaps my most innovative and ultimately problematic decision was giving markets complete control over their appearance. Markets could inject custom HTML, CSS, and JavaScript into their pages. This was above and beyond what was offered by most platforms in 2006.
The result? An ecosystem of designers who built entire businesses around LocallyGrown customizations. Markets had unique, professional designs that reflected their local character. It was beautiful, functional, and completely ahead of its time.
Market managers could embed widgets from other services into their market pages, such as Google calendars, Facebook posts, and more. The platform had a powerful rich text editor that could be used to format content, and the ability to embed images and videos. That combination of features led to markets that looked like unique, professional websites, not just a shared e-commerce platform. Those freedoms later collided with mobile UX, security hardening, and negated my advantages of a shared codebase.
**Complex Business Logic in ActiveRecord:**
I embedded sophisticated pricing logic, inventory management, and order processing directly into the Rails models. The `User` model alone handled role-based permissions for superusers, market managers, growers, customers, and volunteers. The `Product` model managed master/dependent relationships for inventory tracking. The `Order` model calculated complex pricing with grower percentages, market fees, and customer prepayments. Every market had its own set of business rules and policies, and the system was designed to support them all.
This worked brilliantly in 2006. Rails was new, the patterns were clean, and the system scaled to serve multiple markets with hundreds of growers and thousands of customers—and that approach would create the constraints I'd face decades later.
---
## The Golden Years: When Everything Worked Perfectly
For five years, the Rails platform hummed along perfectly. I migrated through Rails 2.0, 2.1, 2.2, and 2.3 without major issues. Each upgrade brought new features and improvements.
**The Numbers That Proved the Model**
By 2010-2011, when I was giving presentations about LocallyGrown, the Athens market alone had grown to:
- **60 active growers** using the platform
- **1,500 regular customers** placing 200 or more weekly orders
- **$10,000-12,000 in weekly sales** flowing through the system
But the real validation came from replication. The platform expanded to support **50+ markets processing orders across North America** (and then 75, 100, and more), with **10 more markets getting started** at any given time. Each market operated independently with its own subdomain, branding, and community, but shared the same robust technical infrastructure.
The platform features that made this scale possible:
- Multiple farmers markets across the country with subdomain isolation
- Complex product management with inventory tracking and master/dependent relationships
- Sophisticated order processing and financial calculations with grower percentages
- Background job processing for emails and reports
- File uploads for product images and market documents
- Geographic features with Google Maps integration
- Rich text editing with Textile markup
- Payment processing through early Stripe integration, custom-made to support all the uncertainties of the agricultural industry
The customization system created a thriving ecosystem. Professional web designers specialized in LocallyGrown themes. Markets had unique, beautiful designs that would have cost thousands to develop from scratch.
**A Sustainable, Not Profitable, Business Model**
The business model was elegant: **no upfront costs, just 3% of sales, pay-as-you-go**—making it cheaper than trying to build and host your own system. But my goal was never to get rich from LocallyGrown. I priced it to break even, including my time. Some years I could pay myself a few thousand dollars and upgrade my development laptop or home office furniture, but I always ran it as a break-even business.
My main software development job paid well enough that I didn't need LocallyGrown to cover my personal bills on top of its own operational costs. This gave me the freedom to focus on serving the agricultural community rather than maximizing revenue. I never had to market the platform heavily or actively recruit markets—the system grew organically through word-of-mouth in the local food community.
For markets: No technical expertise required, start in 15 minutes, full customization control, automatic generation of availability emails and harvest reports. The system kept things so well organized that I could print grower payout checks _before_ they dropped off their harvests, knowing that they were already extremely accurate and that any discrepancies could be handled by the system for the next cycle.
This sustainable approach worked perfectly while the technology stayed current and competitive—but success would soon calcify into constraints that resisted change. Stability masked the upgrade wall I was building toward.
---
## The Foundation Was Set
By 2011, LocallyGrown.net had grown from a failed wholesale experiment to a thriving platform serving local food communities nationwide. The architectural decisions made during those 4 AM development sessions—subdomain isolation, deep customization, complex Rails business logic—had enabled rapid growth and genuine value creation.
The weekly cycle that started as an accidental discovery had become the heartbeat of dozens of food communities. Growers could plan their harvests with confidence. Customers could access fresh, local food with online convenience. Market managers could run sophisticated operations without technical expertise.
> "We had accidentally solved problems that traditional farmers markets, CSAs, and buying clubs couldn't address—and built the technical infrastructure to scale that solution nationwide."
The platform was stable, profitable in a sustainable way, and serving a real need in communities across the country. Rails 3.0.20 was working perfectly. The customization system was our competitive advantage. The multi-market architecture was battle-tested and scalable.
Everything was working beautifully. And that success would become the very thing that nearly killed the platform 14 years later.
---
## What's Next: When Success Becomes a Prison
**Coming in Part 2: "The 23-Year Rescue Mission"**
The same architectural decisions that enabled LocallyGrown's golden years would eventually become chains. The customization system that won markets in 2006 would drive them away in 2020. The Rails patterns that seemed elegant would become barriers to modernization. And a global pandemic would create the perfect storm: maximum demand meeting maximum technical constraints.
**Part 2 will cover:**
- The failed Rails upgrade attempts and mounting technical debt
- COVID's devastating impact on traditional markets and opportunity for online platforms
- The personal toll of managing both technical infrastructure and a physical market
- The heartbreaking closure of Athens Locally Grown in 2021
- The evolution from VC-funded to passion-driven competition
- The moment when "working perfectly" became "dying slowly"
- The impossible choice between abandoning 23 years of work or betting everything on a complete rebuild
_The foundation was solid. The community was thriving. The business model was sustainable. So why did it all nearly disappear? That's the story of Part 2._
---
_This is part one of a series documenting the creation, evolution, and rescue of LocallyGrown.net._
### The Series
1. **From Accidental Discovery to Agricultural Infrastructure** ← _You are here_
2. The 23-Year Rescue Mission: Saving Agricultural Innovation from Technical Extinction
3. The Architecture Challenge: Translating 19 Years of Rails Logic to Modern SvelteKit
4. Crisis Response: When Launch Day Goes Wrong
5. Lessons from the Solo Developer + AI Trenches
6. The Future: Building on Modern Foundations