Skip to main content
The admin portal is a restricted internal dashboard available at /admin/registrations. It gives authorized staff real-time visibility into event registrations, attendance projections, and demographic breakdowns for the NJ Rajat Mahotsav (July 29 – August 2, 2026).
Access is restricted to Google accounts with an @nj.sgadi.us email address. Signing in with any other account redirects you to /admin/registrations/unauthorized.

Access

PropertyValue
Route/admin/registrations
Auth providerGoogle OAuth via Supabase
Allowed domain@nj.sgadi.us
Unauthorized redirect/admin/registrations/unauthorized
The page is rendered server-side on every request (export const dynamic = "force-dynamic"). Unauthenticated visitors see a sign-in prompt; authenticated users with a non-allowed email are redirected immediately.

Dashboard layout

After signing in, the dashboard renders in this order:
  1. Header bar — displays your signed-in email and a sign-out button.
  2. Summary stat cards — four animated metric tiles (Total Registrations, Peak Daily Attendance, Avg Daily Arrivals, Unique Ghaams).
  3. Charts section — three chart panels loaded lazily: Daily Expected Attendance (line), Arrivals by Date (bar), Departures by Date (bar), Highest Attendees by Ghaam (ranked table), Highest Attendees by Mandal (ranked table).
  4. Registrations table — paginated, filterable, and searchable table loaded on demand.

Features overview

Registration stats

Animated summary cards show total registrations, peak daily attendance, average daily arrivals, and the number of unique Ghaams represented.

Attendance charts

Recharts-powered visualizations for daily expected attendance, arrivals by date, and departures by date. Core event dates (Jul 27 – Aug 2) are highlighted with a shaded reference area.

Ghaam & Mandal breakdown

Ranked tables showing the top 8 Ghaams and Mandals by attendee count. A “View all” dialog expands to the full sorted list.

Registrations table

Paginated table with full-text search, dropdown filters (Ghaam, Mandal, Country), and expandable age and date-range filters. Supports 25, 50, or 100 rows per page.

CSV export

Export the entire registration list or the current filtered view as a UTF-8 CSV with BOM. Filtered exports stream rows in chunks of 500 to handle large datasets.

Keyset pagination

The table uses cursor-based (keyset) pagination ordered by id DESC, enabling consistent performance as the dataset grows.

Stats data source

Dashboard statistics are fetched from the Supabase get_registrations_stats RPC, scoped to the event date range defined in lib/registration-date-range.ts. The RPC returns:
  • total_registrations — total row count
  • daily_expected_attendance — projected attendees per calendar date
  • counts_by_arrival_date — registrant counts per arrival date
  • counts_by_departure_date — registrant counts per departure date
  • counts_by_ghaam — attendee counts keyed by Ghaam name
  • counts_by_mandal — attendee counts keyed by Mandal name
If the RPC fails, the dashboard degrades gracefully and still renders the registrations table.

Build docs developers (and LLMs) love