How kookie172006/skillswap-crt-project- works
SkillSwap is a web platform for finding skill partners, arranging reciprocal lessons, and accounting for exchanges with credits. The browser-facing features cover profiles, skill discovery, requests, sessions, messages, reviews, and transaction history; the backend exposes account, profile, skill, swap, and credit APIs. The sampled code shows swap completion updating participant balances and recording transactions. Frontend-to-API wiring and several UI feature implementations were not excerpted, so those links are shown as unverified rather than asserted.
Main entry points: app.js API router · authRoutes.js Auth routes · userRoutes.js Profile routes · swapController.js Swap lifecycle
Components 31
Web client
- Sign in and register
frontend/js/auth.js - Dashboard
frontend/js/dashboard.js - Skill search
frontend/js/search.js - Skill listings
frontend/js/skills.js - Swap requests
frontend/js/requests.js - Lesson sessions
frontend/js/sessions.js - Messages
frontend/js/messages.js - Reviews
frontend/js/reviews.js - Profile
frontend/js/profile.js - Credit history
frontend/js/transactions.js
Accounts and profiles
- Auth routes
backend/src/routes/authRoutes.js - Authentication
backend/src/controllers/authController.js - Auth validation
backend/src/validators/authValidators.js - Token protection
backend/src/middleware/authMiddleware.js - Profile routes
backend/src/routes/userRoutes.js - Profile management
backend/src/controllers/userController.js - Profile validation
backend/src/validators/userValidators.js - User records
backend/src/models/User.js
Skill discovery
- Skill routes
backend/routes/skillRoutes.js - Skill search and matching
backend/controllers/skillController.js - Skill records
backend/models/Skill.js
Swap and credits
- Swap routes
backend/routes/swapRoutes.js - Swap lifecycle
backend/controllers/swapController.js - Swap records
backend/models/Swap.js - Credit routes
backend/routes/creditRoutes.js - Balance and history
backend/controllers/creditController.js - Credit transactions
backend/models/Transaction.js
API platform
- API router
backend/src/app.js - API startup
backend/src/server.js - Database connection
backend/src/config/db.js
Other components
- Platform user
Connections 44
- Platform user → Sign in and register: uses
- Platform user → Dashboard: uses
- Platform user → Skill search: searches
- Platform user → Skill listings: manages skills
- Platform user → Swap requests: requests swaps
- Platform user → Lesson sessions: completes lessons
- Platform user → Messages: communicates
- Platform user → Reviews: reviews
- Platform user → Profile: edits profile
- Platform user → Credit history: checks credits
- Sign in and register → API router: calls API
- Dashboard → API router: calls API
- Skill search → API router: calls API
- Skill listings → API router: calls API
- Swap requests → API router: calls API
- Lesson sessions → API router: calls API
- Messages → API router: calls API
- Reviews → API router: calls API
- Profile → API router: calls API
- Credit history → API router: calls API
- API startup → API router: starts
backend/src/server.js - API startup → Database connection: connects database
backend/src/server.js - API router → Auth routes: routes auth
backend/src/app.js - API router → Profile routes: routes profiles
backend/src/app.js - API router → Skill routes: routes skills
backend/src/app.js - API router → Swap routes: routes swaps
backend/src/app.js - API router → Credit routes: routes credits
backend/src/app.js - Auth routes → Auth validation: validates input
backend/src/routes/authRoutes.js - Auth routes → Authentication: dispatches
backend/src/routes/authRoutes.js - Auth routes → Token protection: protects current user
backend/src/routes/authRoutes.js - Authentication → User records: reads and creates
backend/src/controllers/authController.js - Profile routes → Token protection: protects profile routes
backend/src/routes/userRoutes.js - Profile routes → Profile validation: validates updates
backend/src/routes/userRoutes.js - Profile routes → Profile management: dispatches
backend/src/routes/userRoutes.js - Profile management → User records: reads and updates
backend/src/controllers/userController.js - Skill routes → Skill search and matching: dispatches
backend/routes/skillRoutes.js - Skill search and matching → Skill records: searches and writes
backend/controllers/skillController.js - Swap routes → Swap lifecycle: dispatches
backend/routes/swapRoutes.js - Swap lifecycle → Swap records: reads and updates
backend/controllers/swapController.js - Swap lifecycle → User records: transfers credits
backend/controllers/swapController.js - Swap lifecycle → Credit transactions: records transfers
backend/controllers/swapController.js - Credit routes → Balance and history: dispatches
backend/routes/creditRoutes.js - Balance and history → User records: reads balance
backend/controllers/creditController.js - Balance and history → Credit transactions: reads history
backend/controllers/creditController.js