Multi-Tier Routing: Model A vs Model B
Model A: Dealership (Partner / Reseller Ecosystem)
Super Admin operates as wholesale technology provider. Regional Dealerships purchase bulk licenses (e.g., 2,000 points) and provision end-client Admins (Schools, Companies, Families).
Super Admin என்பவர் மெயின் ஓனர். அவர் Dealership (பார்ட்னர்)-களுக்கு 1000 அல்லது 2000 Points (லைசென்ஸ்) ஒதுக்குவார். டீலர்ஷிப் தனக்கு கீழே இருக்கும் பள்ளிகளுக்கு (School Admin) 50 பாயிண்ட்ஸ் பிரித்துக் கொடுப்பார். பள்ளி அட்மின் தங்களுக்கு கீழ் டிரைவர்கள், ஆசிரியர்கள், மாணவர்கள் மற்றும் பெற்றோர்களை சேர்த்து ஆப்-ஐ இயக்குவார்.
Model B: Direct Route (Direct Client Relationship)
No intermediary Dealership. The client (School or Enterprise) registers directly or is provisioned by Super Admin. Super Admin directly allocates points, manages subscriptions, and handles billing.
இதில் Dealership இடைத்தரகர் கிடையாது. ஒரு பள்ளி அல்லது நிறுவனம் நேரடியாக Super Admin-ஐ அணுகி அல்லது ஆப்-ல் உள்ள "Admin Register" மூலம் தங்களை பதிவு செய்யும். Super Admin நேரடியாக புள்ளிகளை (Points) ஒதுக்குவார். பள்ளி அட்மின் நேரடியாக தங்களது ஆசிரியர்கள் மற்றும் டிரைவர்களை ஆப்-ல் சேர்த்து பயன்படுத்துவார்.
User Type Architecture: Education, Company & Family Models
Almodesk ecosystem-ல் உள்ள பயனாளர்கள் அமைப்பின் வகைக்கேற்ப (Organization Type) Education (பள்ளி/கல்லூரி), Company (கார்ப்பரேட்/லாஜிஸ்டிக்ஸ்), மற்றும் Family (குடும்ப பாதுகாப்பு) என 3 தனித்துவமான கட்டமைப்புகளாகப் பிரிக்கப்பட்டுள்ளனர். ஒவ்வொரு பிரிவிலும் Super Admin முதல் கீழ்மட்ட End-User வரை யார் யார் உள்ளார்கள், எப்படி App-ல் Entry ஆகிறார்கள் மற்றும் செயல்படுகிறார்கள் என்பதை கீழே விரிவாகக் காணலாம்!
Ecosystem 1: Education Model (School & College Transport) Org Type: Education
பள்ளி/கல்லூரி பேருந்து நேரலை ஜிபிஎஸ், வருகைப் பதிவு (Roll Call), பஸ்-வகுப்பறை ஒப்பீடு & பெற்றோர் நேரலை வரைபடக் கட்டமைப்பு.
Ecosystem 2: Company Model (Corporate & Logistics Fleet) Org Type: Company
களப்பணியாளர்கள் செல்ஃபி பஞ்ச்-இன், இருப்பிட வரைபடம் (Geofence), பயண தூர கணக்கீடு (Km Mileage) & டெலிவரி டிராக்கிங்.
Ecosystem 3: Family Model (Personal Safety & Geofenced Hub) Org Type: Family
குடும்ப உறுப்பினர்கள், குழந்தைகள் பள்ளி செல்லும் வழி, முதியோர் அவசர உதவி (SOS) மற்றும் குடும்ப வாகன ஜிபிஎஸ் பகிர்வு.
School Admin Entity Inspector
Education EcosystemHow Every User Enters the App (எப்படி Entry ஆகுது)
From Super Admin's initial quota issuance down to the end-user's background location handshake:
Step 1: Super Admin Provisions Dealership or Direct Admin
Super Admin Screen
Super Admin opens DealershipAddScreen in the app/portal. Enters:
Entity Name (e.g., "Apex Telematics"), Points Quota (e.g., 1000),
Expiry Date (e.g., 365 Days), and Brand Color (e.g., #000F66).
Step 2: Dealership / Super Admin Provisions Client Admin
Client Admin CreationDealership logs in, selects "Add Client", enters school details (*St. Thomas School*), allocates 50 Points from their dealer wallet, and sets password. Client Admin receives SMS: "Your Almodesk Portal is ready. User: admin@stthomas.edu | Pass: St#2026".
Step 3: Admin Provisions Sub-Admins & End Users
App: Communities ScreenClient Admin logs in, navigates to Communities (Users):
Step 4: End User Login & Dynamic Role Routing
Flutter root_screen.dart
User logs in via LoginScreen. The app calls POST /auth/login.
In root_screen.dart, the app inspects role and launches the exact view:
role == 'driver'➔ Opens DriverBusTripScreenrole == 'parent'➔ Opens ParentLiveTrackingScreenrole == 'teacher'➔ Opens TeacherClassroomScreenrole == 'admin'➔ Opens EducationAdminDashboardScreenrole == 'user'➔ Opens AttendanceBasedDashboardScreen
Step 5: Background Location Permissions Handshake
Android / iOS OS Handshake
1. Location: "Allow all the time" (Background Access).
2. Sticky Foreground Service: Status bar sticky notification: "Almodesk Tracker Service is active".
3. Battery Optimization Bypass: "Unrestricted" so GPS continues when the screen is locked.
SMS & WhatsApp Invitation Templates
Exact message formats sent to users when their accounts are provisioned:
You have been assigned as driver for Bus #04 (Route North-A) at St. Thomas School.
📱 Download App: https://almodesk.com/app
👤 Mobile: 9876543210
🔑 Password: Bus#4402
*Please tap 'Allow all the time' for GPS permissions.*
Live tracking for Aarav (Grade 5-A, Bus #04) is now active!
📱 Install App: https://almodesk.com/parent
👤 Login Mobile: 9840123456
🔑 Password: Parent@2026
You can now track bus live on Google Maps and get Stop ETA alerts!
Your classroom attendance portal for Grade 5-Section A is active.
🌐 Portal: https://almodesk.com/workflow
👤 Email: geetha@stthomas.edu
🔑 Default Password: Teach#2026
Conduct daily roll call and review bus arrival discrepancies.
Your duty shift tracker is ready.
📱 App: https://almodesk.com/app
👤 Mobile: 9789012345
🔑 Temporary Password: Shift#2026
Take morning selfie inside office geofence to clock in attendance.
Exact Screen Fields & Form Matrix
Detailed fields, validations, and endpoints from the Flutter codebase:
| Field | Type | Default / Validation | Purpose |
|---|---|---|---|
| company_name | Text | Required | Name of the dealership entity |
| user_points | Number | Default: 50 (or 1000) | Total bulk quota licenses granted to partner |
| expiry_date | Date | Default: Today + 365 days | Partner subscription validity period |
| org_type | Dropdown | Education / Company / Family | Sets organization operational model |
| brand_color | Hex Color | Default: #000F66 | White-label UI accent branding |
| logo | Image/Base64 | Max 600x600 Quality 85 | Custom Partner/School Logo |
| Field | Type | Applicable Role | Purpose |
|---|---|---|---|
| name & mobile_number | Text | All Roles | Primary identification & login credential |
| assigned_bus_id | Dropdown | Driver (1 Driver = 1 Bus) | Binds driver strictly to GPS hardware / bus |
| assigned_class_id | Dropdown | Teacher | Assigns class section (e.g. Grade 5-A) for roll call |
| parent_mobile_number | Number | Student | Creates guardian login profile automatically |
| bus_stop_id | Dropdown | Student | Fixes morning pickup & evening drop coordinates |
Daily Hour-by-Hour Execution Routine
How drivers, teachers, parents, and admins coordinate smoothly from sunrise to evening:
Role Operational Guides (எப்படி Use பண்ணனும்)
Daily operational routines, screen walkthroughs, buttons, and pro-tips for every single role:
1. Super Admin (Master System Owner)
Master Organization & Quota GovernancePrimary Responsibility: Top-tier governance. Super Admin monitors global connected vehicle counts, creates regional Dealerships, sets initial quota wallets, and extends expiring subscription packages.
Key Screens: dealershipListScreen, dealershipAddScreen, updatePointsExpiryScreen.
2. Dealership (Partner / Reseller)
B2B Partner & Client License WalletPrimary Responsibility: Distributing licenses to local schools, colleges, and commercial fleets under their allocated bulk wallet. Monitors renewal expiry dates and handles local client billing.
Workflow: Dealer checks balance (e.g. 1,450 / 2,000 pts) ➔ Onboards School with 50 points ➔ Delivers credentials ➔ Collects yearly renewal fee.
3. Admin (School / Company / Family)
Institutional Command & Fleet RadarDaily Routine (School Admin):
• 06:45 AM: Opens EducationAdminDashboardScreen. Monitors active buses.
• 07:30 AM: Checks live speed flags (>50 km/h warnings).
• 09:00 AM: Audits Attendance Discrepancies (Students who boarded bus but missing in class).
• 04:30 PM: Evening drop fleet tracking until all trips conclude.
4. Driver (Bus Trip & Fleet Operations)
Bus Route Execution & Student SafetyStep-by-Step Procedure:
1. Login: Assigned bus (Bus #04) is loaded automatically (1 Driver = 1 Bus Policy).
2. Start Morning Trip: Taps "START MORNING TRIP" (POST /education/trip/start). Background GPS pinging begins broadcasting live coordinates to /education/trip/location-ping.
3. Boarding Checklist: At each bus stop, driver taps "Mark Board" (turns green: "✓ BOARDED"). Parents receive instant push notifications.
4. SOS Panic Button: In case of accident or breakdown, driver presses "🚨 TRIGGER SOS".
5. Complete Trip: Driver taps "Complete Trip" (POST /education/trip/end).
5. Teacher (Classroom & Roll Call)
Academic Attendance Verification1. 08:30 AM: Opens TeacherClassroomScreen. Assigned class (e.g. Grade 5-A) loads automatically.
2. Roll Call: Marks students Present, Absent, or Late.
3. Discrepancy Alert: If a student boarded the bus but was absent in the classroom, a bright red alert triggers: 🚨 ATTENDANCE DISCREPANCY DETECTED.
4. Submit: Taps "Submit Attendance" (POST /education/classroom/mark).
6. Staff & Field Agent (Punch-in & GPS Breadcrumbs)
Field Workforce Travel & Shift Tracking1. Geo-Punch In: Snaps selfie with location verified inside office geofence ➔ Taps "PUNCH IN".
2. Field Travel: Background GPS service logs travel route and client visits.
3. Punch Out: Taps "PUNCH OUT" at end of day. Displays hours worked and total km covered.
7. Parent (Live Guardian App)
Realtime Bus Radar & Child Arrival Safety1. Live Google Map: Opens ParentLiveTrackingScreen. Watches bus movement along polyline routes.
2. Smart ETA: Shows exact minutes remaining (e.g. "ETA: 7 Mins (1.8 km)").
3. Boarding Badge: Shows confirmed boarding time ("● Boarded Bus #04 at 07:42 AM").
4. Call Driver: One-tap button to call driver directly.
Background Location Engine & Phone Settings
How Flutter Background Service maintains uninterrupted GPS tracking in standby:
Settings ➔ Apps ➔ Almodesk Tracker ➔ Battery ➔ Select "Unrestricted". Turn off "Put unused apps to sleep".
App Info ➔ Autostart ➔ Enable. Battery Saver ➔ Select "No restrictions".
Settings ➔ Battery ➔ High Background Power Consumption ➔ Allow Almodesk Tracker.
Settings ➔ Almodesk Tracker ➔ Location ➔ Select "Always" and enable "Precise Location".
Edge Cases & Offline Fallback Architecture
How the application gracefully handles transient network loss and operational anomalies:
If cellular connection drops during a trip, coordinates are queued into local SQLite database. When 4G/5G restores, the app syncs the backlog in chronological batches to /education/trip/location-ping.
If a trip remains active after 4 hours without movement, the server flags the trip and prompts the School Admin with an auto-close modal to prevent battery drain on the driver's phone.
When an organization runs low on points or reaches within 14 days of subscription expiry, a warning badge appears on the Admin dashboard prompting immediate license recharge.
When SOS is triggered, a loud continuous audible siren rings on the Admin dashboard with flashing red pin markers until resolved with an operator note.
Backend API Endpoints Reference
| Method & Route | Module | Description | Roles |
|---|---|---|---|
| POST /auth/login | Auth | Authenticates credentials, returns JWT & user role | All |
| POST /superadmin/companies | SuperAdmin | Creates Dealership or Direct Company with point quotas | Super Admin |
| POST /education/trip/start | Education | Starts school bus trip and initiates live GPS ping loop | Driver |
| POST /education/trip/toggle-boarding | Education | Toggles student boarded status on bus checklist | Driver |
| GET /education/parent/live-tracking | Education | Returns real-time bus coordinates, polyline, and stop ETA | Parent |
| POST /education/sos/trigger | Education | Broadcasts panic alert with GPS coordinates to Admin desk | Driver, Parent |