How pravinsingh1109/sahakarseva works
SahakarSeva is a cooperative household-services marketplace. Customers discover local workers, book and track a job, then complete payment and review; workers onboard, receive and complete jobs, and view earnings, while administrators oversee workers, tariffs, disputes, and platform activity. The backend owns API routing, matching, cooperative business rules, persistence, and realtime events. The README documents welfare funding, fee collection, and integrations, but sampled excerpts do not establish all of their implementation links; those capabilities are represented without speculative call paths.
Main entry points: main.py API entry point · database.py Relational data · worker.py Worker operations · tracking.py Live tracking
Components 26
User applications
- Customer app
apps/customer/app - Worker app
apps/worker/app - Admin portal
apps/admin/src/App.tsx
API and domain
- API entry point
backend/main.py - Authentication
backend/routers/auth.py - Service discovery
backend/routers/services.py - Customer bookings
backend/routers/customer.py - Worker operations
backend/routers/worker.py - Cooperative administration
backend/routers/admin.py - Payments
backend/routers/payments.py - Fair worker matching
backend/services/matching.py - Daily access fees
backend/services/access_fee.py - Fare invoices
backend/services/invoice.py - Notifications
backend/services/notifications.py - OTP service
backend/services/otp.py
Realtime dispatch
- Live tracking
backend/socket/tracking.py - Realtime chat
backend/socket/chat.py - Socket.IO server
backend/socket/sio.py
Platform foundations
- Relational data
backend/core/database.py - Marketplace records
backend/models/models.py - Ephemeral state
backend/core/redis.py - Token security
backend/core/security.py - Role authorization
backend/middleware/auth.py
Other components
- Worker
- Customer
- Administrator
Connections 41
- Customer → Customer app: uses
- Worker → Worker app: uses
- Administrator → Admin portal: uses
- Customer app → API entry point: calls API
- Worker app → API entry point: calls API
- Admin portal → API entry point: calls API
- API entry point → Authentication: mounts
backend/main.py - API entry point → Service discovery: mounts
backend/main.py - API entry point → Customer bookings: mounts
backend/main.py - API entry point → Worker operations: mounts
backend/main.py - API entry point → Cooperative administration: mounts
backend/main.py - API entry point → Payments: mounts
backend/main.py - API entry point → Socket.IO server: wraps
backend/main.py - API entry point → Live tracking: registers
backend/main.py - API entry point → Realtime chat: registers
backend/main.py - Service discovery → Fair worker matching: requests matches
backend/routers/services.py - Service discovery → Relational data: queries
backend/routers/services.py - Customer bookings → Relational data: reads/writes
backend/routers/customer.py - Customer bookings → Fare invoices: uses invoices
backend/routers/customer.py - Customer bookings → Notifications: uses notifications
backend/routers/customer.py - Customer bookings → Live tracking: uses tracking
backend/routers/customer.py - Worker operations → Relational data: reads/writes
backend/routers/worker.py - Worker operations → Daily access fees: uses fees
backend/routers/worker.py - Worker operations → Notifications: uses notifications
backend/routers/worker.py - Worker operations → Live tracking: uses tracking
backend/routers/worker.py - Worker operations → Ephemeral state: uses Redis
backend/routers/worker.py - Authentication → OTP service: uses OTP
backend/routers/auth.py - Authentication → Token security: uses tokens
backend/routers/auth.py - Authentication → Relational data: reads/writes
backend/routers/auth.py - Cooperative administration → Relational data: reads/writes
backend/routers/admin.py - Cooperative administration → Notifications: uses notifications
backend/routers/admin.py - Payments → Relational data: uses database
- Fair worker matching → Marketplace records: queries records
backend/services/matching.py - Live tracking → Ephemeral state: stores locations
backend/socket/tracking.py - Live tracking → Socket.IO server: emits events
backend/socket/tracking.py - Live tracking → Token security: decodes tokens
backend/socket/tracking.py - Realtime chat → Socket.IO server: uses server
backend/socket/chat.py - Role authorization → Token security: decodes token
backend/middleware/auth.py - Role authorization → Relational data: loads user
backend/middleware/auth.py - Role authorization → Marketplace records: queries user
backend/middleware/auth.py - Relational data → Marketplace records: defines records
backend/models/models.py