How salahmalih/easyrecipe-mvp works
Project Type and Purpose
• From the README and file tree, EasyRecipe is a full-stack web application.
• Frontend: React (Create-React-App) + Material-UI
• Backend: Flask (app.py, SQLAlchemy models & schemas)
• Database: MySQL (plus a Redis dump.rdb suggests optional caching or session store)
• Purpose: let users browse, create, update, delete, search recipes; manage profiles and favorites.
File Structure
• Top-level separation:
• backend/ – Flask application and ORM (models/, schemas/, static/images/)
• public/ – React’s public assets (index.html, manifest.json, robots.txt)
• src/ – React application source (components/, pages/, scenes/, theme.js, index.js)
• Backend follows an MVC/API-driven pattern:
• models/ define DB tables (users, recipe, ingredients, etc.)
• schemas/ define request/response DTOs
• app.py and database.py wire together Flask, SQLAlchemy, and route definitions
• Frontend organizes by feature:
• components/ (reusable UI pieces: header, footer, navbar, pagination, etc.)
• page/ (route-level pages: Home, Login, Recipes, Dashboard, Admin, Favourite, NoPage, etc.)
• scenes/global for layout (Sidebar, Topbar) + theme.js for styling
Key Insights from the README
• The system uses a REST API (Flask) at port 5000.
• React client runs on port 3000 and calls the API to fetch/store data.
• MySQL is the persistent store; Redis (dump.rdb) likely handles caching or session data.
• Static media (images for recipes) are kept under backend/static/images.