# akilesh-ga/foodd architecture

> Architecture diagram of the GitHub repository akilesh-ga/foodd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/akilesh-ga/foodd
- Repository: https://github.com/akilesh-ga/foodd

## Overview

#### 1. Purpose and Runtime
FoodD is a native Android food-discovery/delivery app. The concrete implementation is a single Android application module, predominantly Java, built with Gradle and configured for Google services. Android activities render Material-style XML layouts and coordinate user navigation.

Key paths: `app/build.gradle.kts`, `app/src/main/AndroidManifest.xml`, `app/google-services.json`.

#### 2. Application Entry and Navigation
The manifest is the authoritative Android entry-point and declares activities, permissions, and receiver integration. `SplashActivity` is the likely launch/onboarding gate, leading into login/signup or the main food-browsing experience. `MainMenuActivity` and `HomeActivity` form the primary authenticated navigation surfaces; layouts include a navigation drawer rather than fragments.

Key paths: `app/src/main/AndroidManifest.xml`, `app/src/main/java/com/example/foodd/activities/SplashActivity.java`, `app/src/main/java/com/example/foodd/activities/MainMenuActivity.java`.

#### 3. Identity and User Lifecycle
Authentication and account lifecycle are UI-driven through dedicated login and registration screens. User profile viewing/editing is isolated into separate activities, backed by a `UserEntity` model. Firebase is configured as an external platform via Google Services; the README describes Firebase Auth and user persistence, though no Firebase-specific source wrapper is present in the tree.

Key paths: `app/src/main/java/com/example/foodd/activities/LoginActivity.java`, `app/src/main/java/com/example/foodd/activities/SignupActivity.java`, `app/src/main/java/com/example/foodd/activities/EditProfileActivity.java`.

#### 4. Restaurant and Menu Presentation
The home experience displays restaurant and food collections using RecyclerView adapter boundaries. Domain-shaped entity classes represent restaurant and food data, while adapters bind those entities to item layouts. This separates screen orchestration from row rendering but does not show a repository/ViewModel layer in the checked-in tree.

Key paths: `app/src/main/java/com/example/foodd/activities/HomeActivity.java`, `app/src/main/java/com/example/foodd/adapters/RestaurantAdapter.java`, `app/src/main/java/com/example/foodd/adapters/FoodAdapter.java`.

#### 5. Remote API Boundary
Retrofit is the explicit HTTP integration boundary. `RetrofitClient` centralizes client construction; separate food and restaurant interfaces/entities model remote operations and payloads. UI components should consume API results through this package rather than directly owning HTTP concerns.

Key paths: `app/src/main/java/com/example/foodd/api/RetrofitClient.java`, `app/src/main/java/com/example/foodd/api/RestaurantAPI.java`, `app/src/main/java/com/example/foodd/api/FoodAPI.java`.

#### 6. Models and Data Flow
Primary flow is: activity initiates navigation or data request → Retrofit API interface retrieves food/restaurant payloads → API entities/domain entities carry data → adapters render item rows. User profile screens operate on `UserEntity`. The tree contains no concrete cart, order, payment, Room, repository, ViewModel, or Firebase database implementation, despite README claims; treat those as planned/documented rather than verified architecture.

Key paths: `app/src/main/java/com/example/foodd/models/FoodEntity.java`, `app/src/main/java/com/example/foodd/models/RestaurantEntity.java`, `app/src/main/java/com/example/foodd/models/UserEntity.java`.

#### 7. Device Services: Maps, Notifications, Broadcasts
Location/map interaction, notifications, and device broadcast handling are separate Android integration edges. `MapsActivity` hosts map behavior; notification classes encapsulate post-notification behavior; `AirplaneModeReceiver` responds to system airplane-mode broadcasts, with a companion activity/layout for demonstrating receiver state. These flows cross Android platform boundaries and need manifest/permission alignment.

Key paths: `app/src/main/java/com/example/foodd/activities/MapsActivity.java`, `app/src/main/java/com/example/foodd/broadcast_receiver/AirplaneModeReceiver.java`, `app/src/main/java/com/example/foodd/notification/AfterNotification.java`.

