How rajendermohan/ordereats_app works
Project Type & Purpose
• This project consists of two native Android applications:
– OrderEats: Customer-facing mobile app for browsing a menu, adding to cart, checking out, viewing order history, etc.
– Admin OrderEats: Admin panel mobile app for staff to log in, add items, see pending/out-for-delivery orders, manage users, etc.
File Structure & Architectural Patterns
• Top-level modules:
– OrderEats/ ← customer app
– Admin OrderEats/← admin app
• Each contains:
– app/src/main/java/... Activities, Fragments, Adapters
– app/src/main/res/... layouts, drawables, anim, navigation
– navigation.xml defines the in-app navigation graph (Android Jetpack Navigation).
• Common patterns:
– UI Layer: Activities + Fragments
– Presentation Layer: Adapters for RecyclerViews
– Navigation Layer: navigation.xml
– Resource Layer: layouts + drawables + animations
• No on-premises backend code is present; assume both apps connect to remote services (e.g., Firebase Auth/Firestore or a REST API).
README for Insights
• The README enumerates all Activities, Fragments, Adapters, resources.
• No explicit backend; but login/signup/chooseLocation/payOut indicate network and persistence.
Main Components
a. Mobile Clients
– OrderEats App
– Admin OrderEats App
b. UI & Presentation Modules
– Activities (e.g., MainActivity, SplashScreenActivity, LoginActivity...)
– Fragments (HomeFragment, CartFragment, etc.)
– Adapters (CartAdapter, PopulerAdapter, etc.)
– Navigation Graph (navigation.xml)
c. Networking & Data Layer (common/shared)
– Authentication Service (e.g., Firebase Auth)
– API Gateway / REST Endpoints (e.g., GET menu, POST order)
– Database Service (e.g., Firestore, Realtime DB or SQL backend)
d. External Services
– Payment Processor API (for PayOutActivity)
– Geolocation / Maps API (for ChooseLocationActivity)
e. Shared Resources
– Remote Storage (for item images, banners)
Relationships & Interactions
• OrderEats App:
– UI Layer ↔ Navigation Graph ↔ Activities/Fragments
– Activities/Fragments use Adapters to bind data into RecyclerViews
– Presentation Layer calls Repository/Network Layer
– Network Layer ↔ Auth Service / REST API ↔ Database
– Payment requests go to Payment Processor
– Location data via Maps API
• Admin OrderEats App:
– Similar UI & Navigation
– Calls Admin-specific REST endpoints to add items, fetch pending orders, dispatch orders
– Writes to Database / Storage
Architectural Patterns & Principles
• Layered Architecture:
– Presentation Layer (UI)
– Domain Layer (ViewModels/Use Cases—not explicit, but can be inferred)
– Data Layer (Networking, Repositories)
• Separation of Concerns:
– Activities/Fragments contain only UI logic
– Adapters handle only view binding
– Navigation graph defines screen flows
• Externalize configuration (navigation.xml, proguard-rules.pro)