Skip to main content

User Roles & Permissions

Viax supports four distinct user roles, each with specific capabilities, permissions, and responsibilities within the platform.

Role Overview

Users

Customers who request rides and deliveries

Drivers

Conductors who accept and fulfill service requests

Administrators

Platform managers with full system access

Companies

Organizations managing fleets of drivers

Users (Customers)

Role Description

Users are the primary customers of the platform who request transportation or delivery services.

Registration Requirements

1

Basic Information

  • Full name (nombre_completo)
  • Email address (unique)
  • Phone number
  • Password (minimum 8 characters)
2

Email Verification

  • 6-digit verification code sent to email
  • Code expires after 10 minutes
  • Must verify before accessing services
3

Optional Information

  • Profile photo
  • Home address
  • Preferred payment methods

Permissions & Capabilities

Can:
  • ✅ Request rides
  • ✅ Request package deliveries
  • ✅ Select pickup and dropoff locations
  • ✅ Choose vehicle type
  • ✅ View price estimates
  • ✅ Track active trips
  • ✅ Cancel pending requests
  • ✅ View trip history
Cannot:
  • ❌ Accept trip requests
  • ❌ View other users’ trips
  • ❌ Modify completed trips

User States

enum estado_usuario {
  'activo',      -- Normal active user
  'suspendido',  -- Temporarily suspended
  'bloqueado'    -- Permanently blocked
}
State Transitions:
  • activosuspendido: Admin action (policy violation)
  • suspendidoactivo: Admin reinstates after review
  • activobloqueado: Permanent ban (serious violations)

Drivers (Conductors)

Role Description

Drivers are service providers who accept trip requests and transport users or packages.

Registration Requirements

  • Full name matching ID documents
  • Email address (unique)
  • Phone number (verified)
  • Physical address
  • Date of birth (18+ years)
  • National ID number
Required Fields:
  • License number
  • Issue date
  • Expiration date
  • License category/class
  • Issuing authority
Documents to Upload:
  • Front photo of license (clear, readable)
  • Back photo of license
  • Must be valid (not expired)
  • Vehicle make and model
  • Year of manufacture
  • License plate number
  • Vehicle color
  • Vehicle type (moto, carro, moto_carga, carro_carga)
  • Seating capacity
Vehicle Documents:
  • Registration certificate
  • Insurance policy (valid)
  • Vehicle inspection certificate
  • Photos (front, back, sides, interior)
  • Bank account for payments
  • Profile photo (professional)
  • Clean driving record
  • Pass background check (admin review)
  • Accept terms of service

Verification Workflow

Verification States

enum EstadoVerificacion {
  pendiente,    // Awaiting admin review
  en_revision,  // Currently being reviewed
  aprobado,     // Approved, can accept trips
  rechazado     // Rejected, must fix issues
}

Driver Permissions

Can:
  • ✅ View nearby trip requests (within 5km)
  • ✅ Accept trip requests
  • ✅ Decline trip requests
  • ✅ Navigate to pickup location
  • ✅ Start trip
  • ✅ Update trip status
  • ✅ Complete trip
  • ✅ Cancel trips (with valid reason)
  • ✅ View active trip details
Cannot:
  • ❌ Accept trips while offline
  • ❌ Accept trips if not verified
  • ❌ Accept multiple trips simultaneously
  • ❌ Modify trip pricing
  • ❌ Cancel without penalty after certain point

Driver Dashboard Metrics

{
  "driver_stats": {
    "total_trips": 156,
    "acceptance_rate": 0.85,
    "cancellation_rate": 0.05,
    "average_rating": 4.7,
    "total_earnings": 2450000,
    "total_distance_km": 1250,
    "active_since": "2024-01-15"
  }
}

Driver Categories

Motorcycle Drivers

Vehicles: 🏍️ Moto, 🏍️ Moto CargaServices:
  • Quick rides (1-2 passengers)
  • Small package delivery
  • Express courier
Advantages:
  • High maneuverability
  • Lower fuel costs
  • Faster in traffic

Car Drivers

Vehicles: 🚗 Carro, 🚙 Carro CargaServices:
  • Standard rides (1-4 passengers)
  • Large package delivery
  • Family transport
Advantages:
  • More comfortable
  • Weather protection
  • Higher capacity

Administrators

Role Description

Administrators manage the entire platform, verify drivers, handle disputes, and configure system settings.

Access Levels

Full System Access:
  • ✅ All user management operations
  • ✅ All driver operations
  • ✅ System configuration
  • ✅ Financial reports
  • ✅ Create/delete admin accounts
  • ✅ Access audit logs
  • ✅ Database backups
  • ✅ Emergency system shutdown

