How abhiram-photon/campus-connect works
Campus Workspace is a private, role-aware collaboration app. Users authenticate, enter a workspace, and use role-specific pages for events, connections, groups, Q&A, mentorship, messaging, profiles, and settings. Server Components read through the authenticated Supabase client; server actions handle mutations, while PostgreSQL RPCs, triggers, and RLS enforce sensitive operations. Feature coverage follows the README and source index; several feature implementations and the action module were not excerpted, so their internal call paths are not expanded.
Main entry points: workspace-actions.ts Workspace actions · workspace.ts Workspace context · workspace-frame.tsx Workspace shell · page.tsx Home dashboard
Components 20
Entry and workspace
- Sign-in and signup
src/components/auth-forms.tsx - Auth actions
src/app/auth-actions.ts - Workspace shell
src/components/workspace-frame.tsx - Home dashboard
src/app/(workspace)/home/page.tsx
Events and connections
- Event listings
src/app/(workspace)/events/page.tsx - Event detail
src/app/(workspace)/events/[eventId]/page.tsx - Connections
src/app/(workspace)/connections/page.tsx
Groups and Q&A
- Faculty groups
src/app/(workspace)/groups/page.tsx - Academic Q&A
src/app/(workspace)/qa/page.tsx - Q&A post
src/components/qa-post.tsx - Mentorship
src/app/(workspace)/mentorship/page.tsx
Messaging and profiles
- Messaging
src/app/(workspace)/messages/page.tsx - Chat panel
src/components/chat-panel.tsx - User profiles
src/app/(workspace)/profile/[userId]/page.tsx - Profile settings
src/app/(workspace)/settings/page.tsx
Server and data
- Workspace actions
src/app/workspace-actions.ts - Workspace context
src/lib/workspace.ts - Server Supabase client
src/lib/supabase/server.ts - Supabase database
supabase/migrations/0001_campus_workspace.sql
Other components
- Campus user
Connections 29
- Campus user → Sign-in and signup: signs in
README.md - Sign-in and signup → Auth actions: submits credentials
src/components/auth-forms.tsx - Auth actions → Server Supabase client: authenticates
- Campus user → Workspace shell: opens workspace
- Workspace shell → Workspace actions: loads notifications
src/components/workspace-frame.tsx - Workspace shell → Home dashboard: navigates
src/components/workspace-frame.tsx - Home dashboard → Workspace context: gets context
src/app/(workspace)/home/page.tsx - Event listings → Workspace context: gets context
src/app/(workspace)/events/page.tsx - Event detail → Workspace context: gets context
src/app/(workspace)/events/[eventId]/page.tsx - Connections → Workspace context: gets context
src/app/(workspace)/connections/page.tsx - Faculty groups → Workspace context: gets context
src/app/(workspace)/groups/page.tsx - Academic Q&A → Workspace context: gets context
src/app/(workspace)/qa/page.tsx - User profiles → Workspace context: gets context
src/app/(workspace)/profile/[userId]/page.tsx - Workspace context → Server Supabase client: creates client
src/lib/workspace.ts - Server Supabase client → Supabase database: reads with session
README.md - Home dashboard → Workspace actions: registers or connects
src/app/(workspace)/home/page.tsx - Event listings → Workspace actions: mutates events
README.md - Event detail → Workspace actions: manages event
src/app/(workspace)/events/[eventId]/page.tsx - Connections → Workspace actions: responds to requests
README.md - Faculty groups → Workspace actions: manages membership
README.md - Academic Q&A → Q&A post: renders posts
src/app/(workspace)/qa/page.tsx - Q&A post → Workspace actions: posts and votes
src/components/qa-post.tsx - Mentorship → Workspace actions: manages requests
- Messaging → Chat panel: renders chat
- Messaging → Workspace actions: sends messages
- User profiles → Workspace actions: offers profile actions
src/app/(workspace)/profile/[userId]/page.tsx - Profile settings → Workspace actions: updates settings
- Workspace actions → Supabase database: mutates through RPCs
README.md - Supabase database → Workspace shell: emits notifications