# radebeneo/bite architecture

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

- Interactive diagram: https://gitdiagram.com/radebeneo/bite
- Repository: https://github.com/radebeneo/bite

## Overview

Bite is an Expo food-delivery app: customers browse featured offers, search and filter menu items, and manage a cart; authentication supports account access. Appwrite provides the documented backend for authentication and menu data, while Zustand holds auth and cart state. The sampled search screen shows the menu-fetching path, and the sampled signup screen shows account creation. Cart, profile, sign-in, and filter implementation details were not sampled, so their internal wiring is left limited; Sentry initialization is visible in the root layout.

Main entry points: [`app/(tabs)/search.tsx`](https://github.com/radebeneo/bite/blob/main/app/(tabs)/search.tsx) (Menu Search), [`app/_layout.tsx`](https://github.com/radebeneo/bite/blob/main/app/_layout.tsx) (Root Layout), [`lib/appwrite.ts`](https://github.com/radebeneo/bite/blob/main/lib/appwrite.ts) (Appwrite Client), [`lib/useAppwrite.ts`](https://github.com/radebeneo/bite/blob/main/lib/useAppwrite.ts) (Appwrite Hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App Navigation"]
  node_root["Root Layout<br/>[_layout.tsx]"]
  node_tabs["Main Tabs"]
end

subgraph group_discovery["Menu Discovery"]
  node_home["Offers Home<br/>[index.tsx]"]
  node_search["Menu Search<br/>[search.tsx]"]
  node_searchbar["Search Input<br/>[SearchBar.tsx]"]
  node_filters["Category Filters"]
  node_menuui["Menu Cards<br/>[MenuCard.tsx]"]
  node_data["Menu Data<br/>[data.ts]"]
  node_hook["Appwrite Hook<br/>[useAppwrite.ts]"]
  node_backend["Appwrite Client<br/>[appwrite.ts]"]
end

subgraph group_identity["Customer Identity"]
  node_authscreens["Auth Screens"]
  node_signup["Sign Up<br/>[sign-up.tsx]"]
  node_authstore["Auth Store<br/>[auth.store.ts]"]
  node_profile["Profile Screen<br/>[profile.tsx]"]
end

subgraph group_ordering["Cart Management"]
  node_cartpage["Cart Screen<br/>[cart.tsx]"]
  node_cartitem["Cart Item UI<br/>[CartItem.tsx]"]
  node_cartstore["Cart Store<br/>[cart.store.ts]"]
end

node_customer(("Customer"))
node_appwrite[("Appwrite")]
node_sentry["Sentry"]

node_customer -->|"opens app"| node_root
node_root -->|"checks session"| node_authstore
node_authstore -->|"gets current user"| node_backend
node_signup -->|"creates account"| node_backend
node_authscreens -->|"routes to"| node_signup
node_root -->|"shows routes"| node_tabs
node_home -->|"reads offers"| node_data
node_searchbar -->|"sets query"| node_search
node_search -->|"fetches menu"| node_hook
node_search -->|"fetches categories"| node_hook
node_hook -->|"invokes function"| node_backend
node_backend -->|"requests data"| node_appwrite
node_search -->|"renders results"| node_menuui
node_search -->|"renders categories"| node_filters
node_cartpage -.->|"renders items"| node_cartitem
node_cartitem -->|"updates quantities"| node_cartstore
node_root -->|"initializes monitoring"| node_sentry

click node_root "https://github.com/radebeneo/bite/blob/main/app/_layout.tsx"
click node_authscreens "https://github.com/radebeneo/bite/tree/main/app/(auth)"
click node_signup "https://github.com/radebeneo/bite/blob/main/app/(auth)/sign-up.tsx"
click node_authstore "https://github.com/radebeneo/bite/blob/main/store/auth.store.ts"
click node_tabs "https://github.com/radebeneo/bite/tree/main/app/(tabs)"
click node_home "https://github.com/radebeneo/bite/blob/main/app/(tabs)/index.tsx"
click node_search "https://github.com/radebeneo/bite/blob/main/app/(tabs)/search.tsx"
click node_searchbar "https://github.com/radebeneo/bite/blob/main/components/SearchBar.tsx"
click node_filters "https://github.com/radebeneo/bite/blob/main/components/FilterComponent.tsx"
click node_menuui "https://github.com/radebeneo/bite/blob/main/components/MenuCard.tsx"
click node_data "https://github.com/radebeneo/bite/blob/main/lib/data.ts"
click node_hook "https://github.com/radebeneo/bite/blob/main/lib/useAppwrite.ts"
click node_backend "https://github.com/radebeneo/bite/blob/main/lib/appwrite.ts"
click node_cartpage "https://github.com/radebeneo/bite/blob/main/app/(tabs)/cart.tsx"
click node_cartitem "https://github.com/radebeneo/bite/blob/main/components/CartItem.tsx"
click node_cartstore "https://github.com/radebeneo/bite/blob/main/store/cart.store.ts"
click node_profile "https://github.com/radebeneo/bite/blob/main/app/(tabs)/profile.tsx"

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_root,node_tabs toneBlue
class node_home,node_search,node_searchbar,node_filters,node_menuui,node_data,node_hook,node_backend,node_appwrite toneAmber
class node_authscreens,node_signup,node_authstore,node_profile toneMint
class node_cartpage,node_cartitem,node_cartstore toneRose
class node_customer,node_sentry toneIndigo
```

## Components

### App Navigation

- [Root Layout](https://github.com/radebeneo/bite/blob/main/app/_layout.tsx): `app/_layout.tsx`
- [Main Tabs](https://github.com/radebeneo/bite/tree/main/app/(tabs)): `app/(tabs)`

### Menu Discovery

- [Offers Home](https://github.com/radebeneo/bite/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Menu Search](https://github.com/radebeneo/bite/blob/main/app/(tabs)/search.tsx): `app/(tabs)/search.tsx`
- [Search Input](https://github.com/radebeneo/bite/blob/main/components/SearchBar.tsx): `components/SearchBar.tsx`
- [Category Filters](https://github.com/radebeneo/bite/blob/main/components/FilterComponent.tsx): `components/FilterComponent.tsx`
- [Menu Cards](https://github.com/radebeneo/bite/blob/main/components/MenuCard.tsx): `components/MenuCard.tsx`
- [Menu Data](https://github.com/radebeneo/bite/blob/main/lib/data.ts): `lib/data.ts`
- [Appwrite Hook](https://github.com/radebeneo/bite/blob/main/lib/useAppwrite.ts): `lib/useAppwrite.ts`
- [Appwrite Client](https://github.com/radebeneo/bite/blob/main/lib/appwrite.ts): `lib/appwrite.ts`

### Customer Identity

- [Auth Screens](https://github.com/radebeneo/bite/tree/main/app/(auth)): `app/(auth)`
- [Sign Up](https://github.com/radebeneo/bite/blob/main/app/(auth)/sign-up.tsx): `app/(auth)/sign-up.tsx`
- [Auth Store](https://github.com/radebeneo/bite/blob/main/store/auth.store.ts): `store/auth.store.ts`
- [Profile Screen](https://github.com/radebeneo/bite/blob/main/app/(tabs)/profile.tsx): `app/(tabs)/profile.tsx`

### Cart Management

- [Cart Screen](https://github.com/radebeneo/bite/blob/main/app/(tabs)/cart.tsx): `app/(tabs)/cart.tsx`
- [Cart Item UI](https://github.com/radebeneo/bite/blob/main/components/CartItem.tsx): `components/CartItem.tsx`
- [Cart Store](https://github.com/radebeneo/bite/blob/main/store/cart.store.ts): `store/cart.store.ts`

### Other components

- **Customer**
- **Appwrite**
- **Sentry**

## Connections

- Customer → Root Layout: opens app
- Root Layout → Auth Store: checks session
- Auth Store → Appwrite Client: gets current user
- Sign Up → Appwrite Client: creates account
- Auth Screens → Sign Up: routes to
- Root Layout → Main Tabs: shows routes
- Offers Home → Menu Data: reads offers
- Search Input → Menu Search: sets query
- Menu Search → Appwrite Hook: fetches menu
- Menu Search → Appwrite Hook: fetches categories
- Appwrite Hook → Appwrite Client: invokes function
- Appwrite Client → Appwrite: requests data
- Menu Search → Menu Cards: renders results
- Menu Search → Category Filters: renders categories
- Cart Screen → Cart Item UI: renders items
- Cart Item UI → Cart Store: updates quantities
- Root Layout → Sentry: initializes monitoring
