How sireluke/relayworks works
RelayWorks coordinates agency work from client task creation through worker execution and reviewer approval, with operational dashboards and payment flows for clients, workers, operators, owners, and reviewers. The frontend provides role-specific dashboards and service clients; the Express backend exposes routes, controllers, and services, with PostgreSQL-backed task/review logic represented in sampled code. The README documents the broader coordination and payment capabilities, but several backend routes and services were not sampled, so their internal connections are not asserted.
Main entry points: App.tsx Dashboard routing · task.routes.ts Task routes · clientService.ts Client service · workerService.ts Worker service
Components 34
Role Dashboards
- Dashboard routing
frontend/src/App.tsx - Client dashboard
frontend/src/pages/client/clientdashboard.tsx - Worker dashboard
frontend/src/pages/worker/WorkerDashboard.tsx - Reviewer dashboard
frontend/src/pages/reviewer/ReviewerDashboard.tsx - Operator dashboard
frontend/src/pages/operator/operatorDashboard.tsx - Owner dashboard
frontend/src/pages/owner/OwnerDashboard.tsx - Task creation
frontend/src/components/client/CreateTaskForm.tsx - Work submission
frontend/src/components/worker/WorkerSubmitPanel.tsx - Review decisions
frontend/src/components/reviewer/ReviewerApprovalPanel.tsx
Work Coordination
- Client service
frontend/src/services/clientService.ts - Worker service
frontend/src/services/workerService.ts - Reviewer service
frontend/src/services/reviewerService.ts - Operator service
frontend/src/services/operatorService.ts - Task routes
backend/src/routes/task.routes.ts - Task controller
backend/src/controllers/taskController.ts - Task operations
backend/src/services/taskService.ts - Review controller
backend/src/controllers/reviewerController.ts - Review metrics
backend/src/services/reviewerService.ts - Dashboard controller
dashboard.controller.ts - Dashboard service
dashboard.service.ts
Payments and Account
- Payment views
frontend/src/components/client/InvoicePanel.tsx - Worker payouts
frontend/src/components/worker/WorkerPayoutPanel.tsx - Payment routes
payment.routes.ts - Payment controller
payment.controller.ts - Payment operations
payment.service.ts
Backend Platform
- Login and registration
backend/src/routes/authRoutes.ts - Authentication service
backend/src/services/AuthService.ts - User record
backend/src/models/User.ts - HTTP server
backend/src/server.ts - Express app
backend/src/app.ts - Authentication middleware
backend/src/middleware/auth.middleware.ts - Role middleware
backend/src/middleware/role.middleware.ts - Activity tracking
activity.service.ts
Other components
- Agency users
Connections 34
- Agency users → Dashboard routing: choose role view
frontend/src/App.tsx - Dashboard routing → Client dashboard: routes to
frontend/src/App.tsx - Dashboard routing → Worker dashboard: routes to
frontend/src/App.tsx - Dashboard routing → Reviewer dashboard: routes to
frontend/src/App.tsx - Dashboard routing → Operator dashboard: routes to
frontend/src/App.tsx - Dashboard routing → Owner dashboard: routes to
frontend/src/App.tsx - Client dashboard → Client service: loads overview
frontend/src/pages/client/clientdashboard.tsx - Client dashboard → Task creation: renders
frontend/src/pages/client/clientdashboard.tsx - Task creation → Client service: creates task
frontend/src/components/client/CreateTaskForm.tsx - Worker dashboard → Worker service: loads overview
frontend/src/pages/worker/WorkerDashboard.tsx - Worker dashboard → Work submission: renders
frontend/src/pages/worker/WorkerDashboard.tsx - Work submission → Worker service: submits work
frontend/src/components/worker/WorkerSubmitPanel.tsx - Reviewer dashboard → Reviewer service: loads overview
frontend/src/pages/reviewer/ReviewerDashboard.tsx - Reviewer dashboard → Review decisions: renders
frontend/src/pages/reviewer/ReviewerDashboard.tsx - Review decisions → Reviewer service: sends decisions
frontend/src/components/reviewer/ReviewerApprovalPanel.tsx - Operator dashboard → Operator service: loads task data
- Client service → Task routes: requests task endpoints
- Worker service → Task routes: requests task endpoints
- Reviewer service → Task routes: requests review endpoints
- HTTP server → Task routes: mounts routes
backend/src/server.ts - Task routes → Authentication middleware: checks authentication
backend/src/routes/task.routes.ts - Task controller → Task operations: delegates task work
backend/src/controllers/taskController.ts - Review controller → Review metrics: loads dashboard
backend/src/controllers/reviewerController.ts - Review metrics → Agency users: counts review state
- Dashboard controller → Dashboard service: loads dashboard data
dashboard.controller.ts - Payment views → Client service: loads invoices
frontend/src/services/clientService.ts - Worker payouts → Worker service: loads payouts
frontend/src/services/workerService.ts - Payment routes → Payment controller: dispatches requests
payment.routes.ts - Payment controller → Payment operations: creates and records
payment.controller.ts - Login and registration → Authentication service: checks credentials
backend/src/routes/authRoutes.ts - Authentication service → User record: uses user model
backend/src/services/AuthService.ts - Express app → Authentication middleware: configures middleware
backend/src/app.ts - Express app → Role middleware: configures middleware
backend/src/app.ts - Role middleware → Authentication middleware: uses identity
backend/src/middleware/role.middleware.ts