How kxhor/skill-swap works
Skill Swap is a mutual skill-learning platform: users create profiles and list skills, discover compatible partners, propose and manage exchanges, then communicate and schedule sessions; completed swaps can receive feedback. The React client uses REST and Socket.IO to reach a Flask backend, which applies domain logic and persists relational data. Admin moderation, AI matching, image hosting, and calendar scheduling are documented capabilities. Some route and socket internals were not sampled, so uncertain subsystem wiring is omitted.
Main entry points: api.ts HTTP API client · __init__.py Flask application · App.tsx Application shell · SocketContext.tsx Socket client state
Components 30
Web client
- Application shell
frontend/src/App.tsx - Socket client state
frontend/src/context/SocketContext.tsx - HTTP API client
frontend/src/lib/api.ts
Identity and profiles
- Auth state
frontend/src/context/AuthContext.tsx - Profiles and skills
frontend/src/pages/MySkills.tsx - Partner discovery
frontend/src/pages/BrowseUsers.tsx - AI matching
backend/app/utils/gemini_match.py - User API
backend/app/routes/users.py - User and skill records
backend/app/models/user.py
Skill exchange
- Swap requests
frontend/src/pages/SwapRequests.tsx - Swap API client
frontend/src/hooks/useSwaps.ts - Swap lifecycle API
backend/app/routes/swaps.py - Swap records
backend/app/models/swap_request.py - Session scheduling
frontend/src/pages/Availability.tsx - Scheduled sessions
backend/app/models/scheduled_session.py - Calendar links
backend/app/utils/calendar_link.py - Real-time chat
frontend/src/components/ChatPanel.tsx - Socket event handlers
backend/app/socket_events.py - Reviews and feedback
frontend/src/pages/Reviews.tsx - Feedback API
backend/app/routes/feedback.py - Feedback records
backend/app/models/feedback.py
Platform services
- Admin dashboard
frontend/src/pages/AdminDashboard.tsx - Admin API
backend/app/routes/admin.py - Admin records
backend/app/models/admin.py - Flask application
backend/app/__init__.py
Other components
- Platform user
- Administrator
- Image hosting
- Google Gemini
- PostgreSQL
Connections 31
- Platform user → Application shell: uses
- Administrator → Application shell: uses
- Application shell → Auth state: provides auth
- Application shell → Socket client state: provides sockets
- Auth state → HTTP API client: requests
- Profiles and skills → HTTP API client: requests
- Partner discovery → HTTP API client: requests
- Swap requests → Swap API client: uses
- Swap API client → HTTP API client: requests
- Session scheduling → HTTP API client: requests
- Real-time chat → HTTP API client: loads history
- Real-time chat → Socket client state: sends messages
- Reviews and feedback → HTTP API client: requests
- Admin dashboard → HTTP API client: requests
- HTTP API client → Flask application: HTTP requests
- Flask application → User API: registers routes
- Flask application → Swap lifecycle API: registers routes
- Flask application → Feedback API: registers routes
- Flask application → Admin API: registers routes
- User API → User and skill records: reads and writes
- Swap lifecycle API → Swap records: reads and writes
- Feedback API → Feedback records: reads and writes
- Admin API → Admin records: reads and writes
- User and skill records → PostgreSQL: persists
- Swap records → PostgreSQL: persists
- Scheduled sessions → PostgreSQL: persists
- Feedback records → PostgreSQL: persists
- Admin records → PostgreSQL: persists
- Socket client state → Socket event handlers: Socket.IO
- Socket event handlers → Socket client state: events
- Flask application → Image hosting: initializes hosting