A second, independent FC Barcelona journalism platform — gamified around XP, streaks, predictions and quizzes, and built on its own isolated Supabase schema alongside Gavi Corner.

Overview
The Cornerists is a second independent FC Barcelona journalism and media platform, sharing Gavi Corner's Supabase infrastructure but running on its own fully isolated schema — no shared tables, no cross-product coupling. Where Gavi Corner is editorial-first, this one is built around a gamified community layer: XP and levels, login and prediction streaks, achievements, quizzes and a leaderboard, on top of the same articles/players/matches content model. Not affiliated with FC Barcelona, La Liga or the RFEF.
Problem
Running a second, related media property invites a shortcut: reuse the first one's database and just branch the frontend. That shortcut also means one product's schema migration, one bad RLS policy, or one bug can leak into the other. I wanted a genuinely separate product that happens to share a Supabase project, not a re-skinned copy of Gavi Corner.
Approach
Every table and RPC function is namespaced to this product and touches nothing Gavi Corner owns. There's no custom Node/Express server and no build step — pages are plain HTML/CSS/JS talking directly to Supabase. Anything that awards value to a user — XP, achievements, quiz answers, prediction results — goes through a SECURITY DEFINER Postgres function rather than a direct client-side table write, so a user's browser can never award itself XP or see a quiz's correct answer ahead of submitting. Admin access is a boolean flag on the profile row rather than a separate auth system, kept deliberately simple for a project at this stage.
Engineering
- XP, levels and login streaks, all mutated only through server-side Postgres functions, never direct writes
- Match predictions with automatic grading and a running streak, plus polls and quizzes with server-protected correct answers
- A period-filterable leaderboard (weekly / monthly / all-time) with self-rank lookup, and a "Cornerist Index" score
- A Canvas-API-drawn "Corner Game" mini-game with its own streak, plus a daily quiz
- Achievements system, saved articles, player follows and notifications
- A player-comparison tool with search, match data with lineups and stats, and "Daily Corner" and "Gavi Archive" content sections
- Social sharing via the Web Share API with a Clipboard-API fallback for copying links
- Admin CMS for articles, players, matches, match stats, lineups, polls and quizzes
Result / Current State
Actively in development. Not yet publicly launched — the current focus is finishing the gamification and content-CMS layer before it goes live alongside Gavi Corner. Some described functionality (like a dedicated social-card generator) is planned rather than shipped yet.
What I Learned
Keeping two related products from bleeding into each other while sharing one Supabase project. The fix was discipline, not tooling: a hard per-product table-naming convention, gameplay-affecting writes routed exclusively through RPCs, and treating the second product's schema as if it were a separate company's data from day one.


