Version: 1.0
Status: Master Workflow Documentation
This document defines every major business workflow in the platform.
While previous documents explain individual modules, this document explains how every module communicates together.
Think of this as the "brain map" of the entire platform.
Every developer should understand these workflows before writing code.
Every workflow must be deterministic, observable, auditable, and fault tolerant.
The platform is completely event-driven.
Users perform actions.
Systems publish events.
Other systems react.
No module directly depends on another module's implementation.
Communication occurs through
Services
Events
Queues
Workers
Worker
↓
Authentication
↓
Risk Assessment
↓
Premium Calculation
↓
Policy Purchase
↓
Policy Activation
↓
Continuous Monitoring
↓
External Trigger
↓
Trigger Engine
↓
Claims Engine
↓
Fraud Engine
↓
Payment Engine
↓
Blockchain
↓
Notification
↓
Analytics
↓
Dashboard
Open App
↓
Phone Login
↓
OTP Verification
↓
Create Profile
↓
Complete KYC
↓
Location Permission
↓
Select Platform
↓
Select Vehicle
↓
Working Hours
↓
Risk Assessment
↓
Premium Recommendation
↓
Choose Policy
↓
Payment
↓
Policy Activated
↓
Dashboard
Modules
Authentication
User
Risk
Premium
Policy
Payment
Notification
Analytics
Weekly Scheduler
↓
Policy Near Expiry
↓
Recalculate Risk
↓
Recalculate Premium
↓
AI Recommendation
↓
Notify Worker
↓
Auto Renewal?
↓
YES
↓
Payment
↓
Renew Policy
↓
Blockchain
↓
Dashboard
NO
↓
Policy Expired
Weather APIs
AQI APIs
Traffic APIs
Government APIs
Platform APIs
↓
Trigger Engine
↓
Cross Verification
↓
Confidence Score
↓
Severity
↓
Geo Mapping
↓
Affected Workers
↓
Publish Trigger Event
Trigger Published
↓
Find Eligible Policies
↓
Validate Coverage
↓
Validate Zone
↓
Validate Time
↓
Create Claims
↓
Fraud Engine
↓
AI Verification
↓
Business Rules
↓
Approved?
↓
YES
↓
Payment Engine
↓
Blockchain
↓
Notification
↓
Dashboard
↓
Closed
Claim
↓
Fraud Engine
↓
Device Check
↓
Location Check
↓
Behavior Analysis
↓
Graph Analysis
↓
Fraud Score
↓
Business Rules
↓
Approve
Reject
Manual Review
Approved Claim
↓
Create Payment
↓
Validate Worker
↓
Gateway
↓
Settlement
↓
Blockchain
↓
Notification
↓
Analytics
↓
Dashboard
Collect Features
↓
Feature Engineering
↓
Feature Store
↓
Model
↓
Prediction
↓
Confidence
↓
Business Rules
↓
Database
↓
Dashboard
Platform Event
↓
Analytics Queue
↓
Aggregation
↓
Metrics
↓
Dashboard API
↓
Frontend
↓
Live Update
Business Event
↓
Generate Hash
↓
Blockchain Queue
↓
Smart Contract
↓
Confirmation
↓
Database
↓
Dashboard
Business Event
↓
Notification Engine
↓
Priority
↓
Template
↓
Channel
↓
Queue
↓
Delivery
↓
Analytics
Worker
↓
Location
↓
Weather
↓
AQI
↓
Traffic
↓
Historical Risk
↓
AI Premium Model
↓
Confidence
↓
Business Rules
↓
Weekly Premium
Weekly Premium
↓
Contribution
↓
Reward Pool
↓
Major Trigger
↓
Eligibility Check
↓
Bonus Calculation
↓
Payment
Policy
↓
Hash
↓
Blockchain
↓
Transaction
↓
Explorer
↓
Verification
↓
Public Trust
Admin Login
↓
Dashboard
↓
Suspicious Claim
↓
Evidence
↓
Timeline
↓
AI Report
↓
Decision
↓
Audit
↓
Notification
Historical Data
↓
Cleaning
↓
Feature Engineering
↓
Training
↓
Validation
↓
Deployment
↓
Monitoring
↓
Drift Detection
↓
Retraining
Failure
↓
Health Check
↓
Alert
↓
Retry
↓
Fallback
↓
Recovery
↓
Audit
↓
Dashboard
Job Created
↓
Priority Queue
↓
Worker
↓
Processing
↓
Success
↓
Completed
OR
↓
Retry Queue
↓
Dead Letter Queue
Register
↓
Buy Policy
↓
Protected
↓
Continue Working
↓
Heavy Rain
↓
Automatic Claim
↓
Instant Payment
↓
Continue Life
The worker should never manually interact with insurance processes after policy purchase.
Login
↓
Overview
↓
Risk Monitoring
↓
Claims
↓
Fraud
↓
Payments
↓
Analytics
↓
Reports
↓
Management
Every important action publishes an event.
Examples
UserRegistered
PolicyCreated
PolicyActivated
PremiumCalculated
TriggerDetected
ClaimCreated
ClaimApproved
PaymentInitiated
PaymentCompleted
RewardDistributed
NotificationSent
BlockchainRecorded
DashboardUpdated
AIModelUpdated
FraudDetected
PolicyRenewed
SystemRecovered
Authentication
↓
User
↓
Risk
↓
Premium
↓
Policy
↓
Trigger
↓
Claims
↓
Fraud
↓
Payment
↓
Blockchain
↓
Analytics
↓
Notification
↓
Dashboard
Modules communicate through events, never direct database access.
Payment Failure
↓
Retry Queue
↓
Alternative Gateway
↓
Manual Review
Blockchain Failure
↓
Queue
↓
Retry
↓
Audit
Notification Failure
↓
Retry
↓
SMS
↓
↓
In-App
AI Failure
↓
Business Rules
↓
Historical Rules
↓
Continue
API Failure
↓
Fallback Provider
↓
Cache
↓
Retry
Multiple Triggers
Flood + AQI
↓
Merge
↓
Single Claim
↓
Combined Payout Rules
Worker Moves Zone
↓
GPS Validation
↓
Coverage Validation
↓
Decision
Policy Renewal During Trigger
↓
Use Previous Policy Snapshot
↓
Continue Claim
Payment Success
Blockchain Failure
↓
Payment Completed
↓
Blockchain Queue
↓
Retry
Weather Provider Conflict
↓
Confidence Engine
↓
Majority Validation
↓
Decision
08:00
Heavy Rain Starts
↓
08:01
Weather API Updated
↓
08:02
Trigger Engine Detects Event
↓
08:03
Verification Complete
↓
08:04
Claims Created
↓
08:05
Fraud Analysis
↓
08:06
Approval
↓
08:07
Payment Initiated
↓
08:08
Blockchain Recorded
↓
08:09
Worker Receives Notification
↓
08:10
Dashboard Updated
Total Target Time
< 10 Minutes
Every workflow must be
Deterministic
Observable
Auditable
Retryable
Fault Tolerant
Event Driven
Idempotent
Scalable
Asynchronous where possible
No workflow should block the user unnecessarily.
Critical financial workflows must always be atomic.
Every workflow should produce an audit trail.
Every workflow should publish business events for downstream systems.
The entire platform should function as a coordinated ecosystem rather than isolated modules.