← Back to Projects
In production
Full-Stack

Iron Fang

Website and gamified RPG for a Mexico City craft brewery, built with Next.js and Supabase: beer catalog, blog, a path-finding quiz and bottle codes to redeem.

View Demo
Iron Fang

Main result

117

unit tests, mostly of the combat engine

Date

October 6, 2026

Theme

Craft beer brand and gamification

Objective

Show the beers and send buyers to order through Instagram.

Visitors pass an 18+ age gate, browse the beers, read the blog and take a quiz that assigns them a path. Signed-in players explore, fight and redeem bottle codes in an RPG resolved on the server.

Challenges

  1. 01A slow Supabase response stalled every navigation for about 25 seconds
  2. 02Combat results computed in the browser could be tampered with
  3. 03The Fortress page needed four serial round trips to load

How it was solved

  1. 01Middleware aborts after 3 seconds and treats the failure as signed out
  2. 02Combat resolves on the server from pending combat logs
  3. 03Local JWT verification, cached reads and streaming cut it to one

Results

  • Middleware time down from 347 ms to 31 ms after verifying the JWT locally
  • Combat balance checked with Monte Carlo probability tests

Overview

The public site and the game share one Next.js app. Beers, posts and the quiz are typed data in the repo; players and their progress live in Supabase.

Technical Implementation

Auth

Supabase Auth with row-level security. The session JWT is verified locally, so most requests never reach the auth server, and a short abort keeps the site usable when Supabase is slow.

Game

Exploration, combat, stamina, allies and a weekly ranking. Combat is settled on the server, and its odds are covered by simulation tests.

Conversion

There is no store: every beer ends in a call to order by Instagram message.

Features

  • Beer catalog with a page per beer
  • Quiz that assigns each visitor a path
  • Blog with category filters
  • RPG: fortress dashboard, exploration, inventory, allies and weekly ranking
  • Code and QR redemption for codes printed on bottles
  • Welcome emails through Resend

Technologies

  • Next.js 16
  • React 19
  • TypeScript
  • Supabase (Postgres, Auth, RLS)
  • Resend
  • Tailwind CSS 4
  • Vitest
  • Vercel

Impact

The brewery has its own site on its own domain, with every beer one tap from an Instagram order. Codes printed on the bottles turn a purchase into progress in the game.

Ask my portfolio

AI

I answer from what's published on this site and link the project each answer comes from. If you'd rather talk to Fer, tell me and I'll pass on your details.