SwingAdmin
Golf tournament management system
Admin panel and public registration for golf tournaments: tournaments, teams, sponsorship tiers, Stripe payments and bilingual confirmation emails.
Tech stack
- Next.js 16
- TypeScript
- Tailwind CSS 4
- shadcn/ui
- Drizzle ORM
- PostgreSQL
- NextAuth.js v5
- Stripe
- Resend
- next-intl
- Zod v4
- Vitest
01Problem
A golf tournament has many moving parts at once: player and sponsor registrations, team assignments, sponsorship quotas and payments. Without a dedicated tool, organizers end up juggling forms, spreadsheets and emails.
02Goal
One application where organizers manage tournaments end to end, and where employees and sponsors register and pay online, in English or French.
03My role
Solo project: requirements, database design, front end, back end, tests and deployment.
04What I built
- Tournament management with search and filtering
- Teams: create teams, assign players, move players between teams
- Sponsorship tiers with quota tracking and reordering
- Public registration in several steps (employee: 3, sponsor: 4)
- Stripe Checkout with webhook handling
- Confirmation emails with Resend
- CSV exports of tournaments, teams and players
- Admin users with super_admin and admin roles
- Responsive admin layout: mobile menu, desktop sidebar
05Architecture
- Interface
- Next.js 16 App Router
- shadcn/ui
- Tailwind CSS 4
- next-intl (EN/FR)
- Server
- Server Actions
- NextAuth.js v5 (JWT)
- Zod v4 validation
- Stripe webhook route
- Data
- Drizzle ORM
- PostgreSQL (Neon)
- External services
- Stripe Checkout
- Resend
06Database
PostgreSQL modelled with Drizzle ORM: admin users, tournaments, teams (with unique team codes), players, registrations, sponsorship tiers and sponsorships, linked by foreign keys.
07Authentication & security
Credentials sign-in with NextAuth.js v5 and JWT sessions, passwords hashed with bcrypt, role-based access (super_admin vs admin), and Zod validation on server action inputs.
08Testing
180 unit tests with Vitest and v8 coverage, written next to the server actions they cover: tournaments, teams, registrations, sponsorship tiers, users and CSV export.
09Deployment
Deployed on Vercel with a Neon PostgreSQL database. Stripe and Resend are optional: without keys, the app logs to the console instead of failing.
10Known limitations
- The public demo has no read-only account yet, so demo access is not shared publicly.
11Next steps
- Read-only demo role so visitors can explore safely
- End-to-end tests for the registration and payment flow