Skip to main content

Welcome to Transport Logistics

This quickstart guide will walk you through the essential steps to get your logistics operations up and running. By the end of this guide, you’ll have created your first shipment and understand the core workflow of the platform.
This guide assumes you already have an account. If not, please see the Installation guide first.

What You’ll Learn

In this quickstart, you’ll:
  • Sign in to your Transport Logistics account
  • Set up your first transporter
  • Register a vehicle
  • Create a route with pricing
  • Track your first shipment from creation to completion
1

Sign In to Your Account

Navigate to your Transport Logistics instance and sign in with your credentials.
// The platform uses Supabase authentication
// Email and password authentication is handled through AuthContext
const { login } = useAuth();
await login(email, password);
After signing in, you’ll be redirected to the Dashboard where you can see an overview of your logistics operations.
Admin users have full access to create and manage all entities. Regular users can view shipments assigned to their packages.
2

Create Your First Transporter

Before you can create shipments, you need to register a transport company.
  1. Navigate to Transporters from the sidebar menu
  2. Click the “Add Transporter” button
  3. Fill in the transporter details:
const transporterData = {
  name: "Swift Logistics Pvt Ltd",
  gstn: "27AABCU9603R1ZM",
  contactPerson: "John Smith",
  contactNumber: "+91-9876543210",
  address: "123 Industrial Area, Mumbai, Maharashtra 400001"
};
  1. Click “Add Transporter” to save
The transporter will be created with Active status, making it available for vehicle assignments and shipments.
You can toggle transporters between active and inactive status. Inactive transporters won’t appear in vehicle or shipment forms.
3

Register a Vehicle

Now add a vehicle to your transporter’s fleet.
  1. Navigate to Vehicles from the sidebar
  2. Click “Add Vehicle”
  3. Fill in the vehicle information:
const vehicleData = {
  transporterId: "transporter-uuid-here",
  vehicleNumber: "MH-12-AB-1234",
  vehicleType: "Truck",        // Options: Truck, Trailer, Dumper, Train, Other
  capacity: 25,                 // Capacity in tons
  status: "Available"           // Available, In Transit, or Maintenance
};
Vehicle numbers must be unique across the system. The platform will validate for duplicates before saving.
The vehicle registration form includes:
  • Transporter: Select from active transporters only
  • Vehicle Number: Registration number (must be unique)
  • Vehicle Type: Select from predefined types or enter custom
  • Capacity: Maximum load capacity in tons
  • Status: Current availability status
  1. Click “Add Vehicle” to register
4

Create a Route

Define a transportation route with pricing information.
  1. Navigate to Routes from the sidebar
  2. Click “Add Route”
  3. Enter route details:
const routeData = {
  source: "Mumbai Port",
  destination: "Pune Warehouse",
  distanceKm: 150,
  billingRatePerTon: 500,      // Rate charged to client (₹/ton)
  vendorRatePerTon: 350,       // Rate paid to transporter (₹/ton)
  assignedPackageId: null      // Optional: assign to a package
};
Key pricing concepts:
  • Billing Rate: The rate you charge your clients per ton
  • Vendor Rate: The rate you pay to transporters per ton
  • Margin: Billing Rate - Vendor Rate = Your profit per ton
In this example:
  • Billing: ₹500/ton
  • Vendor: ₹350/ton
  • Margin: ₹150/ton profit
Routes can be assigned to packages for better organization. This is optional but recommended for larger operations.
  1. Click “Add Route” to save
5

Create Your First Shipment

Now you’re ready to create and track your first shipment!
  1. Navigate to Shipments from the sidebar
  2. Click “Add Shipment”
  3. Fill in the shipment form:

Select Route and Transporter

// Route selection auto-fills source and destination
const shipmentForm = {
  routeId: "route-uuid",          // Selecting route fills source/destination
  transporterId: "transporter-uuid",
  vehicleId: "vehicle-uuid",      // Filtered by selected transporter
};
When you select a route, the source and destination fields are automatically populated from the route data.

Enter Weight Measurements

The platform uses a three-weight system for accurate cargo measurement:
const weights = {
  grossWeight: 30.5,    // Total weight (vehicle + cargo) in tons
  tareWeight: 8.2,      // Empty vehicle weight in tons
  quantityTons: 22.3    // Net cargo weight (auto-calculated)
};

// Net weight is automatically calculated:
// quantityTons = grossWeight - tareWeight
// From src/pages/Shipments.tsx:259-294
useEffect(() => {
  const grossWeightNum = parseFloat(formData.grossWeight) || 0;
  const tareWeightNum = parseFloat(formData.tareWeight) || 0;

  // Validate weights
  if (grossWeightNum < 0) {
    errors.grossWeight = "Gross Weight cannot be negative";
  }
  if (tareWeightNum < 0) {
    errors.tareWeight = "Tare Weight cannot be negative";
  }
  if (tareWeightNum > grossWeightNum && grossWeightNum > 0) {
    errors.netWeight = "Tare Weight cannot exceed Gross Weight";
  }

  // Calculate net weight
  const isValid = grossWeightNum >= 0 && 
                  tareWeightNum >= 0 && 
                  tareWeightNum <= grossWeightNum;
  
  const netWeight = isValid 
    ? (grossWeightNum - tareWeightNum).toFixed(5) 
    : "";
    
  setFormData(prev => ({ ...prev, quantityTons: netWeight }));
}, [formData.grossWeight, formData.tareWeight]);

