How islamkhaled1/skillswap works
SkillSwap is a peer-to-peer skill-exchange backend where users arrange teaching sessions and transfer time-minute credits. The main evidenced runtime path is session booking through the API, which validates an accepted swap, checks quota and wallet balance under locks, and records an escrow hold; completion, cancellation, no-show, and dispute handling settle or release credits. The README also documents discovery, proposals, chat, reviews, and tier quotas, though several implementations are not sampled. Those branches are shown at supported paths; their internal wiring is therefore limited.
Main entry points: SessionsController.cs Session endpoints · Program.cs REST API · SessionBookingService.cs Booking and escrow · WalletsController.cs Wallet endpoints
Components 20
API and identity
- REST API
src/SkillSwap.API/Program.cs - JWT identity
src/SkillSwap.Infrastructure/Services/JwtTokenService.cs
Skill exchange
- Skills and matching
src/SkillSwap.Domain/Entities/Skill.cs - Availability
src/SkillSwap.Domain/Entities/AvailabilitySlot.cs - Swap proposals
src/SkillSwap.Domain/Entities/SwapRequest.cs - Conversations and chat
src/SkillSwap.API/Hubs/ChatHub.cs
Session lifecycle
- Session endpoints
src/SkillSwap.API/Controllers/SessionsController.cs - Session administration
src/SkillSwap.API/Controllers/AdminSessionsController.cs - Booking and escrow
src/SkillSwap.Application/Services/SessionBookingService.cs - Session operations
src/SkillSwap.Application/Services/SessionService.cs - Completion and expiry
src/SkillSwap.Application/Services/SessionCompletionService.cs - Session background jobs
src/SkillSwap.Infrastructure/BackgroundJobs/SessionAutoCompletionBackgroundService.cs
Wallet and quota
- Wallet endpoints
src/SkillSwap.API/Controllers/WalletsController.cs - Wallet and ledger
src/SkillSwap.Application/Services/WalletService.cs - Credit ledger
src/SkillSwap.Application/Services/CreditLedgerService.cs - Learning quotas
src/SkillSwap.Application/Services/QuotaService.cs - Wallet row locking
src/SkillSwap.Infrastructure/Services/SqlWalletLockService.cs
Community features
- Reviews
src/SkillSwap.Domain/Entities/Review.cs - EF data context
src/SkillSwap.Infrastructure/Persistence/ApplicationDbContext.cs
Other components
- Platform user
Connections 27
- Platform user → REST API: uses
README.md - Platform user → Conversations and chat: chats
README.md - REST API → Session endpoints: routes sessions
src/SkillSwap.API/Controllers/SessionsController.cs - REST API → Wallet endpoints: routes wallets
src/SkillSwap.API/Controllers/WalletsController.cs - REST API → JWT identity: authenticates with
- Platform user → Skills and matching: discovers skills
README.md - Platform user → Availability: sets availability
README.md - Platform user → Swap proposals: proposes swaps
README.md - Platform user → Reviews: reviews sessions
README.md - Session endpoints → Booking and escrow: books sessions
src/SkillSwap.API/Controllers/SessionsController.cs - Session endpoints → Session operations: manages sessions
src/SkillSwap.API/Controllers/SessionsController.cs - Session endpoints → Completion and expiry: completes sessions
src/SkillSwap.API/Controllers/SessionsController.cs - Session administration → Session operations: resolves disputes
src/SkillSwap.API/Controllers/AdminSessionsController.cs - Booking and escrow → Learning quotas: checks quota
src/SkillSwap.Application/Services/SessionBookingService.cs - Booking and escrow → Wallet row locking: locks wallets
src/SkillSwap.Application/Services/SessionBookingService.cs - Completion and expiry → Wallet row locking: locks wallets
src/SkillSwap.Application/Services/SessionCompletionService.cs - Session operations → Wallet row locking: locks wallets
src/SkillSwap.Application/Services/SessionService.cs - Session endpoints → Session background jobs: scheduled lifecycle
- Session background jobs → Completion and expiry: invokes lifecycle
src/SkillSwap.Infrastructure/BackgroundJobs/SessionAutoCompletionBackgroundService.cs - Wallet endpoints → Wallet and ledger: reads wallet
src/SkillSwap.API/Controllers/WalletsController.cs - Wallet endpoints → Credit ledger: reads ledger
src/SkillSwap.API/Controllers/WalletsController.cs - Wallet endpoints → Learning quotas: reads quota
src/SkillSwap.API/Controllers/WalletsController.cs - Booking and escrow → EF data context: reads and writes
- Completion and expiry → EF data context: reads and writes
- Session operations → EF data context: reads and writes
- Conversations and chat → REST API: registered by
src/SkillSwap.API/Program.cs - Platform user → Session endpoints: books and manages
README.md