Main entry points: [`app/src/main/java/com/example/foodd/activities/MainMenuActivity.java`](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/MainMenuActivity.java) (Main Menu), [`app/src/main/java/com/example/foodd/activities/HomeActivity.java`](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/HomeActivity.java) (Home Activity), [`app/src/main/AndroidManifest.xml`](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/AndroidManifest.xml) (Android Manifest), [`app/src/main/java/com/example/foodd/activities/SplashActivity.java`](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/SplashActivity.java) (Splash Activity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_android["Android App"]
  node_gradle["Gradle &amp; Google Services<br/>build configuration<br/>[build.gradle.kts]"]
  node_manifest["Android Manifest<br/>app entry configuration"]
  node_firebase_config["Firebase Configuration<br/>external service config"]
end

subgraph group_ui["UI &amp; Navigation"]
  node_splash["Splash Activity<br/>launch activity"]
  node_auth["Login &amp; Signup<br/>authentication screens<br/>[LoginActivity.java]"]
  node_main_menu["Main Menu<br/>authenticated navigation"]
  node_home["Home Activity<br/>restaurant browsing screen<br/>[HomeActivity.java]"]
  node_profile["Edit Profile<br/>profile screen"]
  node_adapters["Food &amp; Restaurant Adapters<br/>RecyclerView adapters"]
end

subgraph group_data["Remote Data"]
  node_retrofit{{"Retrofit Client<br/>HTTP client boundary"}}
  node_restaurant_api{{"Restaurant API<br/>Retrofit interface<br/>[RestaurantAPI.java]"}}
  node_food_api{{"Food API<br/>Retrofit interface<br/>[FoodAPI.java]"}}
  node_catalog_models["Food &amp; Restaurant Entities<br/>catalog models<br/>[FoodEntity.java]"]
  node_user_model["User Entity<br/>user model<br/>[UserEntity.java]"]
end

subgraph group_platform["Platform Integrations"]
  node_firebase[("Firebase Auth &amp; User Persistence<br/>external platform")]
  node_maps["Maps Activity<br/>map integration<br/>[MapsActivity.java]"]
  node_notifications["Notification Handler<br/>notification integration"]
  node_receiver["Airplane Mode Receiver<br/>broadcast receiver"]
  node_android_os(("Android System Services<br/>device platform"))
end

node_gradle -->|"builds"| node_manifest
node_gradle -->|"uses"| node_firebase_config
node_firebase_config -->|"configures"| node_firebase
node_manifest -->|"launches"| node_splash
node_manifest -->|"registers"| node_receiver
node_splash -->|"unauthenticated flow"| node_auth
node_splash -->|"authenticated flow"| node_main_menu
node_auth -->|"authenticates with"| node_firebase
node_auth -->|"enters app"| node_main_menu
node_main_menu -->|"opens"| node_home
node_main_menu -->|"opens"| node_profile
node_main_menu -->|"opens"| node_maps
node_home -->|"requests restaurants"| node_restaurant_api
node_home -->|"requests food"| node_food_api
node_restaurant_api -->|"uses"| node_retrofit
node_food_api -->|"uses"| node_retrofit
node_restaurant_api -->|"returns"| node_catalog_models
node_food_api -->|"returns"| node_catalog_models
node_home -->|"renders with"| node_adapters
node_adapters -->|"binds"| node_catalog_models
node_profile -->|"edits"| node_user_model
node_profile -.->|"persists user data"| node_firebase
node_maps -->|"uses map services"| node_android_os
node_notifications -->|"posts through"| node_android_os
node_receiver -->|"receives broadcasts from"| node_android_os

click node_gradle "https://github.com/akilesh-ga/foodd/blob/main/app/build.gradle.kts"
click node_manifest "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/AndroidManifest.xml"
click node_firebase_config "https://github.com/akilesh-ga/foodd/blob/main/app/google-services.json"
click node_splash "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/SplashActivity.java"
click node_auth "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/LoginActivity.java"
click node_main_menu "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/MainMenuActivity.java"
click node_home "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/HomeActivity.java"
click node_profile "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/EditProfileActivity.java"
click node_adapters "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/adapters/RestaurantAdapter.java"
click node_retrofit "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/api/RetrofitClient.java"
click node_restaurant_api "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/api/RestaurantAPI.java"
click node_food_api "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/api/FoodAPI.java"
click node_catalog_models "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/models/FoodEntity.java"
click node_user_model "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/models/UserEntity.java"
click node_maps "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/MapsActivity.java"
click node_notifications "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/notification/AfterNotification.java"
click node_receiver "https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/broadcast_receiver/AirplaneModeReceiver.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gradle,node_manifest,node_firebase_config toneBlue
class node_splash,node_auth,node_main_menu,node_home,node_profile,node_adapters toneAmber
class node_retrofit,node_restaurant_api,node_food_api,node_catalog_models,node_user_model toneMint
class node_firebase,node_maps,node_notifications,node_receiver,node_android_os toneRose
```

## Components

### Android App

- [Gradle & Google Services](https://github.com/akilesh-ga/foodd/blob/main/app/build.gradle.kts): build configuration · Builds the app and configures Google services. · `app/build.gradle.kts`
- [Android Manifest](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/AndroidManifest.xml): app entry configuration · Declares activities, permissions, and receiver integration. · `app/src/main/AndroidManifest.xml`
- [Firebase Configuration](https://github.com/akilesh-ga/foodd/blob/main/app/google-services.json): external service config · `app/google-services.json`

### UI & Navigation

- [Splash Activity](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/SplashActivity.java): launch activity · Launch and onboarding gate. · `app/src/main/java/com/example/foodd/activities/SplashActivity.java`
- [Login & Signup](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/LoginActivity.java): authentication screens · `app/src/main/java/com/example/foodd/activities/LoginActivity.java`
- [Main Menu](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/MainMenuActivity.java): authenticated navigation · Primary navigation surface with drawer-based navigation. · `app/src/main/java/com/example/foodd/activities/MainMenuActivity.java`
- [Home Activity](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/HomeActivity.java): restaurant browsing screen · `app/src/main/java/com/example/foodd/activities/HomeActivity.java`
- [Edit Profile](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/EditProfileActivity.java): profile screen · `app/src/main/java/com/example/foodd/activities/EditProfileActivity.java`
- [Food & Restaurant Adapters](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/adapters/RestaurantAdapter.java): RecyclerView adapters · Bind collection entities into item rows. · `app/src/main/java/com/example/foodd/adapters/RestaurantAdapter.java`

### Remote Data

- [Retrofit Client](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/api/RetrofitClient.java): HTTP client boundary · Centralizes remote client construction. · `app/src/main/java/com/example/foodd/api/RetrofitClient.java`
- [Restaurant API](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/api/RestaurantAPI.java): Retrofit interface · `app/src/main/java/com/example/foodd/api/RestaurantAPI.java`
- [Food API](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/api/FoodAPI.java): Retrofit interface · `app/src/main/java/com/example/foodd/api/FoodAPI.java`
- [Food & Restaurant Entities](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/models/FoodEntity.java): catalog models · Carry restaurant and food payload data. · `app/src/main/java/com/example/foodd/models/FoodEntity.java`
- [User Entity](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/models/UserEntity.java): user model · `app/src/main/java/com/example/foodd/models/UserEntity.java`

### Platform Integrations

- **Firebase Auth & User Persistence**: external platform · Documented identity and user persistence backend.
- [Maps Activity](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/activities/MapsActivity.java): map integration · `app/src/main/java/com/example/foodd/activities/MapsActivity.java`
- [Notification Handler](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/notification/AfterNotification.java): notification integration · `app/src/main/java/com/example/foodd/notification/AfterNotification.java`
- [Airplane Mode Receiver](https://github.com/akilesh-ga/foodd/blob/main/app/src/main/java/com/example/foodd/broadcast_receiver/AirplaneModeReceiver.java): broadcast receiver · Handles Android airplane-mode broadcasts. · `app/src/main/java/com/example/foodd/broadcast_receiver/AirplaneModeReceiver.java`
- **Android System Services**: device platform · Supplies broadcasts, maps, permissions, and notification services.

## Connections

- Gradle & Google Services → Android Manifest: builds
- Gradle & Google Services → Firebase Configuration: uses
- Firebase Configuration → Firebase Auth & User Persistence: configures
- Android Manifest → Splash Activity: launches
- Android Manifest → Airplane Mode Receiver: registers
- Splash Activity → Login & Signup: unauthenticated flow
- Splash Activity → Main Menu: authenticated flow
- Login & Signup → Firebase Auth & User Persistence: authenticates with
- Login & Signup → Main Menu: enters app
- Main Menu → Home Activity: opens
- Main Menu → Edit Profile: opens
- Main Menu → Maps Activity: opens
- Home Activity → Restaurant API: requests restaurants
- Home Activity → Food API: requests food
- Restaurant API → Retrofit Client: uses
- Food API → Retrofit Client: uses
- Restaurant API → Food & Restaurant Entities: returns
- Food API → Food & Restaurant Entities: returns
- Home Activity → Food & Restaurant Adapters: renders with
- Food & Restaurant Adapters → Food & Restaurant Entities: binds
- Edit Profile → User Entity: edits
- Edit Profile → Firebase Auth & User Persistence: persists user data
- Maps Activity → Android System Services: uses map services
- Notification Handler → Android System Services: posts through
- Airplane Mode Receiver → Android System Services: receives broadcasts from
