Skip to content

Latest commit

Β 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ember πŸ”₯

Stop eating cold delivery food.

Ember is a heat-aware food-delivery intelligence layer designed to predict whether a meal will arrive hot, identify where heat is being lost, and help customers, restaurants, and delivery partners act before the experience goes bad.

Core idea: Don't measure food temperature after the problem happens. Predict the risk of a cold meal before it reaches the customer.

Why Ember?

Food can leave a restaurant hot and still arrive cold because of preparation time, pickup delays, rider travel time, traffic, weather, packaging, restaurant-to-customer distance, and batching.

Today's delivery experience mostly optimizes for time and logistics. Ember adds another objective: food heat retention.

What Ember Does

  • 🌑️ Heat Risk Prediction β€” estimates the probability that an order will arrive below an acceptable serving temperature.
  • ⏱️ Delay Detection β€” identifies orders spending too long between preparation, pickup, and delivery.
  • πŸ“¦ Packaging Intelligence β€” learns which restaurant/package combinations retain heat better.
  • πŸ›΅ Rider Delay Signals β€” detects unusually slow delivery segments and surfaces actionable nudges.
  • πŸ’Έ Cold-Meal Refund Automation β€” supports rule-based or model-assisted refund decisions.
  • ⭐ Crowdsourced Heat Ratings β€” lets customers report whether food arrived hot, warm, lukewarm, or cold.
  • πŸ“Š Restaurant Heat Analytics β€” shows restaurants where heat loss is occurring and which interventions help.
  • πŸ”Œ Delivery Platform Integration β€” designed as an API/service that could sit alongside existing delivery platforms rather than replacing them.

MVP

The first version should stay brutally simple:

  1. Customer/order data enters Ember.
  2. Ember calculates a Cold Food Risk Score.
  3. The system identifies the main risk factors.
  4. A recommendation is generated: none, nudge, priority, or refund review.
  5. The customer can submit a post-delivery heat rating.
  6. Ratings feed the prediction model and restaurant analytics.

Example

Order placed
    ↓
Restaurant prep estimate
    ↓
Pickup ETA + route + distance + weather
    ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     Ember Heat Engine        β”‚
β”‚                             β”‚
β”‚  Heat Risk: 82% πŸ”₯          β”‚
β”‚  Main risk: pickup delay    β”‚
β”‚  Expected arrival: 38 min  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    ↓
Action: prioritize pickup / notify rider
    ↓
Delivery
    ↓
Customer heat rating
    ↓
Feedback β†’ model improvement

Architecture

Ember is initially designed as a modular Python service so the prediction logic can evolve independently from APIs, integrations, and the user interface.

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚ Delivery Platform  β”‚
                    β”‚ / Restaurant Data  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚    Ember API       β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό                   β–Ό                   β–Ό
   Heat Prediction       Delay Analysis      Rating System
          β”‚                   β”‚                   β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚ Decision / Actions β”‚
                    β”‚ nudge β€’ priority   β”‚
                    β”‚ refund β€’ analytics β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚ Database / Events  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

Ember/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/                 # HTTP/API routes
β”‚   β”œβ”€β”€ core/                # Configuration and shared infrastructure
β”‚   β”œβ”€β”€ models/              # Domain and API schemas
β”‚   β”œβ”€β”€ services/            # Business logic
β”‚   β”‚   β”œβ”€β”€ heat_prediction.py
β”‚   β”‚   β”œβ”€β”€ delay_analysis.py
β”‚   β”‚   β”œβ”€β”€ refund_engine.py
β”‚   β”‚   └── rating_engine.py
β”‚   └── main.py              # Application entry point
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ raw/                 # Raw datasets (gitignored)
β”‚   └── processed/           # Processed datasets (gitignored)
β”œβ”€β”€ models/                  # Trained model artifacts (gitignored)
β”œβ”€β”€ tests/                   # Automated tests
β”œβ”€β”€ docs/                    # Architecture and research notes
β”œβ”€β”€ .env.example
β”œβ”€β”€ .gitignore
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ LICENSE
└── README.md

Heat Risk Model

The initial model does not need expensive deep learning. Start with interpretable features:

Feature Why it matters
Preparation time Food cools while waiting to be completed
Pickup delay Hot food sitting idle is a major risk
Delivery duration Longer exposure generally increases cooling
Restaurant-customer distance More travel means more heat loss
Weather Ambient temperature affects cooling
Packaging type Insulation strongly affects retention
Food category Different meals cool at different rates
Order batching Extra stops can increase delivery time
Historical restaurant performance Captures recurring operational problems
Historical rider/route delay Captures predictable logistics risk

The first prediction target can be:

P(cold_on_arrival | order, restaurant, route, weather, packaging, timing)

Later versions can use survival analysis, gradient boosting, time-series features, or physics-informed cooling models.

Suggested API

Predict heat risk

POST /api/v1/predictions/heat-risk
{
  "restaurant_id": "rest_123",
  "food_category": "biryani",
  "distance_km": 7.2,
  "estimated_delivery_minutes": 36,
  "pickup_delay_minutes": 8,
  "packaging_type": "standard",
  "ambient_temperature_c": 31
}

Example response:

{
  "heat_risk": 0.82,
  "risk_level": "high",
  "expected_state": "lukewarm_or_cold",
  "recommended_action": "priority_pickup"
}

Submit a heat rating

POST /api/v1/ratings
{
  "order_id": "ord_123",
  "temperature_rating": "cold",
  "packaging_rating": 2
}

Development Roadmap

Phase 1 β€” Foundation

  • Repository created
  • Project structure
  • FastAPI service
  • Health endpoint
  • Order schema
  • Heat-risk API

Phase 2 β€” Prediction MVP

  • Synthetic order dataset
  • Baseline cooling model
  • Feature engineering
  • Baseline ML model
  • Evaluation pipeline
  • Explainable risk factors

Phase 3 β€” Product Layer

  • Customer heat rating
  • Restaurant dashboard
  • Refund rules engine
  • Rider delay detection
  • Event logging

Phase 4 β€” Real-World Validation

  • Collect real delivery data
  • Partner with restaurants
  • Compare predicted vs reported temperature
  • Measure refund reduction
  • Measure customer satisfaction

Metrics

Ember should optimize for measurable outcomes, not just model accuracy.

Model metrics

  • ROC-AUC / PR-AUC
  • Calibration error
  • Brier score
  • MAE for temperature prediction

Product metrics

  • Cold-order rate
  • Average delivery heat rating
  • False refund rate
  • Refund cost per order
  • Pickup-delay reduction
  • Customer complaint reduction

Research Direction

A strong research angle is disruption-aware food temperature prediction for last-mile delivery: combining delivery events, route characteristics, environmental conditions, packaging, and historical feedback to predict thermal quality at arrival.

This can eventually become both a research project and a deployable product.

Contributing

Ember is being developed incrementally. Start with the smallest useful component, add tests, and keep the prediction system explainable.

License

MIT Β© 2026 DHARAVATH SATVIK

About

Stop eating cold Swiggy/Zomato food. Ember predicts heat before you order, auto-files refunds for cold meals, nudges slow riders, and crowdsources restaurant heat ratings.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages