Skip to main content
The Analytics Dashboard provides a comprehensive overview of your transport logistics operations with real-time metrics, revenue tracking, and shipment trends.

Overview

The dashboard displays key performance indicators (KPIs) and visualizations to help you make informed business decisions. The interface automatically adapts based on your user role—administrators see financial metrics, while regular users see operational data for their assigned packages.

Key Metrics

The dashboard displays four primary metrics in card format:

Active Shipments

Number of shipments currently in transit, with trend indicators showing percentage change

Total Vehicles

Count of all registered vehicles in the fleet

Total Transporters

Number of active transport companies

Monthly Revenue

Current month’s revenue with trend comparison to previous month (admin only)
Trend indicators appear on the Active Shipments and Monthly Revenue cards:
  • Positive trend (green): Increase compared to the previous period
  • Negative trend (red): Decrease compared to the previous period
  • Percentage values: Show the rate of change
Trend percentages are calculated by comparing current month data to the previous month’s performance.

Revenue vs. Cost Analysis

The line chart visualization tracks your financial performance over time:
  • Revenue line (solid): Total billing amounts from shipments
  • Cost line (dashed): Total vendor payments
  • X-axis: Months
  • Y-axis: Currency in thousands (₹K format)

Interpreting the Chart

// Chart displays monthly data
{
  month: "Jan",
  revenue: 150000,  // Total billing for January
  cost: 120000      // Total vendor costs for January
}
The gap between the revenue and cost lines represents your profit margin. A wider gap indicates higher profitability.
Financial data is calculated based on billing rates and vendor rates per ton, multiplied by shipment quantities.

Weekly Shipments

The bar chart shows shipment volume distribution throughout the current month:
  • Bars: Number of shipments per week
  • X-axis: Week labels (Week 1, Week 2, etc.)
  • Y-axis: Shipment count

Use Cases

  • Identify peak shipping periods
  • Plan resource allocation
  • Track operational capacity
  • Monitor weekly performance trends

Recent Shipments Table

View the latest shipment activities with sortable columns:
ColumnDescription
TransporterCompany handling the shipment
RouteSource → Destination
QuantityWeight in tons
Billing RateRate per ton charged to client (admin only)
Vendor RateRate per ton paid to vendor (admin only)
DepartureDate and time of departure
The table displays the 5 most recent shipments, sorted by creation date.

Data Loading States

Loading

While data is being fetched, you’ll see a loading spinner with the message “Loading dashboard data…”

Error State

If data cannot be loaded, an error message will display with:
  • Alert triangle icon
  • Error description
  • Detailed error message
If you encounter persistent errors, verify your network connection and user permissions.

Role-Based Views

Administrator View

Administrators see:
  • All shipments across all packages
  • Financial metrics (revenue, costs, profit)
  • Billing and vendor rates
  • Full trend analysis

Regular User View

Regular users see:
  • Only shipments from assigned packages
  • Operational metrics (shipments, vehicles, transporters)
  • Limited financial data
// Access is controlled in Dashboard.tsx
const isAdmin = user?.role === "admin";
const userPackages = userProfile?.assigned_packages ?? [];

Responsive Design

The dashboard automatically adapts to different screen sizes:
  • Desktop: 4-column grid for metrics, 2-column grid for charts
  • Tablet: 2-column layout
  • Mobile: Single-column layout with reduced table columns
On mobile devices, only essential columns are displayed in the Recent Shipments table for better readability.

Data Refresh

Dashboard data is cached for performance and refreshes automatically:
  • Analytics data uses short cache duration
  • Shipments query updates on page reload
  • Real-time updates when new shipments are created

Reports

Generate detailed reports and export data

Shipments

Manage and track shipments

Build docs developers (and LLMs) love