# Fuelify360 - Full System Architecture, Calculation Models & API Reference ## 1. System Overview Fuelify360 is a modern, responsive web application engineered to give vehicle owners and fleet managers transparent, auditable control over fuel expenditure, vehicle maintenance, and emissions. ## 2. Fuel Economy & Efficiency Calculation Logic ### 2.1 The Full-to-Full Tank Method Fuelify360 uses the industry-standard full-to-full calculation model to prevent error accumulation from partial tank readings: - Fuel Consumption (km/L) = (Current Odometer - Previous Full Odometer) / Fuel Volume Added - Fuel Consumption (L/100km) = (Fuel Volume Added / (Current Odometer - Previous Full Odometer)) * 100 - Fuel Economy (MPG US) = (Distance in Miles) / (Fuel in US Gallons) - Fuel Economy (MPG UK) = (Distance in Miles) / (Fuel in Imperial Gallons) ### 2.2 Partial Fill-up Handling When a fill-up is flagged as partial, Fuelify360 defers the consumption calculation until the next full tank is reached, aggregating intermediate fuel volumes across the single odometer span. ## 3. Environmental CO2 Calculation Standards (DEFRA / EPA / IPCC) Fuelify360 distinguishes between Tank-to-Wheel (TTW, Scope 1 direct tailpipe emissions) and Well-to-Wheel (WTW, Scope 1 + Scope 3 upstream fuel extraction and refining emissions): - **Petrol / Gasoline (Special 95 & Super 98)**: - TTW: 2.31 kg CO2 per liter - WTW: 2.79 kg CO2 per liter - **Diesel**: - TTW: 2.68 kg CO2 per liter - WTW: 3.18 kg CO2 per liter - **Equivalency Models**: - Urban tree absorption offset: Calculated based on ~21.77 kg CO2 absorbed per mature tree annually. - Passenger flight-km equivalency: 0.115 kg CO2 per passenger-kilometer. ## 4. Global Retail Fuel Price Tariffs & Public Tools (30+ Countries) Fuelify360 exposes public, zero-login calculators and country fuel benchmark directories covering India (INR), Nigeria (NGN), Kenya (KES), South Africa (ZAR), UAE (AED), Saudi Arabia (SAR), UK (GBP), USA (USD), and 20+ additional markets: - **Free Trip Fuel Cost Splitter & Mileage Calculator**: https://fuelify360.com/calculator - **Global & Per-Country Fuel Price Guides**: https://fuelify360.com/fuel-prices (e.g., `/fuel-prices/india`, `/fuel-prices/nigeria`, `/fuel-prices/kenya`, `/fuel-prices/south-africa`, `/fuel-prices/united-arab-emirates`) ## 5. WhatsApp Business AI Refuel Architecture - **Transport Carrier**: Native Meta WhatsApp Cloud API (Graph API v21.0) with zero external SDKs. Instant 1-Message Setup: `https://wa.me/971541391770?text=Yes%2C%20My%20Vehicle`. - **Powered by AI Engine**: Evaluates car and motorcycle/bike messages using multi-provider LLMs with pure-PHP deterministic regex fallback. - **Voice Note Processing**: Incoming OGG Opus voice notes transcribed and analyzed with sub-second turnarounds. - **Magnitude Disambiguation**: Intelligently distinguishes fuel cost from odometer readings order-independently (`100 142850` vs. `142850 100`). - **QR Code Onboarding**: High-error-correction (ECC=H) vector SVG QR code allowing desktop visitors to scan and start chat sessions immediately. ## 6. Security & Privacy Architecture - **Pure-PHP Portability**: Runs with zero npm/composer dependencies on shared hosting, Docker, or local stacks. - **Webhook Cryptographic Defense**: HMAC-SHA256 verification (`X-Hub-Signature-256`) against incoming spoofed requests. - **Defensive Export**: CSV formula injection prevention (CWE-1236) automatically sanitizes characters (`=`, `+`, `-`, `@`) with prepended single quotes. - **Cryptographic Security**: Passwords stored using Argon2id with strict length caps to mitigate denial-of-service vector attacks. ## 7. Official Resources - Web Application: https://fuelify360.com - Free Trip & Mileage Calculator: https://fuelify360.com/calculator - Global Fuel Prices Hub: https://fuelify360.com/fuel-prices - Main Developer: Gulfnados Technology Systems (https://www.gulfnados.com)