Inspiration

As regular cafe enthusiasts, we’ve spent countless hours studying, working, and building projects at our favorite local coffee shops. Over time, however, we noticed a heartbreaking trend: independent neighborhood cafes we loved were quietly shutting down, only to be replaced by massive corporate chains.

What it does

fork. is a market simulation engine that lets small cafes test the future before risking their business in the present. In fork., you fork the future: create a scenario (raise a price, add an item, or drop one), and run the simulation day by day. Every simulated day, fork.’s customer agents look at the live menus across the neighborhood and decide where to go and what to buy. A live timeline compares each simulated reality against your real-price baseline: sales, customers, average ticket, which items gained or lost, and which competitors picked up your customers. fork.’s advisor sits on top of all of it. Ask "Compare all my scenarios: what should I do next?" and it reads every scenario, every day, and every customer's decisions, then answers with actionable numbers and exact customer behavior, right down to "Raising the oat latte by $0.50 cost you 12% in weekly regulars, because customers like Lucia stopped coming and went to Cafe La Taza instead."

How we built it

SpacetimeDB is the whole backend. Stores, menus, reviews, customer agents, scenarios, simulated days and visits all live in one SpacetimeDB database. Procedures run server-side next to the data and call out to Apify and Claude directly. A job queue in the database hands each simulated day to the agent worker, and every connected screen updates live through subscriptions, with no refresh. Apify scrapes Google Maps (the café, its competitors and reviews) and Uber Eats menus. Claude reads menu photos into structured prices, turns reviews into customer personas, and drives the customer agents' daily decisions, batched so a day of a whole neighborhood takes a handful of calls. [check: model and batch size] Mana hosts the app and runs the agent worker as a background service. The advisor runs on Mana's built-in AI with tools that query the simulation. Mana also built, debugged and extended large parts of the app with us: porting it to a single-file hosted build, moving the advisor onto Mana AI, finding why buttons silently failed, adding cross-scenario analysis, and adding new controls. React + MapLibre for the 3D neighborhood map, menus, scenarios and timeline.

Challenges we ran into

Real-world menu data is fragmented and messy: menus are scattered across different platforms in inconsistent formats, locked in JavaScript pages, blurry customer photos, or delivery apps with inflated prices. We solved this by combining Uber Eats data with Claude reading menu photos, while adjusting for delivery markups so competitor prices stayed accurate. Simulating hundreds of unique agents also made efficiency and decision-making critical. One LLM call per customer per day doesn't scale, so we queued jobs through SpacetimeDB and batched agents per call, while grounding personas in real reviews so they judge price changes and competitors like rational humans. Finally, managing the UI complexity of a 3D map, live scenario timelines, and an AI advisor was compounded by hosting inside Mana’s frame, which initially broke our map’s background worker and native browser dialogs until we rebuilt custom UI controls.

Accomplishments that we're proud of

We are genuinely proud of how we were able to create an end to end pipeline that takes a simple google maps url link and is able to turn that into a render of a fully populated neighborhood of real stores with real menus and AI customers made from reviews left by real people. On top of that engine, we built an AI Advisor that answers "What should I actually do?" by comparing every simulated scenario and tracing individual customers' choices down to the exact shop they visited, and can perform simulations to determine what will actually be best for the business as it moves forward. Best of all, the entire experience is live: start a simulation run, and every open screen watches the days play out at the exact same time.

What we learned

The Database as an Application Server: We learned how to connect autonomous agents directly to SpacetimeDB using server-side procedures that call external APIs, keeping scraping, AI inference, and live simulation state in one place so agents are always connected and making informed decisions. Real Data Beats Prompt Tweaking: By combining Apify web scraping with Claude’s AI vision to capture accurate menu pricing, we learned that LLM agents are only as good as the context behind them. Grounding our prompt engineering in real local reviews and real competitor prices was the key to creating rational, human-like agent behavior. Scaling Through Batching & Queueing: We discovered that cost and latency, not raw model intelligence, are the real constraints on large-scale agent simulations, and that orchestrating work through a database job queue and batching agent decisions is what makes them fast and practical. Rapid Prototyping & Cloud Deployment: Working with Mana taught us how to rapidly debug, deploy, and run background agent workers in the cloud, drastically speeding up our workflow and allowing fork. to expand far beyond a local prototype.

What's next for fork.

Reactive Competitor Agents: Upgrading surrounding competitors from static menus into reactive agents that dynamically adjust their own prices and offerings in response to your changes and shifting customer preferences. High-Confidence Parallel & Multi-Month Runs: Scaling our engine to run 5+ batch simulations simultaneously for stronger statistical confidence, alongside fast, long-run simulations that model business performance across multiple months. Real Cafe Foot-Traffic & POS Integration: Partnering directly with local cafes to ingest real-world foot-traffic and transaction data, making our customer personas even more representative of actual consumer behavior than public reviews alone. A Suite for Every Small Business Niche: Expanding fork. beyond cafes into a broader suite of simulation tools tailored for independent restaurants, retail storefronts, and service businesses.

Built With

Share this project:

Updates

Submission history