The Architecture of Pop-Up Infrastructure: Inside t3-cloneathon
How a Next.js and Convex stack used strict AI guardrails to process high-stakes hackathon submissions at breakneck speed.

ANNOUNCING THE FIRST EVER CLONEATHON Build an open source clone of T3 Chat, win up to $5,000 Deadline is next Wednesday. Good luck and have fun nerds 🫡
- The t3-cloneathon repository demonstrates how strict AI guardrails enable rapid development without accumulating technical debt.
- Deep integration between Clerk and Convex eliminates boilerplate JWT management to provide secure role-based access control out of the box.
- The project leverages a Convex database schema as a strict state machine to manage the complete lifecycle of a hackathon submission.
The One-Week Deadline
Building a custom platform to manage a high-stakes competition is usually a multi-month endeavor. When Theo Browne announced the T3 Chat Cloneathon, the timeline was brutal: developers had one week to build a clone, which meant the infrastructure to accept, manage, and judge those submissions had to be built even faster.
A simple web form would not suffice for a $10,000 prize pool. The event required secure state management, authenticated GitHub links, and a multi-tiered judging process to handle thousands of developers. The solution was a masterclass in pop-up infrastructure.
Vibe Coding with Guardrails
The repository describes itself as a vibe coded work in progress. However, a look under the hood reveals surprisingly strict architectural constraints. The team used Cursor's AI capabilities to move fast, but they built a cage for the AI first.
By placing custom instructions in the .cursor/rules directory, the developers forced the LLM to adhere to strict Convex syntax, Next.js 15 App Router patterns, and rigid TypeScript validation. This approach allowed them to generate complex logic rapidly without the typical spaghetti code associated with hackathon-driven development.
// Example of the strict rules enforced in .cursor/rules/convex_rules.mdc
// Enforce Zod-like validation using Convex's 'v' validator
import { v } from "convex/values";
export const submissionSchema = {
status: v.union(v.literal("in-progress"), v.literal("submitted")),
githubUrl: v.optional(v.string()),
score: v.optional(v.number()),
};
// AI is instructed NEVER to bypass these validations.
Trusting the Backend
A major bottleneck in traditional full-stack applications is authentication boilerplate. Writing middleware to pass, decode, and verify JSON Web Tokens takes time that a one-week deadline does not permit. The t3-cloneathon stack bypasses this entirely.
By using the ConvexProviderWithClerk integration, the frontend authentication maps perfectly to the backend state out of the box. A simple helper function checks Clerk's public metadata to instantly lock down judging endpoints, providing robust Role-Based Access Control with minimal code.
| Traditional Stack (Postgres/Express) | t3-cloneathon Stack (Convex/Clerk) |
|---|---|
| Manual JWT verification middleware | ctx.auth.getUserIdentity() built-in |
| Complex SQL migrations for schema changes | Implicit schema pushing on save |
| Manual WebSockets for realtime updates | Zero-config reactive subscriptions via useQuery |
The Judging State Machine
A submission is not just a static row in a database. In this repository, it undergoes a strict lifecycle defined directly within the schema. It transitions from a draft state into a finalized submission.
To prevent administrative chaos, the system implements a claim workflow. Judges can lock a submission by populating a judgeId field, preventing double work. Once reviewed, the submission enters an array of finalist scores, allowing multiple judges to evaluate the top contenders efficiently.