I shared two projects as the following

Inspiration

Commercial long-haul trucking operations are governed by strict Federal Motor Carrier Safety Administration (FMCSA) Hours of Service (HOS) regulations. Truck drivers and fleet managers constantly struggle to balance compliant driving limits, mandatory rest breaks, optimal fuel stop planning, and tight delivery schedules. Observing these real-world friction points in commercial logistics inspired the creation of Spotter ELD Trip Planner—an intelligent, automated navigation and log generation platform designed to optimize long-haul route execution while guaranteeing 100% regulatory compliance.

What It Does

Spotter ELD Trip Planner transforms complex multi-state trip logistics into a seamless, automated workflow:

  • Interactive Route & Fuel Optimization: Dynamically plots optimal driving paths, accounting for vehicle mileage specs, weight metrics, and strategic fuel station stops to minimize transit overhead.
  • Automated HOS Schedule Calculation: Computes daily driving caps (e.g., maximum 11 hours of driving within a 14-hour duty window) and mandates required 30-minute breaks and 10-hour off-duty reset periods.
  • FMCSA-Compliant ELD Log Sheet Generation: Automatically renders standardized daily driver log grids (Off Duty, Sleeper Berth, Driving, On Duty) with total hour tallies for every leg of the journey.

How We Built It

The platform was architected with a production-grade full-stack architecture:

  • Frontend: Built with Next.js, TypeScript, and Tailwind CSS for a responsive, interactive UI featuring real-time map visualization and trip timeline rendering.
  • Backend & API: Powered by Python and FastAPI, handling high-concurrency route calculations, waypoint parsing, and HOS state machine evaluation.
  • Logistics & Mapping Integration: Leverages the Google Maps API for route geocoding, distance evaluation, and spatial waypoint clustering.
  • Mathematical & HOS Modeling: Uses algorithmic state tracking to partition total distance $D$ across average speed $v$ into driving intervals $t_{\text{drive}} = \frac{D}{v}$, enforcing break constraints whenever contiguous driving duration satisfies:

$$t_{\text{drive}} \ge T_{\text{max_drive}} \quad (T_{\text{max_drive}} = 8 \text{ hours})$$

Challenges We Faced

  1. Precision in HOS Rulesets: Translating complex, edge-case-heavy FMCSA interstate regulations into deterministic state machines required rigorous boundary testing (e.g., handling split sleeper berth rules and overnight duty shifts).
  2. Multi-Stop Fuel Stop Optimization: Balancing mathematical fuel efficiency calculations with real-world station placement along long-distance highways without introducing unnecessary detour delays.
  3. Dynamic ELD Grid Canvas Rendering: Designing a clear, vector-accurate 24-hour log grid that dynamically maps calculated duty status shifts across multi-day journeys.

What We Learned

  • Deepened technical expertise in combining spatial mapping algorithms with regulatory state management microservices.
  • Learned how to streamline complex logistical data into intuitive, driver-friendly interface components.
  • Enhanced practices in modular full-stack engineering using FastAPI and Next.js with strong type safety across API contracts.

What's Next for Spotter ELD Trip Planner

  • Real-time Live Telemetry Integration: Connecting with vehicle IoT devices for live GPS and ELD hardware sync.
  • Predictive Fuel Pricing Integration: Fetching real-time fuel market prices along route corridors to minimize trip fuel costs dynamically.
  • Multi-Driver Team Relay Support: Expanding the HOS engine to support team-driving shifts and complex fleet dispatching workflows.

⚡ Project Story: GridLog AI Inspector 💡 Inspiration In regional electric distribution sectors, such as the Assiut South Distribution Sector, field engineers handle hundreds of complex maintenance work orders and field inspection logs daily for 11kV medium-voltage and 380V low-voltage package substations, transformers, and Ring Main Units (RMUs).

While these maintenance logs contain critical operational data—such as earthing resistance values, SF6 gas pressures, and insulation oil breakdown voltages—they are often captured as unstructured text or paper forms. Manual compliance auditing is slow, labor-intensive, and prone to human oversight. Critical failure indicators or missing diagnostic data can easily go unnoticed.

Driven by my experience in electrical grid maintenance and a passion for modern software engineering, I set out to build GridLog AI Inspector: an enterprise-grade, zero-hallucination AI auditing system designed to bring smart grid intelligence and strict compliance to field maintenance operations.

🛠️ How We Built It GridLog AI Inspector was architected as a clean, modular microservice system with a complete separation of concerns between backend reasoning and executive frontend visualization:

AI Reasoning Engine (Google Gemini API): We leveraged the Gemini API with structured output schemas to enforce strict JSON data extraction and semantic reasoning over Arabic and English engineering reports.

Grounded Verification Layer: To solve the critical issue of LLM hallucinations, every extracted parameter (e.g., earthing resistance R e ​ ≤5.0 Ω, oil breakdown voltage V bd ​ ≥40 kV) is bound directly to an exact verbatim quote from the source text.

Backend Microservice (FastAPI): Built with Python and FastAPI, handling asynchronous payload parsing, input validation using Pydantic, and API endpoint exposure for SCADA/ERP sync.

Executive Dashboard (Streamlit & Custom CSS): Designed an ultra-high-contrast, dark-mode executive interface featuring real-time KPI metrics cards, structured evidence tables, uncertainty alerts, and audit-ready JSON exporters.

🎓 What We Learned Prompt Engineering & Structured Schemas: Mastered the alignment of LLM function calling and Pydantic validation schemas to guarantee deterministic, machine-readable outputs from unstructured field logs.

Strict Grounding Protocols: Learned how to effectively enforce verbatim text quotes within LLM outputs, ensuring zero-hallucination compliance audits for mission-critical power infrastructure.

Microservice Decoupling: Deepened our understanding of clean microservice architecture by maintaining complete separation between FastAPI business logic, dynamic Streamlit layouts, and custom CSS design systems.

🚨 Challenges We Faced High-Contrast UI Design in Streamlit: Overriding default Streamlit styling to build an executive dark-themed interface required deep targeted CSS interventions to resolve contrast issues across file uploaders, buttons, and alert cards.

Multilingual Domain Nomenclature: Engineering field logs often mix Arabic technical terminology with standardized electrical engineering units (e.g., 11 kV, SF6, kVA, Ohms). Fine-tuning the extraction prompts to reliably capture localized technical jargon alongside exact numerical values required extensive validation. https://github.com/Eng-Osama-Sadek/gridlog-ai-inspector.git

Built With

Share this project:

Updates

Submission history