# limuwani/d2d_group_project architecture

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

- Interactive diagram: https://gitdiagram.com/limuwani/d2d_group_project
- Repository: https://github.com/limuwani/d2d_group_project

## Overview

D2D is an Android order-tracking and fulfillment app with customer and staff portals. Customers discover restaurants, track orders, review order history, and submit service feedback; staff manage a queue, assign and fulfill orders, and review feedback. The README documents PHP API and PostgreSQL services, but the repository excerpt provides no application-source evidence for their wiring, so those integrations are shown only as documented external dependencies. Source-level call relationships could not be verified from the supplied excerpts.

Main entry points: [`app/src/main/java/com/example/d2d/HomeFragment.java`](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/HomeFragment.java) (Restaurant discovery), [`app/src/main/java/com/example/d2d/select_res.java`](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/select_res.java) (Restaurant selection), [`app/src/main/java/com/example/d2d/OrderStatusActivity.java`](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/OrderStatusActivity.java) (Order tracking), [`app/src/main/java/com/example/d2d/OrderHistoryActivity.java`](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/OrderHistoryActivity.java) (Order history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer portal"]
  node_discover["Restaurant discovery<br/>[HomeFragment.java]"]
  node_restaurants["Restaurant selection<br/>[select_res.java]"]
  node_order_tracking["Order tracking"]
  node_order_history["Order history"]
  node_customer_feedback["Service feedback"]
end

subgraph group_staff["Staff portal"]
  node_staff_queue["Fulfillment queue"]
  node_assignment["Order assignment"]
  node_takeaway["Takeaway confirmation"]
  node_staff_feedback["Feedback review"]
end

subgraph group_account["Account access"]
  node_signup["Registration<br/>[SignUp.java]"]
  node_login["Login<br/>[LoginActivity.java]"]
  node_recovery["Password recovery"]
end

subgraph group_services["Backend services"]
  node_php_api["PHP API"]
  node_postgres[("PostgreSQL")]
end

node_customer(("Customer"))
node_staff(("Staff member"))

node_customer -->|"browses"| node_discover
node_customer -->|"explores"| node_restaurants
node_customer -->|"tracks orders"| node_order_tracking
node_customer -->|"views history"| node_order_history
node_customer -->|"rates service"| node_customer_feedback
node_staff -->|"views queue"| node_staff_queue
node_staff -->|"assigns orders"| node_assignment
node_staff -->|"confirms collection"| node_takeaway
node_staff -->|"reviews feedback"| node_staff_feedback
node_customer -->|"registers"| node_signup
node_customer -->|"authenticates"| node_login
node_customer -->|"recovers access"| node_recovery
node_php_api -->|"uses database"| node_postgres

click node_discover "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/HomeFragment.java"
click node_restaurants "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/select_res.java"
click node_order_tracking "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/OrderStatusActivity.java"
click node_order_history "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/OrderHistoryActivity.java"
click node_customer_feedback "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/RateServiceActivity.java"
click node_staff_queue "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/StaffHomeFragment.java"
click node_assignment "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/StaffAssignFragment.java"
click node_takeaway "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/ConfirmTakeawayActivity.java"
click node_staff_feedback "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/StaffFeedbackActivity.java"
click node_signup "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/SignUp.java"
click node_login "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/LoginActivity.java"
click node_recovery "https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/RecoveryStep1Activity.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_discover,node_restaurants,node_order_tracking,node_order_history,node_customer_feedback toneBlue
class node_staff_queue,node_assignment,node_takeaway,node_staff_feedback toneAmber
class node_signup,node_login,node_recovery toneMint
class node_php_api,node_postgres toneRose
class node_customer,node_staff toneIndigo
```

## Components

### Customer portal

- [Restaurant discovery](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/HomeFragment.java): `app/src/main/java/com/example/d2d/HomeFragment.java`
- [Restaurant selection](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/select_res.java): `app/src/main/java/com/example/d2d/select_res.java`
- [Order tracking](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/OrderStatusActivity.java): `app/src/main/java/com/example/d2d/OrderStatusActivity.java`
- [Order history](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/OrderHistoryActivity.java): `app/src/main/java/com/example/d2d/OrderHistoryActivity.java`
- [Service feedback](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/RateServiceActivity.java): `app/src/main/java/com/example/d2d/RateServiceActivity.java`

### Staff portal

- [Fulfillment queue](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/StaffHomeFragment.java): `app/src/main/java/com/example/d2d/StaffHomeFragment.java`
- [Order assignment](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/StaffAssignFragment.java): `app/src/main/java/com/example/d2d/StaffAssignFragment.java`
- [Takeaway confirmation](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/ConfirmTakeawayActivity.java): `app/src/main/java/com/example/d2d/ConfirmTakeawayActivity.java`
- [Feedback review](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/StaffFeedbackActivity.java): `app/src/main/java/com/example/d2d/StaffFeedbackActivity.java`

### Account access

- [Registration](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/SignUp.java): `app/src/main/java/com/example/d2d/SignUp.java`
- [Login](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/LoginActivity.java): `app/src/main/java/com/example/d2d/LoginActivity.java`
- [Password recovery](https://github.com/limuwani/d2d_group_project/blob/main/app/src/main/java/com/example/d2d/RecoveryStep1Activity.java): `app/src/main/java/com/example/d2d/RecoveryStep1Activity.java`

### Backend services

- **PHP API**
- **PostgreSQL**

### Other components

- **Customer**
- **Staff member**

## Connections

- Customer → Restaurant discovery: browses (evidence: `README.md`)
- Customer → Restaurant selection: explores (evidence: `README.md`)
- Customer → Order tracking: tracks orders (evidence: `README.md`)
- Customer → Order history: views history (evidence: `README.md`)
- Customer → Service feedback: rates service (evidence: `README.md`)
- Staff member → Fulfillment queue: views queue (evidence: `README.md`)
- Staff member → Order assignment: assigns orders (evidence: `README.md`)
- Staff member → Takeaway confirmation: confirms collection (evidence: `README.md`)
- Staff member → Feedback review: reviews feedback (evidence: `README.md`)
- Customer → Registration: registers (evidence: `README.md`)
- Customer → Login: authenticates (evidence: `README.md`)
- Customer → Password recovery: recovers access (evidence: `README.md`)
- PHP API → PostgreSQL: uses database (evidence: `README.md`)
