How flappybeans/skillswitch works
This is a Next.js skill-swapping community: users create profiles, find peers, connect, arrange and confirm sessions, and earn leaderboard points. The tree also shows messaging, skill suggestions and moderation/admin capabilities. The graph combines sampled server-rendered workflows with the major feature areas named in the source index; unsampled feature internals and their data flows are not expanded beyond indexed references.
Main entry points: sessions/page.tsx Session board · auth.ts Current profile · server.ts Server client · connections/page.tsx Connections
Components 22
Identity & profiles
- Login & signup
app/(auth)/login/login-form.tsx - Authentication actions
app/(auth)/actions.ts - Profile management
app/(app)/profile/page.tsx - Public profiles
app/(app)/u/[username]/page.tsx
Peer discovery
- Find a pair
app/(app)/find-pair/page.tsx - Connections
app/(app)/connections/page.tsx - Matching rules
lib/match.ts - Connection actions
app/(app)/connections/actions.ts
Sessions & points
- Session board
app/(app)/sessions/page.tsx - Session proposals
app/(app)/sessions/new-session.tsx - Session actions
app/(app)/sessions/session-actions.tsx - Session lifecycle
lib/sessions.ts - Leaderboard
app/(app)/leaderboard/page.tsx
Messaging & administration
- Messages
app/(app)/messages/page.tsx - Admin & moderation
app/(app)/admin/page.tsx - Flag review
app/(app)/admin/flags/page.tsx - Admin actions
app/(app)/admin/actions.ts - Flag helpers
lib/flags.ts
Application services
- Server client
lib/supabase/server.ts - Current profile
lib/auth.ts - Supabase backend
Other components
- Community user
Connections 20
- Community user → Login & signup: signs in
- Login & signup → Authentication actions: submits credentials
app/(auth)/login/login-form.tsx - Authentication actions → Server client: creates client
app/(auth)/actions.ts - Current profile → Server client: creates client
lib/auth.ts - Find a pair → Matching rules: uses matching rules
app/(app)/find-pair/page.tsx - Community user → Find a pair: finds peers
- Community user → Profile management: edits profile
- Community user → Session board: schedules sessions
- Session board → Current profile: checks profile
app/(app)/sessions/page.tsx - Session board → Server client: queries backend
app/(app)/sessions/page.tsx - Session board → Session proposals: renders proposal form
app/(app)/sessions/page.tsx - Session board → Session actions: renders controls
app/(app)/sessions/page.tsx - Session board → Session lifecycle: groups sessions
app/(app)/sessions/page.tsx - Leaderboard → Current profile: checks profile
app/(app)/leaderboard/page.tsx - Leaderboard → Server client: queries rankings
app/(app)/leaderboard/page.tsx - Connections → Current profile: uses profile auth
app/(app)/connections/page.tsx - Connections → Connection actions: renders controls
app/(app)/connections/page.tsx - Messages → Current profile: uses profile auth
app/(app)/messages/page.tsx - Admin & moderation → Admin actions: loads admin data
app/(app)/admin/page.tsx - Flag review → Flag helpers: uses flag helpers
app/(app)/admin/flags/page.tsx