5
bracket formats: single and double elimination, round robin, Swiss and free-for-all
71
merged pull requests, counted on 19 October 2026
25
SQL migrations that build the tables, access rules and functions
The problem
An inter-faculty tournament needs brackets, match times and Valorant map pick/ban to stay consistent, while players and fans need to follow the results without making an account. I built this for the MU Esports club at Mahidol University.
What I built
- An organizer app: sign in, create an organization and events, and switch features on per event (pick/ban, brackets, more than one game).
- Brackets in five formats, group stages dealt by seeded or random draw, and a scheduler that plans match times.
- Valorant map pick/ban rooms for Best of 1, 3 or 5. Each captain gets their own team link, organization owners and admins act as host, and everyone else spectates.
- A public event page that anyone can open from a link, with no account, and that updates live as results change.
- Pick'em, where viewers predict match winners, with a leaderboard and a results image they can share.
- A Thai and English interface.
How I worked with an AI agent
I set the requirements, make the decisions and review every change, and Claude Code, an AI coding agent, writes most of the code. Every change reaches the main branch as a pull request, 71 of them by 19 October 2026.
- 1
MeSet the requirement.
- 2
Claude CodeAsk questions one at a time until nothing is left to guess.
- 3
Claude CodeImplement the change and check it in a headless browser.
- 4
MeReview the screenshots it sends.
- 5
Claude CodeOpen a pull request.
- 6
CIRun the checks on the pull request.
- 7
MeMerge once the checks pass.
- 8
AutomaticVercel deploys the new version.
How I kept it correct
- Turn order in pick/ban rooms is enforced inside the database by a function, not only in the browser.
- Access rules are Row Level Security policies in PostgreSQL. Owners, admins and viewers have different rights, and only events marked public can be read by anyone with the link.
- Rules that the screen also shows, such as when a Pick'em prediction locks and how many points a correct pick earns, are defined in the database and mirrored in the client code.
- Bracket logic lives in PL/pgSQL functions, and every migration can be run twice safely.
What happened
- The demo is the finished archive of the MU Game 2026 (March) inter-faculty Valorant tournament, 13 to 25 March 2026: three round-robin groups, a double-elimination play-off and the map pick/ban records.
- It also holds the real schedule of the EG faculty's upcoming Valorant and ROV tournaments.
- It began as the MU Game 2026 Valorant pick/ban portal and has grown into a platform that several organizations can use.
- An MCP server now lets an AI assistant read events and move a match, rename a team or save a result with the organizer's own permissions. The Tournament Hub Agent case study covers how it is kept safe.
Next steps and limits
- The project's own notes describe the direction: from one tournament's portal to a platform where other organizations run their own events.
- Supabase's built-in email sender is heavily rate limited, so real use needs custom email setup or the staff access codes that let people join without an account.
- The source code is private, so the live demo is the way to see it.