You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📱 TuniTech Advisor — Smart Phone Recommendation System
An AI-powered smartphone recommendation system for the Tunisian market
🎯 Project Overview
TuniTech Advisor aggregates smartphone data from 5 Tunisian e-commerce platforms, applies a machine-learning pipeline for price prediction, and exposes a full-stack web app so users can search, compare, and get personalised phone recommendations — all with persistent community features (reviews, trending, price history).
🌟 Key Features
Feature
Description
Multi-source Scraping
1 236 phones from Tunisianet, Mytek, SpaceNet, BestPhone, BestBuyTunisie
CI/CD: every git push to main → GitHub Actions runs tests → deploys backend (Render) + frontend (Vercel) automatically
Data persistence: all users, reviews, trending events and price history live in MongoDB Atlas — never lost on redeploy
🔧 Technology Stack
Backend
Tech
Purpose
Python 3.11
Core language
FastAPI + Uvicorn
REST API, OpenAPI docs at /docs
Scikit-learn
KNN price prediction, preprocessing pipeline
MLflow
Experiment tracking & model registry
pymongo
MongoDB Atlas driver
python-jose + passlib
JWT auth, bcrypt password hashing
APScheduler
Weekly scraper scheduler
Pandas / NumPy
Data processing
Frontend
Tech
Purpose
React 18 + TypeScript
UI library
Vite
Build tool & dev server
Tailwind CSS
Utility-first styling
Recharts
Data visualisation
Axios
HTTP client
Infrastructure
Tech
Purpose
Docker
Backend containerisation
Render
Backend cloud hosting (free tier)
Vercel
Frontend cloud hosting (free tier)
MongoDB Atlas
Cloud database (free M0 tier, never resets)
GitHub Actions
CI/CD pipeline
Nginx
Frontend static file serving
📊 ML Model
Model
MAE (TND)
R²
Training Time
KNN n=10
4.42
0.9998
0.004 s
KNN n=5
7.97
0.9988
0.006 s
XGBoost
12.3
0.9971
2.1 s
Features used: ram, storage, battery, screen_size, main_camera, front_camera, brand (encoded)
📊 Dataset
Column
Description
name
Product name
brand
Manufacturer
ram / storage
GB
battery
mAh
screen_size
inches
main_camera / front_camera
MP
network
4G / 5G
price
TND
store
Source store
1 236 phones across 5 stores · 85–97 % spec coverage after enrichment
🗄️ Database Collections (MongoDB Atlas)
Collection
Content
users
Registered user profiles + bcrypt hashed passwords
reviews
Phone ratings and comments per user
trending
View / search event counts + weighted score
price_history
90-day rolling price snapshots per phone per store
scheduler_status
Last/next run time, per-store results, logs
🛠️ Local Development
Prerequisites
Python 3.11+, Node.js 20+, Docker Desktop
Quick start with Docker Compose
git clone https://github.com/iheblam/TuniTech-Advisor.git
cd TuniTech-Advisor
# copy and edit env vars
cp .env.example .env # set MONGODB_URI, GROQ_API_KEY, etc.
docker compose up --build