Skip to content

psurkanti/AI-Container-Tracking-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Powered Supply Chain Container Tracking System

Production-ready FastAPI system focused on container shipment tracking using part number and tracking pin lookups.

Roles and login

  • Admin login can upload shipment CSV files.
  • Customer login can only track assigned part_number + tracking_pin.
  • Customer login can view multiple assigned parts with QC status.
  • Tracking response includes qc_status.

Your admin username and password

  1. Open data/customer_access.json (create it from data/customer_access.example.json if you do not have one).
  2. Find the user object with "role": "admin" (or add one).
  3. Set username and password to whatever you want — that is what you use on /admin.
  4. Restart the API after saving the file (uvicorn only loads this file at startup; --reload does not watch JSON).
  5. data/customer_access.json is gitignored — do not commit real passwords.

If that file is missing or empty, the app falls back to demo users (e.g. admin / admin123).

UI pages:

  • Admin page: /admin
  • Customer page: /customer

Features

  • CSV ingestion via upload or file path
  • Automated profiling (shape, dtypes, nulls, uniqueness, stats)
  • Data quality checks (missing values, mismatch rules, date sequence, outliers, duplicates)
  • Schema drift detection and optional Evidently drift
  • AI issue explanation and fix recommendations via OpenAI/Azure OpenAI-compatible endpoint
  • Optional self-healing actions
  • JSON + CSV + HTML reporting
  • Structured JSON logging

Run locally

cd /Users/pavithrareddy/projects/data-quality-ai-system
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload

Environment variables

  • OPENAI_API_KEY (optional; fallback explanations used if omitted)
  • OPENAI_BASE_URL (optional; set for Azure/OpenAI-compatible endpoints)
  • OPENAI_MODEL (default gpt-4o-mini)

API Endpoints

  • POST /auth/login (form: username, password)
  • POST /upload-data (multipart form: auth_token, file; admin only)
  • POST /run-quality-checks (multipart form with either file_path or file, optional self_heal)
  • POST /detect-drift (multipart form with either file_path or file)
  • POST /explain-issues (multipart form with either file_path or file)
  • POST /suggest-fixes (multipart form with either file_path or file)
  • POST /generate-report (multipart form with either file_path or file, optional self_heal)
  • POST /track-container (multipart form with part_number, tracking_pin, and either file_path or file)
  • POST /my-parts-status (multipart form: auth_token, and either file_path or file; customer view)
  • POST /admin/all-parts-status (multipart form: auth_token, and either file_path or file; admin view)
  • POST /customer/track-by-part (multipart form: auth_token, part_number, and source input; customer view)

Example response snippet

{
  "data_quality_score": 78,
  "issues": [
    {
      "type": "missing_value",
      "column": "qc_status",
      "count": 12,
      "explanation": "QC status is missing for some containers which may delay approvals.",
      "suggested_fix": "Fill with 'Pending' or verify from QC team"
    }
  ]
}

About

AI-powered supply chain container tracking and logistics analytics platform with real-time shipment visibility, predictive ETA insights, and enterprise tracking workflows.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors