Inspiration
You can follow hundreds of people on Instagram and still not know anyone on your own campus. Social apps are great at keeping us scrolling and bad at getting us to meet. We wanted to build the opposite: an Instagram feature called Nearby whose whole job is to get two people to put their phones away and meet in person, safely.
What it does
- You turn on Meet nearby for a set window (for example, 2 hours).
- The server finds someone close by who shares your interests and passes both people's filters (age, gender, follow status, radius).
- Both of you get the same proposal at the same time, with a 45-second countdown. Each person sees an explanation written for them, shared interests, mutual follows ("you both follow Ava"), and three conversation starters meant to be said out loud. There is no swiping and no chat.
- If you both accept, an AI agent picks a public place that is open and a fair walk for both of you, shows its reasoning step by step, and re-plans if someone says they're running late.
- Locations move live as people walk (real phone GPS), and you only ever see "very close" or "nearby", never the other person's position.
How we built it
- Frontend: Next.js 16 (App Router), React, TypeScript, Tailwind, designed to look and feel like Instagram.
- Backend: Next.js route handlers with Supabase (Postgres) for users, follows, presence, and proposals.
- AI: Meta's Muse Spark through the Meta Model API, in three roles:
- turning free-text interests into structured tags,
- choosing the best of the top three candidates and writing a personal "why you two" for each person,
- a venue-planning agent that uses tool calls (
get_nearby_venues,get_open_hours,propose_plan), with every call visible in an "AI panel".
- Matching: hard filters in code, then a score. For people $A$ and $B$ with tag weights $w$:
$$ \text{score}(A,B)=\min!\left(1,\ \frac{\sum_{\text{exact}}\tfrac{w_A+w_B}{2}+\tfrac12\sum_{\text{adjacent}}w}{\min!\left(\sum w_A,\ \sum w_B\right)}+b\right) $$
where $b=0.1$ for mutual follows or close friends, and only candidates above $0.35$ reach the AI.
- Fairness: walking time is about $t \approx \dfrac{1.3\,d}{80\ \text{m/min}}$, and the agent's choice is refused if either person walks more than 25 minutes or the two walks differ by more than 15.
- Live demo: a Cloudflare tunnel gave us a public HTTPS link, so friends could join from their phones with real GPS.
Challenges we ran into
- Tool calling that wouldn't finish. The model kept searching and ran out of steps, and the API only supports
tool_choice: "auto". We fixed it by telling the model how many steps it had used and offering only the final tool on the last step. - AI results we couldn't trust blindly. The agent once picked a venue a 40-minute walk away, and our fallback once moved a meetup across town. We moved the safety rules (open at least 90 minutes, fair walks) into code, so the AI can't override them.
- Stale AI answers from a cache that ignored prompt changes. Cache keys now include the prompt.
- Two people grabbing the same match, and expiry, declines and re-plans happening at the same instant. We made every state change a conditional update and added cooldowns and a permanent "not interested".
- A production build that worked only with our keys, and an endpoint that would have frozen at build time. Both are fixed.
- Staying inside a budget: a hard cap on AI calls, plus caching and fallbacks, so the demo works even if the model is slow.
What we learned
AI works best as a collaborator inside guardrails: let the model understand people and write the human parts, and let code enforce everything that has to be safe. We also learned how much a demo depends on boring engineering: caching, timeouts, resets, and testing the unhappy paths.
What's next
Real accounts and sign-up, a permanent deployment, a real places database instead of our 28 hand-checked venues, group meetups, and a post-meetup feedback loop that makes future matches better. Today the app uses demo accounts, and Instagram is the concept it's designed for, not an integration.
Built With
- ai
- cloudflare
- css
- metamodelapi
- muse
- next.js
- node.js
- postgresql
- react
- supabase
- typescript
- zod
Log in or sign up for Devpost to join the conversation.