How harshithreddy973/karmika-sih-26 works
Karmika is a cooperative local-services marketplace. Customers book and locate a service, review nearby worker matches, then follow the booking through worker acceptance and completion, itemized payment, welfare contribution, and review. Workers maintain skills, availability, and location, handle requests, and complete jobs; administrators verify workers and manage services, bookings, welfare, and demand forecasts. The frontend uses Supabase for authentication and persisted product data, with SQL-backed location matching. The graph follows README capabilities where implementation excerpts are absent; those connections are documented rather than inferred from filenames.
Main entry points: supabaseClient.js Supabase client · App.jsx Route dispatch · AdminDashboard.jsx Admin dashboard · BookService.jsx Create booking
Components 28
App and identity
- Route dispatch
src/App.jsx - Authentication and roles
src/lib/useAuth.js
Customer booking
- Browse services
src/pages/BrowseServices.jsx - Create booking
src/pages/BookService.jsx - Map location picker
src/components/MapPicker.jsx - Nearby worker matching
src/pages/MatchedWorkers.jsx - Match scoring
src/lib/matchingScore.js - Booking status and tracking
src/pages/BookingTracker.jsx - Customer bookings
src/pages/MyBookings.jsx - Payment summary
src/pages/PaymentSummary.jsx - Customer rating and review
src/pages/RateReview.jsx
Worker operations
- Worker requests and acceptance
src/pages/WorkerJobRequests.jsx - Worker profile and location
src/pages/WorkerProfileSetup.jsx - Job completion
src/pages/WorkerJobCompletion.jsx
Platform administration
- Admin dashboard
src/pages/AdminDashboard.jsx - Worker verification
src/components/admin/VerificationQueue.jsx - Services and pricing
src/components/admin/ServicesManager.jsx - Booking overview
src/components/admin/BookingsOverview.jsx - Worker welfare
src/components/admin/WelfareOverview.jsx - Demand forecasting
src/components/admin/DemandForecast.jsx
Shared services
- Supabase client
src/lib/supabaseClient.js - Platform database
database/phase1_schema.sql - Job display helpers
src/lib/jobDisplay.js - Payment breakdown
src/lib/payment.js - Forecast calculations
src/lib/forecast.js - English and Hindi
src/i18n/index.js - Language preference
src/components/LanguageSwitcher.jsx
Other components
- Customer / worker / admin
Connections 43
- Customer / worker / admin → Route dispatch: opens app
README.md - Route dispatch → Authentication and roles: guards routes
src/App.jsx - Authentication and roles → Supabase client: loads session
src/lib/useAuth.js - Supabase client → Platform database: queries
README.md - Route dispatch → Browse services: routes to
src/App.jsx - Route dispatch → Create booking: routes to
src/App.jsx - Create booking → Map location picker: renders
src/pages/BookService.jsx - Create booking → Supabase client: creates booking
src/pages/BookService.jsx - Create booking → Nearby worker matching: navigates to
src/pages/BookService.jsx - Nearby worker matching → Match scoring: uses scoring
src/pages/MatchedWorkers.jsx - Nearby worker matching → Supabase client: loads candidates
src/pages/MatchedWorkers.jsx - Route dispatch → Worker requests and acceptance: routes to
src/App.jsx - Worker requests and acceptance → Supabase client: loads and updates jobs
src/pages/WorkerJobRequests.jsx - Worker profile and location → Supabase client: saves worker profile
src/pages/WorkerProfileSetup.jsx - Worker requests and acceptance → Job display helpers: formats job details
src/pages/WorkerJobRequests.jsx - Route dispatch → Job completion: routes to
src/App.jsx - Job completion → Supabase client: updates completion
src/pages/WorkerJobCompletion.jsx - Job completion → Payment breakdown: computes payout
src/pages/WorkerJobCompletion.jsx - Job completion → Job display helpers: formats job details
src/pages/WorkerJobCompletion.jsx - Route dispatch → Payment summary: routes to
src/App.jsx - Payment summary → Supabase client: loads payment data
src/pages/PaymentSummary.jsx - Payment summary → Payment breakdown: computes totals
src/pages/PaymentSummary.jsx - Route dispatch → Customer rating and review: routes to
src/App.jsx - Customer rating and review → Supabase client: records review
src/pages/RateReview.jsx - Route dispatch → Booking status and tracking: routes to
src/App.jsx - Route dispatch → Customer bookings: routes to
src/App.jsx - Booking status and tracking → Supabase client: loads status
src/pages/BookingTracker.jsx - Customer bookings → Supabase client: loads bookings
src/pages/MyBookings.jsx - Route dispatch → Admin dashboard: routes to
src/App.jsx - Admin dashboard → Worker verification: renders tab
src/pages/AdminDashboard.jsx - Admin dashboard → Services and pricing: renders tab
src/pages/AdminDashboard.jsx - Admin dashboard → Booking overview: renders tab
src/pages/AdminDashboard.jsx - Admin dashboard → Worker welfare: renders tab
src/pages/AdminDashboard.jsx - Admin dashboard → Demand forecasting: renders tab
src/pages/AdminDashboard.jsx - Worker verification → Supabase client: updates verification
src/components/admin/VerificationQueue.jsx - Services and pricing → Supabase client: manages services
src/components/admin/ServicesManager.jsx - Booking overview → Supabase client: loads bookings
src/components/admin/BookingsOverview.jsx - Worker welfare → Supabase client: loads contributions
src/components/admin/WelfareOverview.jsx - Demand forecasting → Supabase client: loads booking history
src/components/admin/DemandForecast.jsx - Demand forecasting → Forecast calculations: calculates forecast
src/components/admin/DemandForecast.jsx - Language preference → English and Hindi: changes language
src/components/LanguageSwitcher.jsx - Language preference → Supabase client: saves preference
src/components/LanguageSwitcher.jsx - Authentication and roles → English and Hindi: applies preference
src/lib/useAuth.js