United States
Krofile LLCCo-built with Krofile LLC
Mobile · Full StackPre-launch

BrownBox - Farm-to-Household Marketplace

Reserve a share of a local farm animal or other farm goods: priced, paid, weighed, settled and delivered across one API, a mobile app and four web portals.

Marketplace
Mobile App
Stripe
QR Handoff
Realtime Chat
Push Notifications
Logistics
Claude Code
Agentic Development
BrownBox - Farm-to-Household Marketplace

Project Overview

BrownBox is a marketplace where households reserve a share of a live animal or other goods from nearby farms. BrownBox sets the price, takes payment, settles the final weighed price and pays the farms. It is built as three apps: an Express and MongoDB API, a Next.js site with portals for operations, farms, drivers and pickup stations, and an Expo customer app.

I wrote the entire API and the mobile app, and co-built the web portals with a teammate. That covered the pricing engine, weigh-in settlement, farm payouts, Stripe payments, QR handoff, shipping, realtime chat and push notifications, with 858 API tests running against a real in-memory database.

I built it with a spec-driven agentic workflow: project rules and skills for Claude Code in each repository, plus system specs and decision logs guiding every phase. BrownBox is pre-launch and will go live at brownbox.farm.

858
Automated API Tests
216
API Routes
35
Mobile App Screens
5
User Roles

Screens

Captured from a local build of all three apps running the repo's demo data (fictional farms and customers). Product photos are public-domain stand-ins.

Customer app: phone sign-in, a farm's products, and an order's progress after BrownBox records the payment.
Customer app: phone sign-in, a farm's products, and an order's progress after BrownBox records the payment.
Ops console overview: upcoming routes, reserved shares, products waiting for a price and what's owed to farms.
Ops console overview: upcoming routes, reserved shares, products waiting for a price and what's owed to farms.
Product catalog: BrownBox's selling price and margin beside each farm's wholesale price.
Product catalog: BrownBox's selling price and margin beside each farm's wholesale price.
Ops inbox: the customer's reservation arrives as a chat, answered with a one-tap payment reply.
Ops inbox: the customer's reservation arrives as a chat, answered with a one-tap payment reply.
Order drawer: customer total, farm payout and profit, with the weigh-in still to come.
Order drawer: customer total, farm payout and profit, with the weigh-in still to come.
Farm portal weigh-in: the hanging weight sets the final price, and BrownBox settles the difference.
Farm portal weigh-in: the hanging weight sets the final price, and BrownBox settles the difference.
Farm portal: today's route, the weigh-in queue and setup progress.
Farm portal: today's route, the weigh-in queue and setup progress.
Marketing site with the delivery zip check.
Marketing site with the delivery zip check.

Key Features

Core functionality and capabilities that make this project stand out

Live-Animal Share Reservations
A product configurator backed by a server-side pricing engine that prices whole or by the pound, from weight brackets, share factors and option modifiers.
Weigh-In Settlement
Farms enter real hanging weights; the API computes the final price and any balance or refund, and blocks handoff until it is settled.
Payments, Payouts & Profit
Stripe Checkout from a "Pay" card in chat, confirmed by a signed webhook. Wholesale and selling price sheets, per-order farm payouts and profit on every order.
QR Handoff & Logistics
A one-time QR scanned by drivers, pickup stations or farms, with route delivery, pickup points and shipping by state with carrier tracking.
Realtime Chat & Notifications
WebSocket and SSE chat encrypted at rest (AES-256-GCM), with push via Firebase Cloud Messaging, SMS via Twilio and email via SendGrid.
Spec-Driven Agentic Build
Built with Claude Code from a system knowledge base, numbered design decisions and per-repo skills, which kept AI-written code consistent across three repositories.

Technology Stack

Key Technologies I Used on This Project

API
TypeScriptExpress 5MongoDBZodWebSockets
Mobile
Expo SDK 57React Native 0.86expo-routerNativeWindReanimated
Web Portals
Next.js 16React 19Tailwind CSS 4Leaflet
Services
StripeFirebase Cloud MessagingTwilioSendGridAWS S3 + CloudFront
Testing
VitestSupertestmongodb-memory-server
AI Tooling & Hosting
Claude CodeDigitalOceanVercel
Challenges Overcome

• Turning BrownBox from a broker into the seller mid-build, across three apps, in six phases.

• Keeping customer money invisible to farms, enforced by per-audience serializers and tests.

• Concurrency without transactions: atomic guarded writes for capacity, stock and payouts.

• Keeping card payments honest when an amount changes after the payment request is sent.

• Keeping AI-written code consistent across three repositories over four months.

Key Learnings

• Spec-first agentic development (a knowledge base, numbered decisions, as-built notes) keeps AI agents accurate on a large codebase.

• Clients never send prices: integer cents on the server are the single source of truth.

• Provider interfaces with console fallbacks let the whole stack run and be tested without keys.

• Tests against a real in-memory MongoDB catch what mocks hide.

Writing about this project

Deeper dives into how parts of it were built.

Interested in This Project?

This project showcases practical development skills and problem-solving experience. Explore the features, review the implementation, or get in touch to discuss similar work.