Carvo — ML-powered web app that predicts used car prices in Egypt using XGBoost, with user accounts and prediction history.
# 🚗 CARVO — Egyptian Car Price Predictor
Know your car's true value.
Instant, accurate price prediction for the Egyptian car market — powered by machine learning and trained on real local data.
---
## 📖 About
**Carvo** is a full-stack web application built with **Flask** that predicts the fair market price of used cars
in Egypt. It uses a trained **XGBoost** regression model to turn a few simple inputs — brand, model, year,
mileage, city, and more — into an instant, data-driven price estimate.
Beyond the prediction engine, Carvo ships with a complete user system: secure registration and login, a
personal prediction history, and a profile dashboard — so every estimate you make is saved and easy to revisit.
---
## 🖼️ Screenshots
Home page
Prediction result page
---
## ✨ Features
- 🔐 **Full user authentication** — register, log in, and update account details, with passwords securely hashed via `werkzeug`.
- 🤖 **Machine learning model (XGBoost)** for accurate car price predictions.
- 🏷️ **Dynamic brand/model selection** — car models update automatically based on the selected brand via an internal API.
- 🧠 **Smart feature engineering**, including:
- Car age (`car_age`)
- Average kilometers driven per year (`km_per_year`)
- Automatic flags for luxury, Chinese, and electric brands
- 📊 **Per-user prediction history**, stored in a SQLite database.
- 👤 **Profile dashboard** to view/edit account details and browse past predictions.
- 🌐 **JSON API endpoints** (`/api/predict`, `/api/models/ `) for AJAX-driven, asynchronous requests.
---
## 🛠️ Tech Stack
| Category | Technology |
|---|---|
| Backend | Python, Flask |
| Machine Learning | XGBoost, scikit-learn, pandas, NumPy |
| Database | SQLite3 |
| Security | Werkzeug (password hashing) |
| Frontend | HTML, CSS, JavaScript (Jinja2 templates) |
---
## 📂 Project Structure
```
car_price/
├── model/ # Trained XGBoost model + encoders
│ └── xgb_egypt_model.pkl
├── static/ …