Admin Capabilities

Operations:
  • View all users
  • Search/filter users
  • View user details
  • View user trip history
  • Suspend user accounts
  • Activate suspended accounts
  • Block users permanently
  • Reset user passwords
  • Export user data
  • Handle GDPR requests
Document Review:
  • View pending applications
  • Review driver documents
  • Zoom/rotate document images
  • Approve applications
  • Reject with feedback
  • Request additional documents
  • Verify expiration dates
  • Check authenticity
Background Checks:
  • Review driving record
  • Verify identity
  • Check criminal record (if applicable)
  • Validate insurance
Real-time Dashboard:
  • Active users count
  • Online drivers count
  • Active trips
  • Pending trip requests
  • System health metrics
  • Error rates
  • API response times
Alerts:
  • High cancellation rates
  • Driver complaints
  • System errors
  • Payment failures
Revenue Tracking:
  • Daily/weekly/monthly revenue
  • Commission breakdown
  • Driver payouts pending
  • Payment processing fees
  • Refunds issued
Reports:
  • Financial statements
  • Tax reports
  • Driver earning summaries
  • Platform fees collected
Pricing Rules:
  • Base fare by vehicle type
  • Per-kilometer charges
  • Per-minute charges
  • Minimum fare
  • Maximum fare
  • Surge pricing triggers
  • Commission rates
Service Areas:
  • Define geographic zones
  • Set zone-specific pricing
  • Enable/disable zones
  • Driver allocation rules
Platform Settings:
  • Email templates
  • Notification settings
  • App version requirements
  • Maintenance mode

Admin Dashboard

// Dashboard overview data structure
{
  "overview": {
    "total_users": 5420,
    "active_users_today": 1235,
    "total_drivers": 842,
    "online_drivers": 156,
    "trips_today": 673,
    "revenue_today": 8450000,
    "pending_approvals": 23,
    "open_support_tickets": 12
  },
  "recent_activity": [
    {"type": "new_user", "timestamp": "2024-11-01 10:30:00"},
    {"type": "trip_completed", "timestamp": "2024-11-01 10:28:15"},
    {"type": "driver_approved", "timestamp": "2024-11-01 10:25:00"}
  ],
  "alerts": [
    {"level": "warning", "message": "High cancellation rate in Zone A"},
    {"level": "info", "message": "23 drivers awaiting approval"}
  ]
}

Companies

Role Description

Companies are organizations that manage fleets of drivers and vehicles under their brand.

Company Registration

1

Company Information

  • Legal company name
  • Tax ID / Business registration number
  • Physical address
  • Contact email
  • Contact phone
  • Company logo
2

Legal Documents

  • Business license
  • Tax registration
  • Insurance certificate
  • Operating permits
3

Admin Approval

Platform admin reviews and approves company registration
4

Setup

  • Create company admin account
  • Configure commission agreement
  • Set up payment methods
  • Define service areas

Company Permissions

Driver Management:
  • ✅ Register drivers under company
  • ✅ Assign vehicles to drivers
  • ✅ Monitor driver performance
  • ✅ View driver locations (when online)
  • ✅ Set driver schedules
  • ✅ Deactivate drivers
Vehicle Management:
  • ✅ Register company vehicles
  • ✅ Track vehicle maintenance
  • ✅ Assign vehicles to drivers
  • ✅ Monitor vehicle status
  • ✅ Schedule inspections

Company Dashboard

{
  "company_metrics": {
    "total_drivers": 45,
    "active_drivers": 32,
    "total_vehicles": 50,
    "trips_this_month": 2150,
    "revenue_this_month": 32500000,
    "average_driver_rating": 4.6,
    "fleet_utilization": 0.71
  },
  "top_drivers": [
    {"name": "Carlos R.", "trips": 156, "rating": 4.9},
    {"name": "Maria S.", "trips": 142, "rating": 4.8}
  ]
}

Permission Matrix

FeaturePermission
Request trips
Cancel trips
View own history
Accept trips
View all trips
Verify drivers
Change pricing

Role Transitions

Users can upgrade their roles but typically cannot downgrade without admin intervention.
Possible Transitions: Important Notes:
  • A user can be both a customer and driver (separate profiles)
  • Company owners are typically also drivers
  • Admins have separate accounts (not linked to user/driver accounts)
  • Role changes require verification/approval
Viax’s role-based permission system ensures secure, organized access control while maintaining flexibility for different user types and business models.

Build docs developers (and LLMs) love