How dishantzaveri/ecoeats works
Project Type and Purpose
• EcoEats is a multi-platform food-delivery application whose goal is to optimize delivery routes for environmental sustainability.
• It consists of two user‐facing front ends (a Flutter mobile app and a React web app) and a cloud‐hosted backend that handles authentication, order management, route optimization (via HERE Routing APIs), data storage, and analytics.
File Structure
• Top level:
• app/ → Flutter project (Android & iOS targets)
• web/ → React single-page application (deployed via Firebase Hosting)
• README.md → high-level description
• app/lib/: Flutter UI screens (features/) + business logic (logic/repos, stores) + Firebase config (firebase_options.dart)
• web/src/: React components, pages, Redux store slices; Firebase config (web/src/firebase.js)
• Presence of google-services.json, Podfile, .firebaserc, firebase.json indicates Firebase Auth/Firestore/Hosting as part of the backend.
README for Additional Insights
• Mentions React (web), Flutter (mobile), Node.js backend, AWS hosting & database, HERE APIs.
Main Components & Their Relationships
a. Clients
• Mobile: Flutter app (modules: Auth, Onboarding, Map & Routing, Orders, Profile, Settings).
• Web: React SPA (components: Header/Footer/Layout, Pages for Home, FoodList, Cart, Checkout, Login/Register, Location).
b. Backend Services
• Firebase Auth → user authentication & profile management
• Firebase Firestore → orders, users, restaurants, riders, analytics data
• (Optional Node.js layer on AWS or Cloud Functions) → business-logic microservices, payment processing, subscription tiers
• HERE Routing API → external service called from backend (or directly from client logic/repos) for route optimization
c. Database & Storage
• Firestore (NoSQL) or AWS RDS/DynamoDB (depending on final choice)
• Firebase Storage or AWS S3 for images, assets
d. Hosting & Deployment
• Firebase Hosting for React web
• Google Play & AppStore for Flutter mobile
• AWS (EC2, Lambda, API Gateway) or Firebase Cloud Functions for backend compute
e. Analytics & Monitoring
• Firebase Analytics or AWS CloudWatch
• Custom dashboard in web or separate BI tool
Architectural Patterns & Design Principles
• Client-Server (thin clients, backend APIs)
• MVVM/Provider or BLoC in Flutter (stores + repos pattern)
• Component-based + Redux in React
• Repository pattern isolates data sources (HERE API vs local DB vs cloud DB)
• Separation of concerns: Authentication, Routing, Order Management, User Profile, Analytics