How bayside-hub/bayside-hub-demo works
Bayside Hub is a school community portal for students and staff. Students sign in, browse announcements, clubs, events, calendars and opportunities, then use club membership, event RSVP and support workflows; staff and admins review submissions and manage content and roles. Next.js route components expose these workflows, domain libraries load and normalize content, and Supabase provides authentication and persistent data. The README documents additional capabilities such as club chat, attendance, finance and governance; these are represented at their exact route-directory level because their implementations were not sampled. Connections are limited to README statements and indexed imports.
Main entry points: server.ts Supabase server client · page.tsx Home dashboard · search.ts Search aggregation · events.ts Events and calendar data
Components 23
Student experience
- Home dashboard
src/app/page.tsx - Announcements
src/lib/announcements.ts - Announcement pages
src/app/(hub)/announcements - Opportunities
src/lib/opportunities.ts - Search endpoint
src/app/api/search/route.ts - Search aggregation
src/lib/search.ts
Clubs and events
- Club directory data
src/lib/clubs.ts - Club workflows
src/app/(hub)/clubs - Events and calendar data
src/lib/events.ts - Calendar views
src/app/(hub)/calendar - Event workflows
src/app/(hub)/events
Staff operations
- Administration
src/app/(hub)/admin - Support requests
src/app/(hub)/support - Notifications
src/app/(hub)/notifications
Platform services
- Identity and roles
src/lib/auth.ts - Sign-in callback
src/app/auth/callback/route.ts - Hub application shell
src/components/hub-shell.tsx - Seed content and shared models
src/lib/data.ts - Supabase server client
src/lib/supabase/server.ts - Auth session settings
src/lib/supabase/auth-session.ts - Analytics endpoint
src/app/api/analytics/route.ts
Other components
- Student or staff
- Supabase database and auth
Connections 41
- Student or staff → Sign-in callback: signs in
README.md - Sign-in callback → Supabase server client: creates session
src/app/auth/callback/route.ts - Sign-in callback → Identity and roles: checks email
src/app/auth/callback/route.ts - Identity and roles → Supabase server client: loads identity
src/lib/auth.ts - Supabase server client → Auth session settings: configures cookies
src/lib/supabase/server.ts - Supabase server client → Supabase database and auth: connects to
src/lib/supabase/server.ts - Student or staff → Home dashboard: opens portal
README.md - Home dashboard → Announcements: loads feed
src/app/page.tsx - Home dashboard → Club directory data: loads clubs
src/app/page.tsx - Home dashboard → Events and calendar data: loads events
src/app/page.tsx - Home dashboard → Opportunities: loads listings
src/app/page.tsx - Home dashboard → Hub application shell: renders within
src/app/page.tsx - Hub application shell → Identity and roles: loads user
src/components/hub-shell.tsx - Student or staff → Announcement pages: browses announcements
README.md - Announcement pages → Announcements: loads content
src/app/(hub)/announcements/feed.xml/route.ts - Student or staff → Club workflows: browses and joins
README.md - Club workflows → Club directory data: loads directory data
src/lib/clubs.ts - Student or staff → Calendar views: views calendar
README.md - Student or staff → Event workflows: views and RSVPs
README.md - Event workflows → Events and calendar data: loads event data
- Calendar views → Events and calendar data: uses calendar data
- Student or staff → Opportunities: browses listings
README.md - Student or staff → Search endpoint: searches portal
- Search endpoint → Search aggregation: gets results
src/app/api/search/route.ts - Search aggregation → Club directory data: queries clubs
src/lib/search.ts - Search aggregation → Announcements: queries announcements
src/lib/search.ts - Search aggregation → Events and calendar data: queries events
src/lib/search.ts - Search aggregation → Opportunities: queries listings
src/lib/search.ts - Student or staff → Support requests: requests help
README.md - Student or staff → Administration: staff manages portal
README.md - Administration → Identity and roles: guards access
src/app/(hub)/admin/audit/export/route.ts - Student or staff → Notifications: views updates
- Home dashboard → Seed content and shared models: uses shared models
src/app/page.tsx - Announcements → Supabase server client: reads published content
src/lib/announcements.ts - Club directory data → Supabase server client: reads club data
src/lib/clubs.ts - Events and calendar data → Supabase server client: reads event data
src/lib/events.ts - Opportunities → Supabase server client: reads listings
src/lib/opportunities.ts - Student or staff → Analytics endpoint: sends usage events
- Analytics endpoint → Supabase server client: records events
src/app/api/analytics/route.ts - Administration → Supabase database and auth: manages domain records
README.md - Club workflows → Supabase database and auth: membership and governance
README.md