How hassan-farid/urecipy works
Main Components
a) Frontend Layer:
• Templates directory with two HTML files (home.html and recipe.html)
b) Application Layer:
• Center the main Flask application (app.py) as the core controller
• Utility modules (utils.py and db_ops.py) as supporting components
c) Storage Layer:
• SQLite database (data.db)
• Audio storage directory (audios/)
d) External Services:
• gTTS (Google Text-to-Speech) API integration
Component Relationships
• User → Frontend (HTTP requests)
• Frontend → Application Layer (Flask routes)
• Application Layer → Database Layer (CRUD operations)
• Application Layer → Audio Storage (File I/O)
• Application Layer → gTTS API (Text-to-speech conversion)
Specific Design Elements
Use these visual elements:
• Blue rectangles for frontend components
• Green rectangles for application layer components
• Purple rectangle for audio storage
• Orange rectangle for external gTTS API
[User/Browser]
• ↓
[Frontend Layer (Templates)]
• ↓
[Application Layer]
• ↙ ↓ ↘
[DB] [Audio] [gTTS API]
Important Details
a) Data Flow Annotations:
• HTTP/HTTPS requests between layers
• File I/O operations for audio handling
• Database queries
• API calls to gTTS
b) Key Components:
• Flask application server
• Template rendering engine
• Database operations module
• Audio processing utilities
• Text-to-speech conversion service
Technical Specifications
• Technology stack: Flask, SQLite, gTTS
• File formats: HTML, MP4 (for audio)
• Database schema reference
• API endpoints