# hanbankz/zipbite architecture

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

- Interactive diagram: https://gitdiagram.com/hanbankz/zipbite
- Repository: https://github.com/hanbankz/zipbite

## Overview

Zipbite is a customer-facing Flutter food-delivery app. The documented journey is authentication, restaurant and menu discovery, cart and Stripe checkout, then order confirmation and real-time tracking; order history and account settings are adjacent capabilities. The app uses Supabase for authentication and backend data, with Postgres, RLS and Realtime documented, and includes a payment-intent edge function. Dart implementations were not sampled, so feature-to-service links below rely on README statements; the payment-screen-to-function connection is shown as unverified.

Main entry points: [`lib/screens/home_screen.dart`](https://github.com/hanbankz/zipbite/blob/main/lib/screens/home_screen.dart) (Restaurant discovery), [`lib/screens/payment_screen.dart`](https://github.com/hanbankz/zipbite/blob/main/lib/screens/payment_screen.dart) (Payment), [`lib/screens/cart_screen.dart`](https://github.com/hanbankz/zipbite/blob/main/lib/screens/cart_screen.dart) (Cart), [`lib/screens/order_success_screen.dart`](https://github.com/hanbankz/zipbite/blob/main/lib/screens/order_success_screen.dart) (Order confirmation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer app"]
  node_discovery["Restaurant discovery<br/>[home_screen.dart]"]
  node_search["Search<br/>[search_screen.dart]"]
  node_food_detail["Menu details"]
end

subgraph group_orders["Ordering"]
  node_cart["Cart<br/>[cart_screen.dart]"]
  node_payment["Payment"]
  node_confirmation["Order confirmation"]
  node_tracking["Order tracking"]
  node_history["Order history"]
end

subgraph group_services["Backend services"]
  node_payment_function["Payment intent<br/>[index.ts]"]
  node_stripe["Stripe"]
  node_supabase[("Supabase backend")]
end

subgraph group_account["Account"]
  node_auth["Authentication<br/>[auth_screen.dart]"]
  node_signup["Sign up<br/>[signup_screen.dart]"]
  node_settings["Account settings"]
end

node_customer(("Customer"))

node_customer -->|"signs in"| node_auth
node_customer -->|"creates account"| node_signup
node_customer -->|"browses restaurants"| node_discovery
node_customer -.->|"finds food"| node_search
node_discovery -->|"views menus"| node_food_detail
node_customer -->|"builds cart"| node_cart
node_cart -->|"checks out"| node_payment
node_payment -.->|"requests intent"| node_payment_function
node_payment_function -.->|"creates intent"| node_stripe
node_payment -->|"confirms order"| node_confirmation
node_confirmation -->|"tracks order"| node_tracking
node_customer -.->|"reviews orders"| node_history
node_auth -->|"uses auth"| node_supabase
node_discovery -.->|"loads data"| node_supabase
node_tracking -->|"receives realtime updates"| node_supabase
node_history -.->|"reads orders"| node_supabase
node_customer -.->|"manages account"| node_settings

click node_auth "https://github.com/hanbankz/zipbite/blob/main/lib/screens/auth_screen.dart"
click node_signup "https://github.com/hanbankz/zipbite/blob/main/lib/screens/signup_screen.dart"
click node_discovery "https://github.com/hanbankz/zipbite/blob/main/lib/screens/home_screen.dart"
click node_search "https://github.com/hanbankz/zipbite/blob/main/lib/screens/search_screen.dart"
click node_food_detail "https://github.com/hanbankz/zipbite/blob/main/lib/screens/food_detail_screen.dart"
click node_cart "https://github.com/hanbankz/zipbite/blob/main/lib/screens/cart_screen.dart"
click node_payment "https://github.com/hanbankz/zipbite/blob/main/lib/screens/payment_screen.dart"
click node_payment_function "https://github.com/hanbankz/zipbite/blob/main/supabase/functions/create-payment-intent/index.ts"
click node_confirmation "https://github.com/hanbankz/zipbite/blob/main/lib/screens/order_success_screen.dart"
click node_tracking "https://github.com/hanbankz/zipbite/blob/main/lib/screens/order_tracking_screen.dart"
click node_history "https://github.com/hanbankz/zipbite/blob/main/lib/screens/history_screen.dart"
click node_settings "https://github.com/hanbankz/zipbite/blob/main/lib/screens/settings_screen.dart"

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_discovery,node_search,node_food_detail toneBlue
class node_cart,node_payment,node_confirmation,node_tracking,node_history toneAmber
class node_payment_function,node_stripe,node_supabase toneMint
class node_auth,node_signup,node_settings toneRose
class node_customer toneIndigo
```

## Components

### Customer app

- [Restaurant discovery](https://github.com/hanbankz/zipbite/blob/main/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`
- [Search](https://github.com/hanbankz/zipbite/blob/main/lib/screens/search_screen.dart): `lib/screens/search_screen.dart`
- [Menu details](https://github.com/hanbankz/zipbite/blob/main/lib/screens/food_detail_screen.dart): `lib/screens/food_detail_screen.dart`

### Ordering

- [Cart](https://github.com/hanbankz/zipbite/blob/main/lib/screens/cart_screen.dart): `lib/screens/cart_screen.dart`
- [Payment](https://github.com/hanbankz/zipbite/blob/main/lib/screens/payment_screen.dart): `lib/screens/payment_screen.dart`
- [Order confirmation](https://github.com/hanbankz/zipbite/blob/main/lib/screens/order_success_screen.dart): `lib/screens/order_success_screen.dart`
- [Order tracking](https://github.com/hanbankz/zipbite/blob/main/lib/screens/order_tracking_screen.dart): `lib/screens/order_tracking_screen.dart`
- [Order history](https://github.com/hanbankz/zipbite/blob/main/lib/screens/history_screen.dart): `lib/screens/history_screen.dart`

### Backend services

- [Payment intent](https://github.com/hanbankz/zipbite/blob/main/supabase/functions/create-payment-intent/index.ts): `supabase/functions/create-payment-intent/index.ts`
- **Stripe**
- **Supabase backend**

### Account

- [Authentication](https://github.com/hanbankz/zipbite/blob/main/lib/screens/auth_screen.dart): `lib/screens/auth_screen.dart`
- [Sign up](https://github.com/hanbankz/zipbite/blob/main/lib/screens/signup_screen.dart): `lib/screens/signup_screen.dart`
- [Account settings](https://github.com/hanbankz/zipbite/blob/main/lib/screens/settings_screen.dart): `lib/screens/settings_screen.dart`

### Other components

- **Customer**

## Connections

- Customer → Authentication: signs in (evidence: `README.md`)
- Customer → Sign up: creates account (evidence: `README.md`)
- Customer → Restaurant discovery: browses restaurants (evidence: `README.md`)
- Customer → Search: finds food
- Restaurant discovery → Menu details: views menus (evidence: `README.md`)
- Customer → Cart: builds cart (evidence: `README.md`)
- Cart → Payment: checks out (evidence: `README.md`)
- Payment → Payment intent: requests intent
- Payment intent → Stripe: creates intent
- Payment → Order confirmation: confirms order (evidence: `README.md`)
- Order confirmation → Order tracking: tracks order (evidence: `README.md`)
- Customer → Order history: reviews orders
- Authentication → Supabase backend: uses auth (evidence: `README.md`)
- Restaurant discovery → Supabase backend: loads data
- Order tracking → Supabase backend: receives realtime updates (evidence: `README.md`)
- Order history → Supabase backend: reads orders
- Customer → Account settings: manages account
