How binyam-ta/skillswap works
Skill Swap is a community app for users to present skills, discover teachers/learners, arrange exchanges, and communicate. The principal path runs from authentication and profile onboarding through skill browsing and swap management, with messaging supporting the exchange. Firebase provides identity, profile/swap/conversation data, and file storage. The tree and README document broader features than the sampled excerpts; arrows below are limited to evidenced calls or documented capabilities, so some page-to-page wiring is intentionally not inferred.
Main entry points: firebase.ts Firebase setup · page.tsx Landing page · Chat.tsx Chat component · AppContext.tsx App state context
Components 24
User experience
- Landing page
app/page.tsx - Login and signup
app/auth - Dashboard
app/dashboard/page.tsx - Profile onboarding
app/onboarding/page.tsx - Profile management
app/profile/page.tsx - User settings
app/settings/page.tsx
Skill exchange
- Browse skills
app/skills/browse/page.tsx - Swap overview
app/swaps/page.tsx - Pending swaps
app/swaps/pending/page.tsx - Active swaps
app/swaps/active/page.tsx - Completed swaps
app/swaps/completed/page.tsx
Communication
- Conversation list
app/messages/page.tsx - Direct chat
app/messages/[userId]/page.tsx - Chat component
components/Chat.tsx - Upload controls
components/FileUpload.tsx
Firebase platform
- App state context
context/AppContext.tsx - Realtime subscriptions
lib/realtimeDb.ts - Firebase setup
lib/firebase.ts - Firestore
- Firebase Auth
- Firebase Storage
- Storage utilities
lib/storage.ts - Upload hook
hooks/useFileUpload.ts
Other components
- Community user
Connections 36
- Community user → Landing page: visits
- Landing page → Login and signup: links to signup
- Landing page → Browse skills: links to browse
- Community user → Login and signup: signs in
- Login and signup → Firebase Auth: authenticates
- Firebase Auth → App state context: auth state
- App state context → Firestore: creates user record
- App state context → Realtime subscriptions: subscribes to user data
- Realtime subscriptions → Firestore: listens to records
- Community user → Profile onboarding: completes profile
- Profile onboarding → Firestore: updates profile
- Community user → Dashboard: opens dashboard
- Dashboard → Firestore: reads profile
- Community user → Profile management: edits profile
- Profile management → Firestore: reads and updates
- Community user → User settings: changes preferences
- User settings → Firestore: reads and updates
- Community user → Browse skills: finds skills
- Browse skills → Firestore: queries skills
- Community user → Swap overview: manages exchanges
- Swap overview → Firestore: queries swaps
- Community user → Pending swaps: reviews requests
- Community user → Active swaps: works on exchanges
- Community user → Completed swaps: reviews finished swaps
- Community user → Conversation list: opens messages
- Conversation list → Firestore: queries conversations
- Community user → Direct chat: starts direct chat
- Direct chat → Chat component: renders chat
- Chat component → Firestore: exchanges messages
- Chat component → Upload controls: attaches files
- Upload controls → Upload hook: uploads with progress
- Upload hook → Firebase Storage: uploads bytes
- Storage utilities → Firebase Storage: uploads and deletes
- Firebase setup → Firebase Auth: initializes
- Firebase setup → Firestore: initializes
- Firebase setup → Firebase Storage: initializes