How anushkagupta12/skillswap works
SkillSwap is a skill-barter platform: users create profiles, discover and rank complementary skills, send swap requests, and communicate through persisted real-time chat. The graph follows the documented user-to-result journey while showing backend persistence, authentication, and socket presence as supporting layers. Several UI and API capabilities are documented but their implementation was not excerpted; those modules are represented at their exact tree paths, with links limited to evidenced calls or README statements.
Main entry points: App.jsx App routing · AuthContext.jsx Auth state · Chat.jsx Chat experience · SocketContext.jsx Socket client
Components 32
User experience
- App routing
frontend/src/App.jsx - Live swap alerts
frontend/src/context/SocketContext.jsx - Navigation and inbox
frontend/src/components/Navbar.jsx - Toast feedback
frontend/src/context/ToastContext.jsx - Avatar
frontend/src/components/Avatar.jsx - Loading indicator
frontend/src/components/Spinner.jsx - Community content
frontend/src/components/Community.jsx - Feedback content
frontend/src/components/Feedback.jsx - Landing page
frontend/src/pages/Home.jsx
Identity and profiles
- Auth state
frontend/src/context/AuthContext.jsx - Sign in / register
frontend/src/pages - Profile editor
frontend/src/pages/Profile.jsx - Member profile
frontend/src/pages/UserProfile.jsx - Skill editor
frontend/src/components/SkillInput.jsx
Skill discovery and swaps
- Browse and search
frontend/src/pages/Browse.jsx - Match rankings
frontend/src/pages/Matches.jsx - Matching presentation
frontend/src/components/SmartMatching.jsx - Member cards
frontend/src/components/UserCard.jsx - Swap request APIs
backend/routes/users.js
Messaging and presence
- Chat experience
frontend/src/pages/Chat.jsx - Chat display
frontend/src/components/ChatUI.jsx - Socket client
frontend/src/context/SocketContext.jsx - Socket server
backend/server.js - Chat APIs
backend/routes/chat.js
API and persistence
- User records
backend/models/User.js - Auth API
backend/routes/auth.js - JWT protection
backend/middleware/auth.js - Conversations and messages
backend/models/Chat.js - MongoDB
- Express API server
backend/server.js - Database connector
backend/config/db.js
Other components
- Visitor / member
Connections 48
- Visitor / member → App routing: uses
frontend/src/App.jsx - App routing → Auth state: provides
frontend/src/App.jsx - App routing → Sign in / register: routes to
frontend/src/App.jsx - App routing → Browse and search: routes to
frontend/src/App.jsx - App routing → Match rankings: routes to
frontend/src/App.jsx - App routing → Chat experience: routes to
frontend/src/App.jsx - App routing → Member profile: routes to
frontend/src/App.jsx - App routing → Profile editor: routes to
frontend/src/App.jsx - Sign in / register → Auth state: calls auth
frontend/src/pages/Login.jsx - Sign in / register → Auth API: requests
- Auth state → Auth API: loads identity
frontend/src/context/AuthContext.jsx - Profile editor → Auth state: updates profile
frontend/src/pages/Profile.jsx - Auth API → JWT protection: guards profile
backend/routes/auth.js - Auth API → User records: reads and updates
backend/routes/auth.js - JWT protection → User records: loads user
backend/middleware/auth.js - User records → MongoDB: persists
- Browse and search → Member cards: renders
frontend/src/pages/Browse.jsx - Browse and search → Auth state: requests users
frontend/src/pages/Browse.jsx - Match rankings → Member cards: renders
frontend/src/pages/Matches.jsx - Match rankings → Matching presentation: presents matches
- Match rankings → Auth state: requests matches
frontend/src/pages/Matches.jsx - Member cards → Avatar: renders
frontend/src/components/UserCard.jsx - Member profile → Auth state: requests profile
frontend/src/pages/UserProfile.jsx - Member profile → Socket client: uses presence
frontend/src/pages/UserProfile.jsx - Member profile → Swap request APIs: sends requests
- Swap request APIs → JWT protection: guards routes
backend/routes/users.js - Swap request APIs → User records: reads and updates
backend/routes/users.js - Navigation and inbox → Auth state: uses account
frontend/src/components/Navbar.jsx - Navigation and inbox → Socket client: shows alerts
frontend/src/components/Navbar.jsx - App routing → Live swap alerts: renders alerts
frontend/src/App.jsx - Live swap alerts → Socket server: receives events
- Chat experience → Auth state: requests chat
frontend/src/pages/Chat.jsx - Chat experience → Socket client: uses messaging
frontend/src/pages/Chat.jsx - Chat experience → Chat display: renders
- Chat experience → Avatar: renders
frontend/src/pages/Chat.jsx - Socket client → Auth state: uses token
frontend/src/context/SocketContext.jsx - Socket client → Socket server: sends socket events
frontend/src/context/SocketContext.jsx - Socket server → Conversations and messages: creates and reads
backend/server.js - Chat APIs → JWT protection: guards routes
backend/routes/chat.js - Chat APIs → Conversations and messages: reads and writes
backend/routes/chat.js - Conversations and messages → MongoDB: persists
- Express API server → Auth API: mounts
backend/server.js - Express API server → Swap request APIs: mounts
backend/server.js - Express API server → Chat APIs: mounts
backend/server.js - Express API server → Database connector: connects
backend/server.js - Database connector → MongoDB: connects
- Profile editor → Skill editor: edits skills
frontend/src/pages/Profile.jsx - Sign in / register → Skill editor: collects skills
frontend/src/pages/Register.jsx