I need to develop an Application Called “Drivers Earnings”. And you are going to develop the application for me.
Consider
I am your client and
You are a senior full-stack mobile application architect and developer
You are building an offline-first mobile application for cab drivers.
MPORTANT RULES:
1. Follow a modular architecture (feature-based modules).
2. All business logic must strictly follow the provided SRS.
3. Assume ALL data is stored locally on the device (offline-first).
4. Do NOT invent features or logic not explicitly mentioned.
5. Validate every field and calculation.
6. Currency default is INR, configurable.
7. App supports multi-language (English default).
8. Code must be readable, debuggable, and well-commented.
9. Ask questions ONLY if something is technically impossible (otherwise proceed).
The application includes:
- Authentication via Google Sign-In
- App-level PIN / Biometric security
- Shift-based earnings & expense tracking
- Detailed reporting & exports
- Automatic weekly owner email reports
- Automatic Daily shift report email to owners
Develop the app MODULE BY MODULE.
Wait for confirmation after each module before proceeding.
UI NAVIGATION CONCEPT
DESIGN GOALS
🎯 CORE DESIGN PRINCIPLES
• Neomorphic (Soft UI)
o Subtle shadows
o Raised & pressed states
o Clean, premium feel
o Soft raised container
o Rounded corners
o Round buttons with icon
o Light shadow
o Active buttons (pressed down)
o Other buttons (raised up)
• One-hand usage
• Zero distraction
• Shift-first workflow
• Offline-friendly UI
• Large touch targets
OVERALL NAVIGATION STRUCTURE
☰ TOP-LEFT HAMBURGER MENU
Purpose: Secondary, setup & management actions
Style: Soft raised panel with smooth depth
⬇️ BOTTOM NAVIGATION BAR (MINIMAL)
Purpose: Daily-use screens only
Style: Floating Neomorphic bar with rounded corners
CENTER PRIMARY ACTION (HOME SCREEN)
Purpose: Shift lifecycle control
Style: Large Neomorphic floating action button (FAB)
Authentication & Login
Login Options
• Google Verification
• App-level PIN / Biometric Authentication
o Configurable in Settings → Security
o Enabled after first login
• Single-driver app: only one driver per device
☰ HAMBURGER MENU
Neomorphic Drawer
• Slides from bottom to top
• Soft raised panels
• Section dividers
Menu content
Home
User Profile (driver profile)
Vehicles
Vehicle Maintenance
Cab operators
Settings
Appearance Preferences
Report
Refer to friends
App info
Privacy police
🏠 Home Screen (PRIMARY SCREEN)
TOP BAR (GLOBAL – ALWAYS VISIBLE)
Left side - DRIVER INFO (CLICKABLE)
Displayed:
• Driver image (circular)
• Driver Name
• Shift Status
o Not Started
o Active
SHIFT STATUS COLORS
Status Colour
Not Started Grey
Active Soft Green
UX Behaviour:
• Entire driver-name section is clickable
• On click → Navigate to Driver Profile page
Right side – settings icon
• Icon:
• Neomorphic circular button
• On click → Navigate to Settings
Middle part (PRIMARY SCREEN)
CENTRAL NEOMORPHIC SHIFT BUTTON (FAB)
Position:
• Center of screen
• Slightly above bottom navigation bar
Button States
Shift State Label Color Effect
No Shift START SHIFT Soft Green Raised
Active END SHIFT Soft Red Pulsing
HOME CONTENT (CARDS ABOVE FAB)
Neomorphic cards showing:
• Below the top bar (rectangular advertisement)
• Alert card and google adds sliding from right to left
• Selected Vehicle
• Live Earnings (only if trip mode is selected)
• Live Expenses
• Shift Duration
⬇️ Bottom Navigation Bar (Updated)
Functional tabs (No clutter. Only daily-use actions. Round button with icon and below the icon with name)
• Home
o Shift control
o Live overview
• History
o All shift reports
o Latest on top
• Menu
o Opens side drawer (hamburger menu)
• Report
o Various types of reports
• share
o Share application link to others with referral code to other people
o Show a content please share this application to your referral code to your friends to get
benefitted (when your friends install with this referral code you will get this application add free for one
year)
👤 User Profile (driver profile)
All input text fields (to be entered and managed by driver)
• Personal Details
o Name (mandatory)
o Mobile number (mandatory)
o Email ID (mandatory, required for backup)
o Resident Address
o Driving License Number (mandatory)
o PAN Card Number (mandatory)
o Aadhaar Card Number (mandatory)
Validation Rules
o Mobile number must be unique per driver.
o Driving licence number format validation as per all the states in India to be applied.
o Aadhaar and PAN fields (optional can be masked)
• Vehicle details
View active vehicle (only one vehicle can be active can be changed in settings)
• Cab operator
one or more Active operators at a time. (can be changed in settings)
• Earnings Details
o If fixed salary is selected show per day salary
o If Commission is selected show default Commission slab details
o If Hybrid (fixed salary + commission) is selected show per day salary and show default
Commission slab details
• Save profile
• Share profile (PDF / TEXT /Excel)
UX & Validation Summary
• All mandatory fields must be completed before profile submission.
• Changes to earnings type or commission slabs apply from the next working day onward.
• Profile data is stored locally on the device (offline-first).
Vehicles
• Vehicle list (in a container for each vehicle)
o Registration number
o Vehicle brand and model
o View maintenance alert
o Option to remove vehicle.
o On clicking particular vehicle show all the vehicle details in new page
• Add vehicle button
Text field
o Vehicle Registration Number (Mandatory, unique per vehicle)
o Vehicle Name / Model (Mandatory)
o Insurance Valid till (editable) Add alerts on expiry
o Pollution Valid till (editable) Add alerts on expiry
o Fitness Valid till (editable) Add alerts on expiry
o Vehicle Owner Name
o Owner Email ID
o Owner Mobile Number
o Submit button
Validation Rules
• The driver can add any number of vehicles.
• Each vehicle is treated as a separate entity for:
o Odometer tracking
o Trip history
o Expense tracking
Vehicle Maintenance
• Vehicle list (in container for each vehicle)
• Click a vehicle
• Shows:
o Vehicle Name
o Last service date
o Odometer at last service
o Insurance due date
o Pollution due date
o Fitness due date
o Next service due (km / date)
• “ Add Maintenance Record” button (Neomorphic)
ADD / EDIT MAINTENANCE RECORD
Mandatory Fields
• Select Vehicle
• Maintenance Category (dropdown)
o General Service
o Oil Change
o Brake Service
o Tyre Change
oBattery
oClutch
oEngine Repair
oOther (custom can add new category)
• Service Date
• Odometer Reading (at service time)
• Cost Amount
• Garage name
Optional Fields
• Invoice Number
• Notes
• Upload Bill Image (optional, local storage)
MAINTENANCE LOGIC & VALIDATION
Odometer Validation
• Must be:
o ≥ last maintenance odometer
o ≤ current vehicle closing odometer (if available)
Service Interval Tracking (Optional per Record)
• Next service after (km)
• Next service after (date)
Alerts (non-intrusive)
• “Service due in 500 km”
• “Service overdue by 50 km”
• “Service overdue by 100 km”
• “Service overdue by 200 km”
• “Service overdue by 300 km”
• “Service overdue by 1 day” every consecutive day till updating service record
Shown:
• On Home screen
• On Vehicle Maintenance screen
MAINTENANCE REPORTS (show in reports module)
Reports Included
• Vehicle-wise maintenance history
• Category-wise maintenance cost
• Date-range maintenance expense
Export Options
• PDF
• Excel
• Text
Note: Expense added in the expanse module in the maintenance category only shall be add to the Vehicle
maintenance
Maintenance cost does NOT affect shift earnings calculations
DATABASE ENTITIES (SUMMARY)
Vehicle_Maintenance
• maintenance_id
• vehicle_id
• category
• service_date
• odometer
• cost
• next_service_km
• next_service_date
• notes
• attachments
Cab operators
• Cab operator list (in a container)
o Cab operator name
o Cab operator logo
• Default operator list
o Ola
o Uber
o Rapido
• Add Custom cab operator
o Operator name
o Cab operator logo (optional)
o Need to add recharge category (in Expense category)
o Submit button
Selection Logic
• Operators are displayed with checkboxes.
• Selecting a checkbox indicates the driver is authorized and active on that platform.
• The driver may select one or more operators at any time.
Custom Operator
• Option to add a custom cab operator.
• Custom operators can be edited or removed by the driver.
Expense Driver Module
Eligibility Rule
• Expense details can be recorded only when the driver in active shift
• Once the driver ends the shift, the system shall disable expense entry.
• Any attempt to add an expense after shift end must be blocked with an appropriate message.
Expense Entry Fields
• Expense Category
o Select from drop down
• Amount
o Mandatory numeric field.
o Accepts positive values only.
o Currency to be displayed as ₹ (INR).
• Quantity / Count
o This field is dynamic based on the selected category.
o The system shall display the appropriate unit or count type automatically.
o Quantity / Unit Logic by Category
Category Quantity / Count Type Unit / Label Displayed
Fuel Quantity Litres (L)
Engine Oil Quantity Litres (L)
Coolant Quantity Litres (L)
Puncture Count Number of tyres
Repair Count Number of repairs
Water Wash Count Number of washes
Parking Count Number of parking entries
FAS Tag Count Number of transactions
Ola Recharge Count Number of recharges
Uber Recharge Count Number of recharges
Rapido Recharge Count Number of recharges
Others Quantity / Count User-defined (optional)
o Quantity / Count is mandatory where applicable.
o Decimal values allowed only for quantity-based categories (e.g., Fuel).
Notes (Optional)
o Free-text field.
o Used to capture additional details such as: (Location, Invoice number, Reason for
expense)
Multiple Expense Entry
• An “Add Expense” button shall be provided.
• After saving one expense:
o The form resets
o The driver can immediately add another expense
• All expenses added during the active Shift are listed in a scrollable summary view.
Validation & UX Rules
• All mandatory fields must be filled before saving.
• Show inline validation messages for errors.
• Disable the Add Expense button when:
o Trip has not started
o Shift has ended
Shift start/end time
SHIFT START
User taps “Start Shift” button.
Fields Required to Start Shift
Field Type Mandatory Notes
Shift Start Date DateTime Auto System captured
Shift Start Time DateTime Auto System captured
Vehicle Dropdown Yes From Driver Profile
Opening Odometer Number Yes Validation applies
ODOMETER VALIDATION LOGIC (CRITICAL)
First-time Vehicle Usage
• Driver can enter any numeric value
Subsequent Vehicle Usage
• Opening odometer MUST be ≥ last recorded closing odometer for that vehicle
• Block submission if violated
Helper Text (Always Visible)
“Odometer reading must be equal to or greater than the last recorded closing odometer reading.”
Vehicle-Specific Rule
• Odometer history maintained per vehicle
• Validation applies individually per vehicle
Start Shift Rules
• Shift starts immediately after validation passes
• App enters Active Shift State
• Shift start cannot be edited once active
• Only one shift can be active
• ACTIVE SHIFT: Period between Start Shift and End Shift confirmation
ALLOWED ACTIONS DURING ACTIVE SHIFT
Expense Entry (Optional)
• Expenses can be recorded only while shift is active
• Multiple expense entries allowed
Expense Fields
Field Mandatory Notes
Category Yes Default + custom
Amount Yes Positive number
Quantity / Count Conditional Unit shown dynamically
Notes Optional Free text
Default Categories
• Fuel
• Engine Oil
• Coolant
• Puncture
• Repair
• Water Wash
• Parking
• Fast Tag
• Others
• Ola Recharge
• Uber Recharge
• Rapido Recharge
✔ Add / delete custom categories allowed
2. Trip / Earnings Entry (Optional)
Two modes (configurable in Settings):
Mode A: Trip-Wise Entry
• Operator Name
• Trip Earnings (per trip)
Mode B: Summary-Only Entry
• Total trips per operator
• Total earnings per operator
✔ Entry allowed only within shift hours
SHIFT DURATION MONITORING (REAL-TIME)
Condition Action
Shift < 8 hours Show WARNING
Shift > 12 hours Show ALERT
Alert/Warning does not stop shift, only informs driver
SHIFT END (REVIEW MODE)
Trigger
User taps “End Shift”
Fields Required
Field Mandatory Notes
Closing Odometer Yes ≥ Opening Odometer
Total Earnings Conditional, yes Required if summary mode
REVIEW MODE BEHAVIOR
Once End Shift is clicked:
✔ System auto-generates full shift report preview
✔ Shift is NOT yet closed
ALLOWED IN REVIEW MODE
• Edit: by clicking particular tractions
o Earnings
o Expenses
o Closing Odometer values
• Add new expenses
• Review all calculations
COMMISSION RECOMMENDATION LOGIC
During review:
System calculates:
• Current commission slab
• Next higher slab
If eligible:
“You are ₹X away from reaching the next commission level. Continue shift or end now.”
Actions Available
• Confirm End Shift
• Continue Shift
CONFIRM END SHIFT (FINAL LOCK)
On Confirmation
✔ Shift end time auto-captured
✔ Shift duration calculated
✔ Shift data locked permanently
✔ Shift report saved to history
❌ No edits allowed after this point
Continue Shift
On confirmation
✔ closing odometer reading will be erased, and this will be entered when the shift end process triggered
again.
✔ again the shift cycle continues
AUTO-GENERATED SHIFT REPORT (ON CONFIRM)
Sift details (table format)
• Driver Name
• Vehicle Registration
• Shift start Date time
• Shift End date and time
• Hours Logged
Finance summary (table format)
• Total Earnings
• Total Expenses
• Driver Salary
• Commission %
• Owner Gets
VEHICLE DETAILS (table format)
• Opening Odometer
• Closing Odometer
• Total Kilometres
• Total Fuel Consumed
• Mileage:
o Per shift
o Lifetime
EXPENSE BREAKDOWN
• Category
• Quantity
• Unit
• Amount
EXPORT & SHARING
Available after shift confirmation:
✔ Share
✔ Download as:
• PDF
• Excel
• Text
DATA INTEGRITY RULES (STRICT)
Rule Enforced
Only one active shift Yes
Expenses after shift end No
Edit after confirmation No
Odometer rollback No
Shift deletion No
Settings
App Security
• App Lock
o Enable / Disable App Lock
o Authentication methods:
App-level PIN (mandatory)
Biometric authentication (optional, device supported)
• Change PIN
o Current PIN
o New PIN
o Confirm PIN
• Biometric Authentication
o Enable / Disable
o Auto-disabled if unsupported
Driver earnings Configuration
• Earnings Type Selection
Select from Three option
o Fixed salary
o Commission
o Hybrid (fixed salary + commission)
▪ If fixed salary is selected add text field to enter salary
▪ If Commission is selected show default Commission slab details
▪ If Hybrid (fixed salary + commission) is selected add text field to enter salary and show default
Commission slab details
o Default Commission Slabs
Sl. No Total Earnings Range Commission %
1 ₹0 – ₹2,500 20%
2 ₹2,501 – ₹3,500 30%
3 ₹3,501 – ₹5,000 35%
4 Above ₹5,001 40%
o Both Total earnings and Commission percentage can be edited
• Commission Calculation Base
o Gross Total Earnings (default)
o Net Earnings (after expenses)
• Helper Text (Mandatory):
“Gross earnings calculate commission on total trip earnings.
Net earnings calculate commission after deducting applicable expenses.”
• Daily Salary
o Driver enters fixed per-day salary amount.
o Salary amount applies per working day.
• Commission-Based Earnings
o Driver earns commission based on total daily earnings from all the operator.
o Commission slabs and Earnings range values are shown by default and can be edited in settings
page.
o Only show commission slab table for driver reference
• Commission Rules
• Earnings range values must not overlap.
• Commission percentage must be between 0% and 100%.
• The applicable commission slab is determined by total earnings from all the operator for the day.
• Only one slab applies per day.
• If the shift hour exceeds 24hrs then the driver commission percent has to be calculated for 2 days and divide
the earnings amount by number of days he is in the shift, this shall be calculated till the current shift ends
Expense Category
• Default Categories
o Fuel
o Engine Oil (MAINTENANCE Category)
o Coolant (MAINTENANCE Category)
o Puncture (MAINTENANCE Category)
o Repair (MAINTENANCE Category)
o Water Wash (MAINTENANCE Category)
o Parking
o Fast Tag
o Others
o Ola Recharge (recharge category)
o Uber Recharge (recharge category)
o Rapido Recharge (recharge category)
✔ Add / delete custom categories allowed
Category Management
• Provide an option to Add New Category.
• Provide an option to Delete Custom Categories.
• Default/system categories cannot be deleted.
• Custom categories must:
o Have a unique name
o Define whether they use Quantity or Count
o Define the unit (if quantity-based)
Recharge Category Treatment
Controls how recharge categories behave.
Recharge Categories:
• Ola Recharge
• Uber Recharge
• Rapido Recharge
Options:
• Include as expense
• Exclude from expense
Default Logic:
• Included for driver salary calculation
• Excluded from owner expense deduction
Share Report Settings
Export Formats
Enable / Disable:
• PDF
• Excel
• Text
Applies to:
• All types of report
Maintenance
• Enable / Disable maintenance tracking
• Enable service reminders
Automated Weekly Owner Report
• Cycle: Sunday → Saturday
• Send every Sunday at 4:00 AM
• Recipient: Owner Email ID
• Cannot be disabled
Automated Daily shift Report
• Send every once the shift is end by the driver
• Recipient: Owner Email ID
• Cannot be disabled
Automated Settings change report
• When any details changed in the settings page
• Send once the shift starts is triggered
• Cannot be disabled
Automated app backup
• Once Clear All Data confirmed to clear local data send the app backup to the owner’s mail id and
then clear data.
• Before sending data to owner data should not be cleared
• Cannot be disabled
All these automated mails will be done automatically there should be no driver involvement
Automated Report
• Cycle: 1 month (month start date and end date)
• Send every month 1st at 4:00 AM
• Recipient: Owner Email ID
• Cannot be disabled
DATA MANAGEMENT SETTINGS
• Export full app backup
• Import backup file
Email Backup
• Send backup to registered email ID
• Manual trigger
Clear All Data
• Clears all local data
• Requires:
o Confirmation
o PIN re-authentication
• Once confirmed send the app backup to the owner’s mail id, before clearing all local data.
• Irreversible action
ACCOUNT SETTINGS
Logout
• Google logout
• Session cleared
• Data retained unless user clears it
Appearance Preferences
Theme
• Light Mode
• Dark Mode
• Applies instantly
Language
Supported:
• English (default)
• Tamil
• Kannada
• Malayalam
• Hindi
• Telugu
Rules:
• Uses localization keys
• App restart optional
Currency Display
• Default: INR (₹)
• Display-only preference
• Does not alter historical data
Maintenance
• Reminder threshold (km)
• Reminder threshold (days)
Trip Entry Mode
• Detailed Trip Entry
• Summary-only Entry
Applies:
• Active & future shifts
• Not retroactive
Shift Duration Alerts
• Enable / Disable alerts
o < 8 hours → Warning
o 12 hours → Alert
o >24 hrs warning
(Default: Enabled)
Compliance
• Enable / Disable compliance tracking
• Enable expiry alerts
• Reminder days configuration
• Alert priority (soft / strong)
Mileage Display
• Show mileage only when fuel expense exists
• Display N/A otherwise
Auto-Open Report After Shift End
• Enable / Disable
(Default: Enabled)
RULES GOVERNING SETTINGS & PREFERENCES
Rule Behaviour
Change during active shift Applied after shift ends
Historical shifts Never recalculated
Backup restore Overrides current config
Preferences reset Optional separate reset
INSURANCE & COMPLIANCE TRACKING
COMPLIANCE TYPES
Mandatory (India-specific, extensible)
• Vehicle Insurance
• Fitness Certificate
• Pollution (PUC)
• Road Tax
• Permit
• National Permit
• State Permit
• Other (custom)
ADD / EDIT COMPLIANCE RECORD
Mandatory Fields
• Select Vehicle
• Compliance Type
• Policy / Certificate Number
• Start Date
• Expiry Date
Optional Fields
• Provider Name
• Amount Paid
• Notes
• Upload Document (PDF / Image)
COMPLIANCE VALIDATION LOGIC
• Expiry date must be ≥ start date
• Duplicate active compliance types not allowed per vehicle
• Expired compliance flagged automatically
COMPLIANCE ALERTS & REMINDERS
Default Reminder Schedule
• 30 days before expiry
• 7 days before expiry
• On expiry date
• Every day after expiry when compliance is not updated
Alert Display Locations
• Home screen (badge)
• Compliance screen
• Notification banner (if enabled)
HOME SCREEN ALERT BADGES (NON-INTRUSIVE)
Examples:
• Insurance expires in 5 days
• PUC expired
Tap → Opens Compliance Module
VehicleMaintenance
• maintenance_id
• vehicle_id
• category
• service_date
• odometer
• cost
• next_service_km
• next_service_date
• notes
• attachments
VehicleCompliance
• compliance_id
• vehicle_id
• type
• start_date
• expiry_date
• provider
• amount
• document_path
• status
Report
REPORTS & ANALYTICS MODULE
(Categorized Report List)
1. EARNINGS REPORTS
1.1 Overall Earnings Report
• Date range based
• Total earnings (all operators)
• Gross / Net toggle (as per settings)
1.2 Operator-wise Earnings Report
• Ola
• Uber
• Rapido
• Private Trips
• Total trips & total earnings per operator
1.3 Vehicle-wise Earnings Report
• Vehicle Reg No
• Total trips
• Total earnings
1.4 Trip Count Report
• Total trips per operator
• Vehicle-wise trip count
2. EXPENSE REPORTS
2.1 Overall Expense Report
• Total expenses
• Date range based
2.2 Category-wise Expense Report
• Fuel
• Engine Oil
• Coolant
• Puncture
• Repair
• Water Wash
• Parking
• FASTag
• Recharges (operator-wise)
• Others
2.3 Vehicle-wise Expense Report
• Expense per vehicle
• Category breakdown
3. SHIFT REPORTS
3.1 Shift Summary Report
• One row per shift
• Date
• Vehicle
• Total earnings
• Total expenses
• Driver salary
• Owner gets
3.2 Detailed Shift Report
• Full shift report (same as shift end report)
• Opening / closing odometer
• Mileage
• Fuel consumed
• Earnings & expenses breakdown
3.3 Shift Duration Report
• Shift hours logged
• < 8 hrs (warning)
• 12 hrs (alert)
4. COMMISSION & SALARY REPORTS
4.1 Driver Commission Report
• Commission slabs
• Applicable slab per shift
• Commission amount
4.2 Salary vs Commission Comparison
• Salary-based vs commission-based earnings
• Date range analysis
5. VEHICLE PERFORMANCE REPORTS
5.1 Mileage Report
• Vehicle-wise mileage
• Shift-wise mileage
5.2 Distance Covered Report
• Opening vs closing odometer
• Total kilometres
6. MAINTENANCE REPORTS
6.1 Vehicle-wise Maintenance Report
• Service history per vehicle
6.2 Category-wise Maintenance Cost Report
• Maintenance category vs cost
6.3 Date-range Maintenance Summary
• Total maintenance cost in selected period
7. NSURANCE & COMPLIANCE REPORTS
7.1 Compliance Status Report
• Valid / Expiring / Expired
7.2 Compliance Expense Report
• Insurance / Permit / PUC costs
8. OWNER REPORTS (AUTOMATED)
Automated Weekly Owner Summary Report (Sunday–Saturday)
• Earnings summary
• Expense summary
• Driver salary
• Owner gets
• Maintenance summary
• Compliance status summary
• Auto-sent to owner email every Sunday at 6 AM
Automated Daily shift Report
• Send every once the shift is end by the driver
• Recipient: Owner Email ID
• Cannot be disabled
Automated Settings change report
• When any details changed in the settings page
• Send once the shift starts is triggered
• Cannot be disabled
Automated app backup
• Once Clear All Data confirmed to clear local data send the app backup to the owner’s mail id and
then clear data.
• Before sending data to owner data should not be cleared
• Cannot be disabled
All these automated mails will be done automatically there should be no driver involvement
Automated Report consolidated detail report in pdf
• Cycle: 1 month (month start date and end date)
• Send every month 1st at 4:00 AM
• Recipient: Owner Email ID
• Cannot be disabled
9. EXPORT & VISUALIZATION FEATURES (COMMON TO ALL REPORTS)
Export Formats
• PDF
• Excel
• Text
Visualization
• Bar charts
• Pie charts
• Tabular view
REPORT FILTERS (GLOBAL)
• Date range
• Vehicle
• Operator
• Expense category
• Shift status
ACCESS RULES
• Active shift → Reports read-only
• Ended shift → Full access
• Owner reports → Read-only for driver