How princekr267/skillsphere works
SkillSphere is a hyperlocal freelance marketplace. Clients and freelancers register with role-specific profiles and locations; clients post gigs, freelancers discover nearby work and apply, and clients manage applicants and hiring. The product also supports milestone progress, escrow payments, appointments, reviews, company accounts, real-time messaging and notifications, and administration. The graph combines the documented marketplace workflow with sampled route, authentication, API, persistence, and socket wiring. Several domain controllers were not sampled, so their internal calls are not expanded.
Main entry points: server.ts HTTP and socket server · api.ts API client · socket.ts Realtime events · gigController.ts Gig lifecycle
Components 27
Marketplace client
- Application routing
client/src/App.tsx - Identity and sessions
client/src/context/AuthContext.tsx - API client
client/src/utils/api.ts - Gig discovery
client/src/pages/BrowseGigs.tsx - Client gig management
client/src/pages/dashboards/ClientGigManager.tsx - Freelancer workspace
client/src/pages/dashboards/FreelancerDashboard.tsx - Client dashboard
client/src/pages/dashboards/ClientDashboard.tsx - Profiles and reviews
client/src/pages/FreelancerProfile.tsx - Company accounts
client/src/pages/CompanyDashboard.tsx - Administration
client/src/pages/dashboards/AdminDashboard.tsx
API and domain services
- HTTP and socket server
server/src/server.ts - Authentication
server/src/controllers/authController.ts - Gig lifecycle
server/src/controllers/gigController.ts - Payments and escrow
server/src/controllers/paymentController.ts - Review handling
server/src/controllers/reviewController.ts - Company operations
server/src/controllers/companyController.ts - Content moderation
server/src/services/moderationService.ts
Marketplace data
- MongoDB
server/src/config/db.ts - User records
server/src/models/User.ts - Gig records
server/src/models/Gig.ts - Proposals
server/src/models/Proposal.ts - Payment records
server/src/models/Payment.ts - Review records
server/src/models/Review.ts
Realtime and messaging
- Notifications
server/src/models/Notification.ts - Realtime events
server/src/socket.ts - Chat messages
server/src/models/Message.ts
Other components
- Clients and freelancers
Connections 38
- Clients and freelancers → Application routing: use marketplace
- Application routing → Identity and sessions: provides session
client/src/App.tsx - Application routing → Gig discovery: routes to
client/src/App.tsx - Application routing → Client dashboard: routes to
client/src/App.tsx - Application routing → Profiles and reviews: routes to
client/src/App.tsx - Identity and sessions → API client: calls API
client/src/context/AuthContext.tsx - Gig discovery → API client: requests gigs
- Client dashboard → Client gig management: opens manager
client/src/pages/dashboards/ClientDashboard.tsx - Client gig management → API client: requests gig data
client/src/pages/dashboards/ClientGigManager.tsx - Freelancer workspace → API client: requests work data
- Profiles and reviews → API client: requests profile data
- Company accounts → API client: requests company data
- Administration → API client: requests admin data
- API client → HTTP and socket server: sends HTTP requests
- HTTP and socket server → MongoDB: connects to
server/src/server.ts - HTTP and socket server → Authentication: mounts auth routes
server/src/server.ts - HTTP and socket server → Gig lifecycle: mounts gig routes
server/src/server.ts - HTTP and socket server → Review handling: mounts review routes
server/src/server.ts - HTTP and socket server → Company operations: mounts company routes
server/src/server.ts - HTTP and socket server → Realtime events: initializes socket
server/src/server.ts - Authentication → User records: loads users
server/src/controllers/authController.ts - Gig lifecycle → Gig records: creates and queries
server/src/controllers/gigController.ts - Gig lifecycle → Content moderation: moderates gig text
server/src/controllers/gigController.ts - Review handling → Review records: queries reviews
server/src/controllers/reviewController.ts - Review handling → Gig records: checks gig status
server/src/controllers/reviewController.ts - Review handling → User records: updates rating
server/src/controllers/reviewController.ts - Review handling → Realtime events: sends notification
server/src/controllers/reviewController.ts - Gig lifecycle → Proposals: uses proposals
server/src/controllers/gigController.ts - Gig lifecycle → Notifications: creates notifications
server/src/controllers/gigController.ts - Gig lifecycle → Realtime events: emits events
server/src/controllers/gigController.ts - Payments and escrow → Payment records: uses payment records
server/src/controllers/paymentController.ts - Payments and escrow → Gig records: uses gig records
server/src/controllers/paymentController.ts - Payments and escrow → Proposals: uses proposals
server/src/controllers/paymentController.ts - Payments and escrow → Notifications: uses notifications
server/src/controllers/paymentController.ts - Payments and escrow → Realtime events: emits events
server/src/controllers/paymentController.ts - Realtime events → Chat messages: creates messages
server/src/socket.ts - Realtime events → Content moderation: moderates chat
server/src/socket.ts - Realtime events → Gig records: checks gig access
server/src/socket.ts