Standard Operating Procedures
Digital Labour Bazar — Portal Workflow Documentation
Digital Labour Bazar
Standard Operating Procedures
Complete Portal Workflow Documentation for Validation & Operations
0Table of Contents
- 1.Worker Registration & WorkflowRegistration → OTP → Admin Approval → Dashboard → Job Application → Work Start → Completion → Payment
- 2.Employer Registration & WorkflowRegistration → Verification → Post Job → Hire Worker → OTP Confirmation → Payment
- 3.Admin Panel WorkflowLogin → Verify Workers/Employers → Manage Jobs → Monitor Hire Requests → Revenue Tracking
- 4.Super Admin Panel WorkflowPlatform Settings → Database Manager → SQL Query Runner → Commission Management
Worker Workflow
Registration → Approval → Jobs → OTP Work Flow → Payment
Hire Request Status Pipeline
Worker Registration
- •Go to /register-labour
- •Fill: Name, Phone, Village, Skill, Experience
- •Upload Selfie (compressed to ~30-50KB base64)
- •Submit registration form
OTP Verification (Phone)
- •System sends OTP to registered phone number
- •Worker enters 4-digit OTP on verification screen
- •OTP validated server-side
- •⚠️ Currently: OTP is random number (SMS gateway pending)
Admin Approval
- •Admin logs into /admin panel
- •Goes to Workers tab → Pending Verification
- •Reviews selfie, skill, village, experience
- •Clicks Approve or Reject
Worker Login & Dashboard
- •Worker goes to /worker-login
- •Enters phone number → OTP sent
- •Enters OTP → session stored in sessionStorage
- •Redirected to /worker/dashboard
- •Dashboard shows: Applications, Earnings, Rating, Active Jobs
Job Application
- •Worker browses /worker/jobs — nearby job listings
- •Clicks Apply on a job posting
- •Application saved to job_applications table
- •Employer notified of new application
Hire Request & Work Start OTP
- •Employer sends hire request → status: Requested
- •Worker accepts → status: Accepted
- •Employer confirms → status: Confirmed
- •Worker triggers Work Start OTP (POST /api/hire-request/otp)
- •Employer sees OTP on screen (auto-refreshes every 8s)
- •Worker enters OTP to employer → Employer verifies
- •Status changes to: Work Started
Work Completion OTP
- •Worker triggers Completion OTP
- •Employer sees completion OTP on screen
- •Worker enters OTP → Employer verifies
- •Status changes to: Completed
- •completion_otp and completion_otp_at saved in DB
Payment & Wallet
- •Employer sees PaymentPanel → chooses UPI / Online / Cash
- •Employer marks payment done → status: Payment Done
- •Worker sees "Payment Received ✓" button
- •Worker confirms receipt → status: Payment Received
- •Wallet balance updated: daily_rate × days worked
Key DB Fields — labour_registrations
Worker Ratings & Badges
- • Employers can rate workers after job completion at /worker/ratings
- • Badges awarded by admin based on performance and completed jobs
- • Rating visible on worker profile and search results
Employer Workflow
Registration → Login → Post Job → Hire → OTP → Payment
Supported Payment Modes
Employer Registration
- •Go to /register-employer
- •Fill: Company Name, Phone, GST Number
- •Submit registration form
- •Account created with verification_badge = false initially
Employer Login & Dashboard
- •Go to /employer-login
- •Enter phone → OTP sent → Enter OTP
- •Session stored in sessionStorage (phone + name)
- •Redirected to /employer/dashboard
- •Dashboard shows: Active Jobs, Hired Workers, Total Spent, Applications
Post a Job
- •Go to /employer/post-job
- •Fill: Job Title, Skill Required, Location, Daily Rate, Duration
- •Submit job posting
- •Job appears in worker job listings (/worker/jobs)
Search & Hire Workers
- •Go to /employer/search
- •Filter by: Skill, Village, Experience, Availability
- •View worker profiles with selfie, ratings, badges
- •Click "Hire" to send hire request
- •Or go to /employer/hire-worker to manage existing requests
Manage Hire Requests
- •Go to /employer/hire-worker
- •See all hire requests with current status
- •Requested → wait for worker to Accept
- •Accepted → Employer clicks Confirm → status: Confirmed
- •Confirmed → Worker triggers Work Start OTP
- •Employer sees OTP panel (auto-refreshes every 8s)
- •Worker tells OTP → Employer enters it → Work Started
Work Completion & OTP
- •Worker triggers Completion OTP
- •Employer sees completion OTP on hire-worker page
- •Worker tells OTP to employer
- •Employer enters OTP → verified → status: Completed
Payment to Worker
- •PaymentPanel appears after Completed status
- •Employer selects payment mode: UPI / Online / Cash
- •Employer clicks "Mark Payment Done"
- •Status changes to: Payment Done
- •Worker sees "Payment Received ✓" button and confirms
- •Status: Payment Received — hire request fully closed
Key DB Fields — employer_registrations & hire_requests
employer_registrations
hire_requests
OTP Auto-Refresh Note
The employer OTP panel auto-refreshes every 8 seconds using useRef to avoid stale closures. The fetchHires function uses useCallback and setSelected uses functional updates.
Admin Panel Workflow
Login → Verify Users → Manage Jobs → Monitor Requests → Revenue
Admin Panel Tabs (8 Total)
🔴 Red dot = tab has badge/count indicator
Dashboard Stat Cards (All 8 Clickable)
Each card navigates to its relevant tab when clicked
Admin Login
- •Go to /admin
- •Enter admin credentials (hardcoded in current version)
- •Access full admin panel with 8 tabs
- •⚠️ No server-side session validation yet — sessionStorage only
Worker Verification
- •Go to Workers tab in admin panel
- •See pending workers with selfie, skill, village, experience
- •Badge count shows pending verification count
- •Click Approve → admin_approved = true in DB
- •Click Reject → worker cannot login
- •Can also Block/Unblock/Delete workers via user-action API
Employer Verification
- •Go to Employers tab in admin panel
- •Review employer: Company Name, Phone, GST
- •Grant verification_badge = true for verified employers
- •Block/Unblock/Delete employers as needed
Job Management
- •Go to Jobs tab in admin panel
- •View all posted jobs with employer details
- •Monitor job status: Open / Filled / Expired
- •Remove inappropriate job postings
Hire Request Monitoring
- •Go to Hire Requests tab
- •View all hire requests with full status pipeline
- •Monitor: Requested → Accepted → Confirmed → Work Started → Completed → Payment Done → Payment Received
- •Identify stuck or disputed requests
- •Panel auto-refreshes every 30 seconds
Revenue & Commission Tracking
- •Go to Revenue tab in admin panel
- •View monthly breakdown bar chart
- •Commission = commissionRate% × daily_rate per hire request
- •Commission rate read from getSettings().jobPlacementCommission
- •Real data from completed hire requests in DB
Admin Settings
- •Go to Settings tab in admin panel
- •Configure: Commission Rate, Platform Fee, Contact Info
- •⚠️ Settings currently persist to localStorage only
- •Super Admin panel has full settings management
Auto-Refresh Behavior
- • Admin panel auto-refreshes every 30 seconds
- • Pending badge count = combined labour + employer pending verifications
- • Workers/Employers tabs fetch ALL records independent of filter state
- • Revenue chart uses real monthly data from completed hire_requests
Super Admin Panel Workflow
Platform Settings → Database Manager → SQL Runner → Commission Management
Super Admin Tabs (8 Total)
Super Admin Login
- •Go to /super-admin
- •Enter super admin credentials
- •Access full platform control panel with 8 tabs
- •⚠️ No server-side session validation yet — sessionStorage only
Platform Settings
- •Configure: Job Placement Commission %
- •Configure: Platform Fee, Contact Info, Support Email
- •Configure: SMS Gateway settings (MSG91 / Fast2SMS)
- •Configure: Payment Gateway (Razorpay/UPI) settings
- •⚠️ Settings persist to localStorage only (DB persistence pending)
- •Commission rate: always read from getSettings().jobPlacementCommission
Database Manager
- •Go to Database Manager tab (8th tab)
- •Select from 7 available tables
- •View paginated rows (20 per page)
- •Client-side search across all columns
- •View individual record details in modal
- •Edit record fields inline via edit modal
- •Delete records with confirmation
SQL Query Runner
- •Go to Database Manager tab → SQL Query Runner section
- •Dark-themed code editor for SQL input
- •Press Ctrl+Enter to execute query
- •Only SELECT queries allowed (security restriction)
- •Choose from 7 pre-built quick queries
- •Results shown in table with column headers
- •Copy results as TSV (Tab-Separated Values)
- •Execution time displayed in milliseconds
User Management
- •View all workers and employers across the platform
- •Block user: sets blocked = true → user cannot login
- •Unblock user: sets blocked = false → user can login again
- •Delete user: permanently removes from DB
- •All actions via POST /api/admin/user-action
Revenue & Analytics
- •View platform-wide revenue breakdown
- •Monthly commission earnings chart
- •Total workers, employers, jobs, hire requests
- •Commission = commissionRate% × daily_rate × days
- •Export data via SQL Query Runner as TSV
Managed Database Tables (7)
Pre-built Quick Queries (7)
Known Issues & Tech Debt (Pending Implementation)
Planned Next Steps
Digital Labour Bazar — Confidential Internal Document
For validation and operational use only. © 2026 lebarbazar.com