How rahul8639/ezyeats works
Project type and purpose
• EzyEats is a native Android application (no separate backend code in this repo).
• Purpose: allow users to register/login, select university, browse restaurants & menus, build a cart, place orders, view order success, manage wallets, and (for admins) view a dashboard.
File structure
• Top‐level “app” module with a standard Android Gradle layout:
• src/main/java/com/example/ezyeatsapplication/ → Activities (SplashActivity, LoginActivity, RegistrationActivity, SelectUniversity, PlaceYourOrderActivity, OrderSucceessActivity, RestaurantMenuActivity, AdminPannel, DashBoard) and Fragments (HomeFragment, MenuFragment, CartFragment, WalletFragment)
• adapters/ → RecyclerView adapters (RestaurantListAdapter, MenuListAdapter, PlaceYourOrderAdapter)
• model/ → POJOs (RestaurantModel, Menu, Hours) and business objects (CartItem)
• NetworkUtil.java → single entry point for all HTTP / REST / Firebase calls
• src/main/res/raw/restaurent.json → local data source for restaurants
• google-services.json → Firebase integration
• Resource directories (layouts, drawables, fonts, values) define the UI templates and styles.
Key insights from README
• No hidden microservices; “just pull the code and build apk.”
• Implicit Firebase dependency (google-services.json) and local JSON data.
a. Components
• Presentation Layer (UI) – Activities & Fragments
• Adapter Layer – Adapters translating models ↔ RecyclerViews
• Data Layer – Models and Cart logic
• Network Layer – NetworkUtil wrapping Firebase/REST calls
• Data Stores – Local JSON (raw), Firebase Auth & Database
• External Services – Firebase (Auth, Realtime/Firestore)
b. Relationships & Interactions
• User taps UI (Activity or Fragment) → calls Adapter or direct method
• UI/Fragment invokes NetworkUtil for remote calls OR reads local JSON
• NetworkUtil ↔ Firebase (Auth, DB) or hits REST endpoints
• Data (models) flows back up to Adapters → UI updates
• Cart operations held in memory (CartItem) and optionally persisted (SharedPrefs or Firebase)
c. Architectural patterns & principles
• A simple MVC/MVP–style: Activities/Fragments (Controller/View) talk directly to NetworkUtil (Model)
• Separation of concerns: UI, data adapters, data models, network
d. Technologies & frameworks
• Android SDK (Activities, Fragments, RecyclerView)
• Firebase (authentication, database)
• JSON parsing (Gson or built-in)
• Gradle (build.gradle.kts)