How henristr/smartfridgepwa works
SmartFridge/KitchAI is a Flask-based fridge and recipe application. The visible workflow is browser requests handled by the Flask app, which uses stored user and product data and can request AI-generated recipes from configured providers; the app also renders its web interface. The app contains authentication, inventory, recipe, and admin behavior, but excerpts do not expose every route or its full call structure. Storage supports SQL and JSON fallback. The README only links to an Android app and documentation, so those capabilities are not mapped here.
Main entry points: app.py Flask application · storage.py Storage abstraction · settings.py Runtime configuration · index.html Web interface
Components 14
Web interface
- Flask application
app.py - Web interface
templates/index.html
Application
- Users, inventory, recipes
app.py - AI recipe generation
app.py - Admin settings
app.py
Persistence
- Storage abstraction
storage.py - JSON fallback
storage.py - SQL data models
models.py - SQL database
Configuration and AI
- Runtime configuration
settings.py - Gemini API
- OpenAI API
- Ollama endpoint
Other components
- Browser user
Connections 14
- Browser user → Flask application: sends requests
- Flask application → Users, inventory, recipes: routes requests
app.py - Flask application → AI recipe generation: generates recipes
app.py - Flask application → Admin settings: handles settings
app.py - Flask application → Web interface: renders page
app.py - Flask application → Storage abstraction: loads and saves
app.py - Flask application → Runtime configuration: reads configuration
app.py - AI recipe generation → Gemini API: requests generation
app.py - AI recipe generation → OpenAI API: requests generation
app.py - AI recipe generation → Ollama endpoint: posts prompt
app.py - Storage abstraction → SQL data models: uses models
storage.py - Storage abstraction → SQL database: reads and writes
storage.py - Storage abstraction → JSON fallback: falls back to
storage.py - Storage abstraction → Runtime configuration: reads configuration
storage.py