EntryDesk is a role-based event management dashboard for martial arts / sports events.
- Organizers create events, approve/reject coach applications, and review/export entries.
- Coaches manage dojos + students, apply to public events, and submit entries for approved events.
Built with Next.js App Router + Supabase (Auth + Postgres) and a clean Tailwind/shadcn UI.
- Next.js (App Router) (see
nextinpackage.json) - React
- Supabase
- Auth (email/password + optional Google OAuth)
- Postgres (tables + RLS policies)
- SSR helpers via
@supabase/ssr
- Tailwind CSS + Radix UI components (shadcn-style)
- Create and manage events (public/private)
- Approve/reject coach applications per event
- View all entries for your events via the
organizer_entries_view - Export entries
- Clickable metric cards that deep-link into filtered views
- Manage dojos and students
- Browse public events and apply to participate
- Manage entries per event (draft/submitted/approved/rejected)
- Simplified event participation UI (overview + entries + register flow combined)
- Determinate navigation loader overlay for instant feedback
- “One-step back” behavior using browser history (no forced jump to list pages)
- Professional, compact dashboard layout
src/app/— Next.js routessrc/app/page.tsx— landingsrc/app/login/— login/registersrc/app/auth/callback/route.ts— OAuth callback (/auth/callback)src/app/dashboard/— role-based dashboard routes
src/lib/supabase/client.ts— browser clientserver.ts— server client (cookies)middleware.ts— session refresh helper
src/proxy.ts— Next.js proxy hook for session refresh (replaces deprecated middleware convention)supabase/migrations/db.sql— schema + RLS policies +organizer_entries_view
- Node.js (recommend Node 20+)
- A Supabase project (free tier is fine)
npm installCopy the template:
copy .env.example .env.localFill in the values from Supabase:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYNEXT_PUBLIC_BASE_URL(local default:http://localhost:3000)
The template lives in .env.example.
This repo stores the schema and policies in:
supabase/migrations/db.sql
Recommended (simple) approach:
- Supabase Dashboard → SQL Editor
- Paste the contents of
supabase/migrations/db.sql - Run it
That creates:
- tables:
profiles,dojos,students,events,event_days,categories,event_applications,entries - enums:
user_role,event_type,entry_status - RLS policies for the app
- view:
organizer_entries_view
Works out of the box once your Supabase project is created.
If you use “Sign in with Google”, you must configure redirect URLs.
- Supabase Dashboard → Authentication → Providers → Google
- Enable Google and add your OAuth client ID/secret
- Set allowed redirect URLs to include:
http://localhost:3000/auth/callback
- Ensure
NEXT_PUBLIC_BASE_URL=http://localhost:3000locally
The app’s OAuth redirect is:
${NEXT_PUBLIC_BASE_URL}/auth/callback
npm run devOpen http://localhost:3000.
Supabase Auth users exist in auth.users, but the app’s role system uses public.profiles.
- Some flows will auto-create
profilesif missing (ex: applying to an event). - If you need to guarantee profiles exist immediately after signup, add a DB trigger later.
To use organizer routes (create/manage events), a user must have:
- a row in
public.profiles role = 'organizer'
You can update it from Supabase SQL editor. Example:
-- Replace <USER_UUID> and <EMAIL>
insert into public.profiles (id, email, role)
values ('<USER_UUID>', '<EMAIL>', 'organizer')
on conflict (id) do update set role = 'organizer';You can get the user UUID from Supabase Dashboard → Authentication → Users.
- Go to Dashboard → Events
- Create an event, set it public if coaches should be able to apply
- Review coach applications (Approvals)
- Review entries for the event and export as needed
- Create Dojos + Students
- Browse public events
- Apply to an event
- Once approved, go to Entries and register students + submit entries
From package.json:
npm run dev— start dev servernpm run build— production buildnpm run start— run production servernpm run lint— eslint
- Confirm
.env.localhas the correctNEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEY. - Confirm you ran
supabase/migrations/db.sqlin the correct Supabase project.
- Ensure the schema is applied (especially
profilesandevent_applications). - Ensure RLS policies from
supabase/migrations/db.sqlare in place.
This usually indicates a dev-only runtime error. Quick checklist:
rm -rf .next
npm install
npm run devIf it still fails, copy the full terminal output (stack trace) and we’ll pin the exact cause.
- Set the same env vars in your host (Vercel/Render/etc):
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYNEXT_PUBLIC_BASE_URL=https://<your-domain>
- Update Supabase Auth redirect URLs to include your production domain:
https://<your-domain>/auth/callback