This project is part of the Zenday platform.
It allows users to receive alerts when their favorite Kroger grocery items drop in price.
Built with Python, Flask, SQLAlchemy, and APScheduler.
- Map Kroger product data to Zenday internal structure.
- Check for significant price changes based on user preferences.
- Store and retrieve alert results.
- Background scheduler for periodic batch checks.
- Clean REST API endpoints.
├── PROJECT_STRUCTURE.txt
├── Program Flow.pdf
├── README.md
├── app.py
├── db
│ └── models.py
├── map_kroger_data
│ ├── mapper.py
│ ├── response-example.json
│ ├── test_mapper.py
│ └── zenday-internal-structure.json
├── requirements.txt
├── scripts
│ ├── fetch_kroger_data.py
│ ├── generate_project_structure.py
-
Clone the repository:
bash git clone https://github.com/<your-username>/kroger-price-alert.git cd kroger-price-alert -
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install the dependencies:
pip install -r requirements.txt
-
Initialize the database (optional for fresh install):
python3 scripts/insert_products.py -
Start the Flask app:
python3 app.py
-
POST /trigger-alert
-
Trigger a price check manually for a product.
-
Request: JSON with product data
-
Response: Triggered or not.
-
-
GET /get-alerts
-
Retrieve past price alert results.
-
Optional: ?user_id=xxx to filter alerts by user.
-
Run test scripts manually:
python3 scripts/read_alerts.py
python3 map_kroger_data/test_mapper.py
python3 trigger_alert_logic/test_alert_checker.py
-
Flask
-
Flask-SQLAlchemy
-
APScheduler
-
SQLite