The technology
Flip Social Club is a modern full-stack web application, and we are proud of what it is built on. Every piece of the stack was chosen deliberately — proven, typed, and boring in the best sense. No mystery frameworks, no exotic dependencies, no lock-in. Here is what makes it possible.
The stack
Mastra
The brain behind the curated What's on cards on each city page. A Mastra agent and its whatson tool live on our own network; the page calls the tool for structured output, so the digest is fresh, fast, and honest — tool output is the source of truth, not a language model guessing.
Next.js 16 + React 19
The whole product. Server components do the work on the box, the client hydrates only what needs to move. One framework, end to end — no frontend/backend split to keep in sync.
TypeScript 5
Every file is typed, checked on every edit, before it ships. The calendar is full of dates, times, and roles — a lot of things that would quietly break if types stopped caring.
PostgreSQL 18
One serious database holds every town, venue, act, and booking. Indexed lookups keep the inbox badge and the home-city redirect fast even as the grid grows.
Prisma 6
The typed bridge between the app and the database. Schema changes are migrations, not hand-edited SQL — so the shape of the data is documented in code.
Auth.js 5 (NextAuth) + Prisma adapter
Accounts, sessions, and role checks run on it. Passwords are bcrypt-hashed; the admin flag lives in the database, never in a token.
Tailwind CSS 4
The dark-first visual system: the zinc grid, the amber accents, the responsive layout that folds the dashboard into an accordion on a phone. Utilities in code, no stylesheet drift.
zod
Input validation at the door. Nothing reaches the database without passing a schema first.
pnpm + Node 22
The package manager and runtime it all runs on, on a single small machine.
How it runs
The entire product — the app, the database, and the dev tooling — runs on a single self-hosted machine in a container. No cloud bill, no third-party API holding the calendar hostage, no “their” infrastructure deciding whether your town loads. The gear is owned, the data is ours, and the backups follow a strict three-location rule: on the box, off to a remote repository, and on a NAS across the network.
The curated What's on digests are agent-powered: a bridge on the app calls the Mastra tool, gets structured day-by-day output, and joins it back to the local database for avatars and links. Two freshness layers keep it cheap and current — a five minute server cache so a dozen open tabs cost one call, and a staleness fingerprint that re-hashes the underlying rows, so the moment a set or event changes, the affected cards drop and refill from fresh data. Windows are anchored to the city's own timezone, so the digest is right for the place it is about.
Because it is one box and one database, a change is fast: an edit is type-checked, deployed, and verified by an automated browser test before it is committed and backed up. That loop — check, deploy, test, commit, back up — is how every feature ships.
The whole codebase is small enough that a person can hold it in their head, which is not a limitation. It is the point. A shared calendar for a town should be run by people who know exactly how it works, down to the query.

