Skip to content

ShahinHasanov90/cargo-tracking-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cargo Tracking API

Rust Actix-web License

Overview

High-performance cargo tracking REST API built with Rust and Actix-web. Tracks shipment status, location updates, customs clearance milestones, and estimated arrival times. Designed for customs logistics and freight forwarding systems. Sub-millisecond response times.

Features

  • Shipment Management -- Create, retrieve, update, and list cargo shipments
  • Milestone Tracking -- Record and query shipment events: departed, arrived, customs hold, cleared, delivered
  • Real-time Status -- Current location, ETA, and status for any tracked shipment
  • Flexible Search -- Filter shipments by origin/destination, carrier, status, or date range
  • Thread-safe Concurrency -- In-memory store backed by DashMap for lock-free concurrent access
  • Structured Logging -- Powered by the tracing crate for observability

Getting Started

Prerequisites

  • Rust 1.75 or later
  • Cargo

Build and Run

make build
make run

The server starts on http://127.0.0.1:8080.

API Endpoints

Method Path Description
GET /health Health check
POST /api/shipments Create a shipment
GET /api/shipments List all shipments
GET /api/shipments/{id} Get shipment by ID
PUT /api/shipments/{id}/status Update shipment status
POST /api/shipments/{id}/milestones Add a milestone
GET /api/shipments/{id}/tracking Get tracking history
GET /api/shipments/{id}/tracking/current Get current tracking status
GET /api/search/shipments Search shipments

Running Tests

make test

Linting and Formatting

make lint
make fmt

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

About

High-performance cargo tracking REST API in Rust/Actix-web. Shipment milestones, customs clearance tracking, sub-ms latency.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors