← Projects

Match Engine

A swipe-to-match web app I designed, built, and launched solo in one month for an online community event.

Ran as a one-month event, now offline

View code
Demo uses sample data to protect user privacy.

The ask

I was commissioned to build a dating-style web app for a month-long online community event, where people could create profiles, swipe on each other, and get matched. It had to be live in one month.

How I built it

I wanted swiping to feel as smooth as the real dating apps people already use. The next profile was always loaded underneath the current one, so there was never a blank moment between swipes. Behind the scenes, a match only formed when both people swiped right on each other.

  • Chat with matches. Once two people matched, they could message each other, with read receipts showing when a message was seen.
  • Two-way matching. Your filters decided who you saw and who could see you.
  • No repeats. Recent swipes were remembered, so a refresh never showed the same person twice.
  • Locked-down actions. Every swipe, message, and upload checked that you owned the profile.
Next.js
the app and its server routes
TypeScript
caught bugs before users did
Neon Postgres
users, swipes, matches, messages
NextAuth
sign-up and login
Vercel
hosting and deploys
Vercel Blob
profile photos
Resend
account emails
Git + GitHub
version control

When it broke

Launch went better than expected, and then the site crashed.

  1. Launch. People signed up faster than I planned for.
  2. The crash. Traffic pushed the database past its limits, and the site went down.
  3. The cause. My own code. Every open chat screen asked the database for updates every 3 seconds, around the clock, even in background tabs.
  4. That night. I upgraded to paid plans to get the site back up.
  5. The fix. I rebuilt how the screens checked. They paused in the background, checked less often, and only wrote when something actually changed.
  6. After. Idle tabs cost nothing.

The fix, in the chat screen

// Poll only while the chat is visible
useEffect(() => {
  let interval = null;
  const start = () => {
    if (interval) return;
    interval = setInterval(loadMessages, 5000);
  };
  const stop = () => {
    if (!interval) return;
    clearInterval(interval);
    interval = null;
  };
  const onVisibility = () => {
    if (document.visibilityState === 'visible') {
      loadMessages(); // back: catch up
      start();
    } else {
      stop(); // hidden: no DB calls
    }
  };
  if (document.visibilityState === 'visible') start();
  document.addEventListener('visibilitychange', onVisibility);
  // Leaving the chat: kill the timer
  return () => {
    stop();
    document.removeEventListener('visibilitychange', onVisibility);
  };
}, [id]);

Result

More than 3,400 people joined during its one-month run. When it outgrew the free plans, users chipped in to cover the paid tiers that kept it running.

3,400+ users

What I'd change

I’d plan for scale from day one.

Try the swipe

A simplified mini version I rebuilt for this page. The real app looked different, so watch the demo above for that.

That's everyone.

Likes

2 people liked you

Chat
Profile
Y
You, 24
About me

Sample profile. Big fan of late-night coding and later-night snacks.

Looking for
Someone to debug life with
Interests
CoffeePhysicsRetro techMovies
It’s a Match!
You
A

You and Alex liked each other.

A
Alex