AI assistant that helps Tunisian families reduce food waste during Ramadan π β input your leftovers, get authentic recipes in Tunisian Darja, track your environmental impact. Built with FastAPI + Google Gemini + PWA.
# π B9atlek (Ψ¨ΩΨ§ΨͺΩΩ) β AI-Powered Ramadan Food Optimizer
> **"Ψ¨ΩΨ§ΨͺΩΩΨ"** β *"What do you have left?"* β A question asked every night in Tunisian kitchens, now the starting point of a smarter, greener Ramadan.
B9atlek is a Progressive Web App (PWA) that uses AI to help Tunisian families reduce food waste during Ramadan. You input what you cooked today and what leftovers you have β the AI responds in **Tunisian Darja** with authentic recipes, storage tips, and a real-time estimate of food and money saved.
---
## β¨ Key Features
- π€ **AI Recipe Suggestions** β Powered by Google Gemini 2.5 Flash, responding entirely in Tunisian dialect
- π€ **Voice Input** β Speak your leftovers in Arabic/Tunisian (ar-TN) via the Web Speech API
- π
**Ramadan Calendar** β Interactive 30-day Islamic calendar with decade info (Mercy / Forgiveness / Liberation), powered by the AlAdhan API
- π **Impact Dashboard** β Real-time stats: kg of food saved, COβ avoided, and Tunisian dinars recovered
- π± **PWA** β Installable on any phone like a native app, with partial offline support
- π¨ **Immersive Ramadan UI** β Shooting stars, lanterns, glassmorphism, gold/night palette, full RTL layout
---
## π Project Structure
```
AI-Powered-Ramadan-Food-Optimizer/
β
βββ backend/ # FastAPI server + Gemini AI integration
β βββ main.py # API routes (/, /optimize, /health)
β βββ ai.py # Google Gemini prompt engineering
β βββ requirements.txt # Python dependencies
β βββ .env.example # API key template
β βββ README.md # Backend setup guide
β
βββ frontend/ # Vanilla HTML/CSS/JS client
β βββ index.html # Main app page
β βββ style.css # Ramadan-themed design system
β βββ script.js # Voice input, calendar, stats logic
β βββ manifest.json # PWA configuration
β βββ sw.js # Service worker (offline caching)
β βββ icon-192.png # PWA icon (1 β¦