How asadityasharma190907-afk/samarth-coop works
Samarth is a cooperative gig-services platform: citizens request work, the system ranks workers with an income-fairness-weighted dispatch score, and workers receive offers and manage jobs. Its broader product includes worker registration and verification, booking and pricing, federation and enterprise workflows, wallet and welfare features, notifications, and analytics/admin views. The graph reflects documented and indexed relationships; several feature routes and pages were not sampled, so their internal connections are left unverified rather than inferred.
Main entry points: main.py FastAPI entry · bookings.py Booking routes · App.tsx Client routes · auth.py Auth routes
Components 24
Web client
- Client routes
frontend/src/App.tsx - Booking views
frontend/src/pages - Worker views
frontend/src/pages - Cooperative views
frontend/src/pages - API client
frontend/src/lib/api.ts
Platform API
- FastAPI entry
backend/app/main.py - Auth routes
backend/app/routers/auth.py - Booking routes
backend/app/routers/bookings.py - Worker routes
backend/app/routers/workers.py - Feature routes
backend/app/routers
Work and fairness
- Identity service
backend/app/services/auth.py - Booking service
backend/app/services/booking.py - Fair dispatch
backend/app/services/dispatch.py - Adaptive ranking
backend/app/services/dispatch_v2.py - Fair-surge pricing
backend/app/services/pricing.py - Federation service
backend/app/services/federation.py
Cooperative services
- Database session
backend/app/database.py - Users and profiles
backend/app/models/user.py - Bookings and offers
backend/app/models/booking.py - Worker profiles
backend/app/models/worker_profile.py - Analytics service
backend/app/services/analytics.py - Admin service
backend/app/services/admin.py
Other components
- Citizen
- Worker
Connections 25
- Citizen → Client routes: uses
README.md - Worker → Client routes: uses
README.md - Client routes → Booking views: routes to
frontend/src/App.tsx - Client routes → Worker views: routes to
frontend/src/App.tsx - Client routes → Cooperative views: routes to
frontend/src/App.tsx - API client → FastAPI entry: sends requests
frontend/src/lib/api.ts - FastAPI entry → Auth routes: registers
backend/app/main.py - FastAPI entry → Booking routes: registers
backend/app/main.py - FastAPI entry → Worker routes: registers
backend/app/main.py - FastAPI entry → Feature routes: registers
backend/app/main.py - Auth routes → Identity service: calls
backend/app/routers/auth.py - Booking routes → Booking service: calls
backend/app/routers/bookings.py - Booking routes → Fair dispatch: calls
backend/app/routers/bookings.py - Booking routes → Fair-surge pricing: calls
backend/app/routers/bookings.py - Worker routes → Adaptive ranking: calls
backend/app/routers/workers.py - Booking service → Bookings and offers: uses
- Fair dispatch → Bookings and offers: reads earnings
- Adaptive ranking → Worker profiles: ranks workers
- Identity service → Users and profiles: creates users
backend/app/services/auth.py - Auth routes → Database session: gets session
backend/app/routers/auth.py - Booking routes → Database session: gets session
backend/app/routers/bookings.py - Worker routes → Database session: gets session
backend/app/routers/workers.py - Federation service → Bookings and offers: uses
- Feature routes → Analytics service: dispatches to
backend/app/routers/analytics.py - Feature routes → Admin service: dispatches to
backend/app/routers/admin.py