How mustufa-asad8/home-serve works
HomeServe is a home-services marketplace and operations platform. Customers discover and filter services, authenticate, and submit bookings; providers manage their assigned requests and publish services; administrators review analytics and intervene in appointments. The React app routes users into role-specific workspaces and calls the Express gateway, which owns public authentication and authorization before accessing the private Django data service and PostgreSQL. The README also documents Socket.IO updates and optional SMTP. Some detailed route and integration links are based on README or SOURCE INDEX references rather than shown source excerpts.
Main entry points: App.tsx App routing · AppContext.tsx App state · dataService.js Internal API client · app.js HTTP API router
Components 29
Marketplace web app
- App routing
apps/web/src/App.tsx - App state
apps/web/src/lib/AppContext.tsx - API client
apps/web/src/lib/api.ts - Service discovery
apps/web/src/pages/ServicesPage.tsx - Service booking entry
apps/web/src/components/ServiceCard.tsx - Booking drawer
apps/web/src/components/BookingDrawer.tsx - Customer workspace
apps/web/src/pages/DashboardPage.tsx - Appointment history
apps/web/src/pages/AppointmentsPage.tsx - Provider workspace
apps/web/src/pages/ProviderPage.tsx - Admin operations
apps/web/src/pages/AdminPage.tsx - Sign in and register
apps/web/src/pages/AuthPage.tsx
Public API gateway
- HTTP API router
services/gateway/src/app.js - Authentication routes
services/gateway/src/routes/auth.js - Service routes
services/gateway/src/routes/services.js - Appointment routes
services/gateway/src/routes/appointments.js - Admin routes
services/gateway/src/routes/admin.js - Identity and roles
services/gateway/src/middleware/auth.js - Status policies
services/gateway/src/utils/transitions.js - Internal API client
services/gateway/src/services/dataService.js - Socket.IO server
services/gateway/src/server.js - Email notifications
services/gateway/src/services/email.js
Private data service
- Internal data API
services/data-service/core/views.py - Data serialization
services/data-service/core/serializers.py - Marketplace models
services/data-service/core/models.py
External systems
- PostgreSQL
- SMTP provider
Other components
- Customer
- Provider
- Administrator
Connections 43
- Customer → App routing: uses
- Provider → App routing: uses
- Administrator → App routing: uses
- App routing → App state: provides state
apps/web/src/App.tsx - App routing → Service discovery: routes to
apps/web/src/App.tsx - App routing → Customer workspace: routes to
apps/web/src/App.tsx - App routing → Appointment history: routes to
apps/web/src/App.tsx - App routing → Provider workspace: routes to
apps/web/src/App.tsx - App routing → Admin operations: routes to
apps/web/src/App.tsx - App routing → Sign in and register: routes to
apps/web/src/App.tsx - Service discovery → Service booking entry: renders
apps/web/src/pages/ServicesPage.tsx - Service booking entry → App state: opens booking
apps/web/src/components/ServiceCard.tsx - Booking drawer → App state: submits booking
apps/web/src/components/BookingDrawer.tsx - Sign in and register → App state: authenticates
apps/web/src/pages/AuthPage.tsx - Customer workspace → App state: reads workspace
apps/web/src/pages/DashboardPage.tsx - Appointment history → App state: updates appointments
apps/web/src/pages/AppointmentsPage.tsx - Provider workspace → App state: manages jobs
apps/web/src/pages/ProviderPage.tsx - Admin operations → App state: requests operations
apps/web/src/pages/AdminPage.tsx - App state → API client: requests data
apps/web/src/lib/AppContext.tsx - API client → HTTP API router: REST requests
- HTTP API router → Authentication routes: mounts
services/gateway/src/app.js - HTTP API router → Service routes: mounts
services/gateway/src/app.js - HTTP API router → Appointment routes: mounts
services/gateway/src/app.js - HTTP API router → Admin routes: mounts
services/gateway/src/app.js - Authentication routes → Internal API client: reads accounts
services/gateway/src/routes/auth.js - Service routes → Identity and roles: guards writes
services/gateway/src/routes/services.js - Service routes → Internal API client: reads and writes
services/gateway/src/routes/services.js - Appointment routes → Identity and roles: guards requests
services/gateway/src/routes/appointments.js - Appointment routes → Status policies: checks status
services/gateway/src/routes/appointments.js - Appointment routes → Internal API client: reads and writes
services/gateway/src/routes/appointments.js - Admin routes → Identity and roles: authorizes admin
services/gateway/src/routes/admin.js - Admin routes → Internal API client: requests analytics
services/gateway/src/routes/admin.js - Identity and roles → Internal API client: reloads account
services/gateway/src/middleware/auth.js - Internal API client → Internal data API: internal HTTP
- Internal data API → Data serialization: serializes
services/data-service/core/views.py - Internal data API → Marketplace models: queries
services/data-service/core/views.py - Data serialization → Marketplace models: maps records
services/data-service/core/serializers.py - Marketplace models → PostgreSQL: persists
- Customer workspace → Socket.IO server: receives updates
- Provider workspace → Socket.IO server: receives updates
- Socket.IO server → Internal API client: verifies account
services/gateway/src/server.js - Appointment routes → Email notifications: may notify
services/gateway/src/routes/appointments.js - Email notifications → SMTP provider: sends mail