from flask import Flask, render_template

app = Flask(__name__)

# Real data for Speyer's Farm Market
PRODUCTS = [
    {"id": 1, "name": "Fresh Heirloom Tomatoes", "price": "$4.99/lb", "category": "Vegetables", "image": "https://images.unsplash.com/photo-1592924357228-91a4daadcfea?auto=format&fit=crop&w=400&q=80"},
    {"id": 2, "name": "Organic Honey", "price": "$12.00", "category": "Pantry", "image": "https://images.unsplash.com/photo-1587049633562-ad3002f3856b?auto=format&fit=crop&w=400&q=80"},
    {"id": 3, "name": "Farm Fresh Eggs (Dozen)", "price": "$5.50", "category": "Dairy", "image": "https://images.unsplash.com/photo-1506976783imp-506976783?auto=format&fit=crop&w=400&q=80"},
    {"id": 4, "name": "Wildflower Honeycomb", "price": "$15.00", "category": "Pantry", "image": "https://images.unsplash.com/photo-1589927986089-35812388d1f4?auto=format&fit=crop&w=400&q=80"},
    {"id": 5, "name": "Seasonal Berry Basket", "price": "$18.00", "category": "Fruit", "image": "https://images.unsplash.com/photo-1464960350423-9e9e3e5743b4?auto=format&fit=crop&w=400&q=80"},
    {"id": 6, "name": "Artisan Sourdough Bread", "price": "$7.00", "category": "Bakery", "image": "https://images.unsplash.com/photo-1585478259715-876acc5be8eb?auto=format&fit=crop&w=400&q=80"},
]

@app.route('/')
def index():
    return render_template('index.html', products=PRODUCTS)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5050, debug=True)