Set Departure Time

const timing = {
  departureTime: "2026-03-07T14:30",  // Required: when shipment departs
  arrivalTime: null,                   // Optional: filled when delivered
  status: "Pending"                    // Pending, In Transit, Delivered
};

Optional: Add Material and Remarks

const optional = {
  materialId: "coal-uuid",              // Optional: type of material
  packageId: "package-uuid",            // Optional: assign to package
  remarks: "Handle with care - fragile cargo"
};
  1. Click “Add Shipment” to create the shipment
The shipment will appear in your dashboard and in the shipments list. Non-admin users will only see shipments assigned to their packages.
6

View Shipment on Dashboard

Return to the Dashboard to see your shipment in action!The dashboard displays:

Key Metrics

// From src/pages/Dashboard.tsx:177-213
const metrics = {
  activeShipments: 5,           // Currently in transit
  totalVehicles: 12,            // All registered vehicles
  totalTransporters: 3,         // Active transport companies  
  monthlyRevenue: "₹2,45,000"   // Revenue this month
};

Active Shipments

See how many shipments are currently in transit with trend indicators

Revenue vs Cost

Monthly line chart showing billing revenue and vendor costs

Weekly Shipments

Bar chart displaying shipment volume trends by week

Recent Shipments

Table of your latest 5 shipments with key details

Revenue Calculation

The platform automatically calculates revenue based on shipment data:
// Revenue calculation from route rates and shipment quantity
const calculateRevenue = (shipment: Shipment) => {
  const quantity = shipment.quantityTons;
  const billingRate = route.billingRatePerTon;
  const vendorRate = route.vendorRatePerTon;
  
  return {
    revenue: quantity * billingRate,      // What you charge
    cost: quantity * vendorRate,          // What you pay
    profit: quantity * (billingRate - vendorRate)
  };
};

// Example:
// Quantity: 22.3 tons
// Billing Rate: ₹500/ton
// Vendor Rate: ₹350/ton
// Revenue: 22.3 × ₹500 = ₹11,150
// Cost: 22.3 × ₹350 = ₹7,805
// Profit: ₹11,150 - ₹7,805 = ₹3,345
7

Update Shipment Status (Optional)

As the shipment progresses, you can update its status:
  1. Go to Shipments page
  2. Click the Edit button on your shipment
  3. Update the status:
    • Pending: Initial state, not yet departed
    • In Transit: Currently being transported
    • Delivered: Arrived at destination
  4. Add arrival time when delivered
  5. Save changes
Regular users can view shipment details but cannot edit them. Only admin users can update shipment information.

What’s Next?

Congratulations! You’ve successfully created your first shipment. Here are some next steps:

Create Packages

Organize shipments into packages for better management and user assignment

Add Materials

Catalog the types of materials you transport for detailed tracking

User Management

Add team members and assign them to specific packages

Reports

Generate detailed reports on shipments, revenue, and performance

Understanding the Workflow

The typical workflow in Transport Logistics follows this pattern:

Key Concepts Recap

Transporter

A transport company that owns and operates vehicles. Contains GST details, contact information, and can be toggled active/inactive.

Vehicle

A physical vehicle registered to a transporter with capacity, type, and status tracking. Must have a unique registration number.

Route

A path from source to destination with distance and rate information. Routes can be reused for multiple shipments and assigned to packages.

Shipment

A single transport job using a specific vehicle, route, and transporter. Tracks weights, times, materials, and status from departure to delivery.

Package

An organizational container that groups related routes and shipments. Users can be assigned to packages to control their access.

Common Patterns

Creating Multiple Shipments on Same Route

Once you’ve set up a route, you can quickly create multiple shipments:
// Same route, different vehicles and times
const shipments = [
  { routeId: "mumbai-pune", vehicleId: "truck-1", departureTime: "2026-03-07T08:00" },
  { routeId: "mumbai-pune", vehicleId: "truck-2", departureTime: "2026-03-07T14:00" },
  { routeId: "mumbai-pune", vehicleId: "truck-3", departureTime: "2026-03-08T08:00" },
];

Organizing by Package

For larger operations, group related work:
// Create package for a specific client or project
const clientPackage = {
  name: "ACME Corp Q1 Deliveries",
  active: true
};

// Assign routes to package
const routes = [
  { packageId: clientPackage.id, source: "Mumbai", destination: "Pune" },
  { packageId: clientPackage.id, source: "Mumbai", destination: "Nashik" }
];

// All shipments on these routes inherit the package
// Assign users to package to control access

Troubleshooting

Vehicle not appearing in shipment form?

Vehicles are filtered by the selected transporter. Make sure you’ve selected a transporter first, and that the vehicle is assigned to that transporter with active status.

Can’t see source/destination fields?

Source and destination are auto-filled when you select a route. The fields are read-only to ensure consistency with route data.

Weight validation errors?

Ensure that:
  • Both gross and tare weights are positive numbers
  • Tare weight (empty vehicle) is less than gross weight (loaded vehicle)
  • The difference will be automatically calculated as net cargo weight

Get Help

Need assistance? Here are your resources:
  • Check the Installation Guide for account setup
  • Review Core Concepts for detailed feature explanations
  • Contact your administrator if you need role or permission changes

Build docs developers (and LLMs) love