Fostering a sense of community among F1 fans with GridLock

DevelopmentAuthenticationQ4—2025
GridLock wordmark on a dark dotted grid

Introduction

Building a digital F1-themed predictions bingo card web app.

Context

My friends and I had a mini predictions championship for the 2025 F1 season. This was based out of the Notes Apps on our phones, but I figured I could build something more interesting.

Problem solved

An invite-only app that turns 16 free-text predictions into a structured, scoreable card, locked in before lights out.

DIY Predictions Championship

For the 2025 season, every one of us wrote our predictions in the Notes app and dropped them into the group chat. It worked well enough until the end of the season, when we had to actually score them.

The format itself was okay - writing a list of bullet points is quick and convenient. What was missing was structure, validation and a layer of visibility across everyone’s predictions.

Adding Structure to the Freedom of Notes

The standard approach here would be a form: 16 input fields, a dropdown per tier and a submit button. It would have been easy to validate, but it would have turned a fun, opinionated ritual into data entry. People need the freedom and space to marinate on their predictions, so a plain form might have been too constraining.

Instead, I kept the text-first format and built the structure underneath it. The card editor is a lightweight code editor (built using react-simple-code-editor) with a custom Prism grammar, so tier headers, comments and predictions each get their own highlighting:

// TIER 1: Expected. [1 point]
- Max Verstappen wins in Suzuka
- ...

// TIER 4: No way fam. [6 points]
- Nico Hülkenberg earns his first career podium
- ...

Each tier header carries an actual example based on drivers’ and teams’ history, so the scale of ‘expected’ versus ‘no way’ is set by our own history instead of a rules page.

Points System

How much each tier is worth, along with real moments from the 2025 season serving as examples for each tier.

  • Tier 1: Expected+1 point

    2025 Example: Jack Doohan gets replaced mid-season.

  • Tier 2: Reasonable+2 points

    2025 Example: A rookie crashes out in Australia.

  • Tier 3: Now We're Talking+4 points

    2025 Example: Lance Stroll exits in Q1 >40% of the time.

  • Tier 4: No Way Fam+6 points

    2025 Example: Nico Hülkenberg gets a podium.

Four predictions per tier, so a perfect card is worth 52 points. The non-linear jump rewards bold calls over safe ones.

Turning Free Text into a Card

A custom parser reads the editor line by line. // TIER headers switch the active tier, a hyphen bullet (-) starts a new prediction, and any other line is treated as a continuation of the previous one, so a long prediction can wrap naturally without breaking the format.

Validation then runs as a set of game rules rather than form errors:

  1. Exactly four per tier. “Tier 3 has 5 predictions. It must have exactly 4.”
  2. No vague predictions. Every prediction has to mention a driver, team principal, team or track, checked against a dictionary of 148 F1 keywords. Otherwise it’s rejected as “too vague.”

The second rule solved last season’s biggest argument at the point of entry. It also did a second job for free: the keyword it finds is mapped to a driver or team image, so every prediction on the finished card has a face next to it. One pass over the text gives me both the validation and the visuals.

// TIER 3: Now we're talking. 2025 example: Lance Stroll failing to get out of Q1 >40% of the time. [4 points]

- Pierre Gasly finishes ahead of at least one Williams driver in the championship
Tier 34 Points
Pierre Gasly in Alpine race overalls

Pierre Gasly finishes ahead of at least one Williams driver in the championship

The parser matches “gasly” in the keyword dictionary, which both validates the prediction and picks the photo on its card.

Invite-Only, Without Passwords

This was built for a group of friends, so access was based on an invite-only mechanism. The usual options would have been an auth provider like Clerk or NextAuth with Google sign-in. However, it felt a bit unnecessary for my users to create a password for a product they’d use maybe two or three times a year.

Instead, I built a passwordless flow based on an allowlist.

System Architecture
Vercel · Next.js 16BrowserReact 19Server componentsRoute guards · jose JWTServer actionsOTP · session · predictionsNeon PostgresServerless driverallowed_usersotp_codesuserspredictionsGmail SMTPvia NodemailerDiceBearPitwall avatarsreadswritesone-time codeavatars
Everything inside the boundary deploys as a single Next.js app. Postgres holds the allowlist, the codes, the users and their cards.
  • When a user attempts to sign up to the platform, their email is checked against a predefined allowed_users table in Neon. Whether or not it’s on the list, the response is identical, so the list can’t be probed to find out who’s in it.
  • If it is on the list, a six-digit code is emailed through Nodemailer. Codes expire after 15 minutes and are marked as used on verification to prevent replays.
  • A successful code signs a JWT (jose) into an httpOnly cookie with a one-year expiry. The championship runs for a full season, so nobody should have to log in again mid-way through.
Sign-in Journey
BrowserReact 19Next.js serverVercelNeonPostgresGmailSMTPRequest a coderequestOtp(email)SELECT allowed_usersis this email invited?INSERT otp_codesonly if listed · 15 min expirysendMail(code)six digits, only if listed200 OKsame message, listed or notVerify the codeverifyOtp(email, code)SELECT otp_codesmatching, unused, unexpiredUPDATE used = TRUEthen get or create the userSet-Cookie: session_tokenJWT · httpOnly · 1 yearEvery page loadGET /any-pagecookie attachedjwtVerify(token)no valid session → /SELECT predictionsdoes a card exist?render or redirectsee the routing table below
Solid arrows are calls, dashed arrows are responses. Every check runs on the server before any HTML is sent.

Every page is a server component that reads the session before rendering, so routing is decided on the server. Signed-out users land on the login page, users without a card are sent to the editor, and users with one go straight to their predictions.

RouteSigned outSigned in, no cardSigned in, card locked
/Login→ /create-card→ /view-predictions
/validate-otpCode form→ /create-card→ /view-predictions
/create-card→ /Card editor→ /view-predictions
/view-predictions→ /Link to the editorYour card
/pitwall→ /→ /create-cardSubmitted cards
Routing decided on the server for each request. → marks a redirect.

Locking It In

Once a card is submitted, the editor route redirects away for that user, so predictions can’t be revisited after the fact. That one rule replaced the honour system of the Notes app.

The Pitwall page then shows the card of every player who has locked theirs in. It reads from the predictions table, so anyone who hasn’t submitted yet simply doesn’t appear, and the allowlist is only used to look up display names. It’s also locked until you’ve submitted your own card, so nobody can borrow inspiration from someone else’s predictions or deliberately copy them. Last season, comparing predictions meant scrolling back through the group chat. Now it’s one page.

Making It Feel Like F1

Since the point was to make the championship more fun, I spent time on the moments around the core flow:

  • Lights out. The first visit in a session plays the F1 start sequence: five red lights come on one by one, hold, then go out to reveal the logo. It’s tracked in sessionStorage so it never gets in the way twice.
  • Draggable photos. The login page has photos from races I’ve been to, as tilted cards with spring physics (motion) that you can pick up and throw around.
  • Tone of voice. “Enter paddock” on the login button, “Yep, we’re that selective” under the email field, “Rolling you out to the grid” on success, and “Lock them in” to submit.

tldr;

Notes appGridLock
Where predictions liveScreenshots in a group chatPostgres table
Vague predictionsArgued about at the endRejected on submit
Editing after the factAnyone, anytimeLocked once submitted
Comparing cardsScroll the chatPitwall page
AccessWhoever is in the chatAllowlist + one-time code

Takeaways

The key decision on this project was to not replace a behaviour people already had. A form would have been simpler to build, but the editor kept the part of the Notes app everyone liked and quietly added the rules we were missing.

There are a few things I’d change next season:

  1. Automatic tracking for quantitative predictions. Something like “Carlos Sainz beats Lewis Hamilton in the standings” can be settled by data instead of memory. Parsing these into a structured rule (two drivers, a comparison, a source) and checking it against a public F1 results API after each race would keep a live score without anyone having to tally it at the end.
Tier 46 Points
Lewis Hamilton in Mercedes race overalls

Carlos Sainz beats Lewis Hamilton in the final standings

A concept: each prediction tracked against the standings after every round. Sample data.
  1. Voting on qualitative predictions. “Ferrari bring out the most disappointing special livery of the season” is never going to be settled by an API. Letting players vote once the moment has passed, with a majority deciding, keeps those predictions in play without one person acting as judge.
Tier 11 Point
Ferrari team crest

Ferrari bring out the most disappointing special livery of the season

A concept: once the moment has passed, everyone votes on whether it came true. Try it, your vote isn't saved.