# tafseelkhan/tizzygo architecture

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

- Interactive diagram: https://gitdiagram.com/tafseelkhan/tizzygo
- Repository: https://github.com/tafseelkhan/tizzygo

## Overview

TizzyGo is a React Native app combining buyer commerce and cab-booking journeys. Users enter through the app’s navigation, browse products or start a ride flow, and proceed to purchase/order status or ride search. The graph highlights those domain stages and the API, session, and shared-state layer supporting them. Evidence is limited to the README, source index references, and sampled excerpts; unsampled screens and services are represented only where routing or documented references support them.

Main entry points: [`src/navigations/index.tsx`](https://github.com/tafseelkhan/tizzygo/blob/main/src/navigations/index.tsx) (Screen navigation), [`src/api/features/private/searchPrivateSlice.ts`](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/searchPrivateSlice.ts) (Search API), [`src/api/connections/token/tokenSlice.ts`](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/connections/token/tokenSlice.ts) (Session token), [`src/core/utils/handler/fetchHandler.ts`](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/utils/handler/fetchHandler.ts) (HTTP fetch helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_app["App providers<br/>[App.tsx]"]
  node_navigation["Screen navigation<br/>[index.tsx]"]
end

subgraph group_commerce["Buyer commerce"]
  node_home["Buyer home<br/>[HomeScreen.tsx]"]
  node_product["Product details"]
  node_search["Product search<br/>[useSearch.ts]"]
  node_cart["Cart operations"]
  node_checkout["Checkout and payment"]
  node_order_success["Order success"]
  node_orders["Order history"]
  node_ratings["Product reviews"]
end

subgraph group_rides["Cab booking"]
  node_cab_home["Cab discovery<br/>[customerHome.tsx]"]
  node_ride_options["Ride options"]
  node_local_location["Local ride location<br/>[LocationInput.tsx]"]
  node_airport_location["Airport location<br/>[LocationInput.tsx]"]
  node_ride_search["Ride search flow"]
end

subgraph group_platform["API and shared state"]
  node_search_api["Search API"]
  node_ride_api["Ride booking API"]
  node_ride_socket["Ride search socket"]
  node_auth_api["Authentication API<br/>[authPublicSlice.ts]"]
  node_token[("Session token<br/>[tokenSlice.ts]")]
  node_storage_keys["Storage keys<br/>[storageKeys.ts]"]
  node_fetch["HTTP fetch helper<br/>[fetchHandler.ts]"]
  node_api_config["API configuration<br/>[apiBaseUrl.ts]"]
  node_endpoints["API endpoints<br/>[apiEndpoints.ts]"]
  node_theme["Theme state<br/>[ThemeContext.tsx]"]
end

node_user(("App user"))
node_backend["TizzyGo backend"]
node_async_storage[("AsyncStorage")]

node_user -->|"opens app"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"provides theme"| node_theme
node_navigation -->|"routes to"| node_home
node_navigation -->|"routes to"| node_product
node_navigation -->|"routes to"| node_order_success
node_navigation -->|"routes to"| node_cab_home
node_navigation -->|"routes to"| node_ride_options
node_navigation -->|"routes to"| node_local_location
node_navigation -->|"routes to"| node_airport_location
node_navigation -->|"routes to"| node_ride_search
node_search -->|"calls"| node_search_api
node_search_api -->|"reads token"| node_token
node_search_api -->|"requests search"| node_backend
node_search_api -->|"uses helper"| node_fetch
node_search_api -->|"uses base URL"| node_api_config
node_search_api -->|"uses routes"| node_endpoints
node_cart -->|"requests cart"| node_backend
node_cart -->|"reads token"| node_token
node_checkout -->|"requests payment"| node_backend
node_checkout -->|"uses helper"| node_fetch
node_checkout -->|"reads token"| node_token
node_order_success -->|"loads order result"| node_backend
node_orders -->|"requests orders"| node_backend
node_ratings -->|"requests reviews"| node_backend
node_ratings -->|"uses helper"| node_fetch
node_ride_search -->|"books ride"| node_ride_api
node_ride_search -->|"uses socket"| node_ride_socket
node_ride_api -.->|"requests booking"| node_backend
node_auth_api -->|"requests authentication"| node_backend
node_auth_api -->|"uses helper"| node_fetch
node_auth_api -->|"stores token"| node_token
node_token -->|"reads and writes"| node_async_storage
node_token -->|"uses keys"| node_storage_keys

click node_app "https://github.com/tafseelkhan/tizzygo/blob/main/App.tsx"
click node_navigation "https://github.com/tafseelkhan/tizzygo/blob/main/src/navigations/index.tsx"
click node_home "https://github.com/tafseelkhan/tizzygo/blob/main/src/screens/home/HomeScreen.tsx"
click node_product "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/buyers/store/ProductDetailStore.tsx"
click node_search "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/hooks/useSearch.ts"
click node_search_api "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/searchPrivateSlice.ts"
click node_cart "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/addToCartPrivateSlice.ts"
click node_checkout "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/checkoutPaymentPrivateSlice.ts"
click node_order_success "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/buyers/inventory/OrderSuccessScreen.tsx"
click node_orders "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/yourOrderPrivateSlice.ts"
click node_ratings "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/productRatingReviewStatesPrivateSlice.ts"
click node_cab_home "https://github.com/tafseelkhan/tizzygo/blob/main/src/screens/cabs/home/customerHome.tsx"
click node_ride_options "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/cabs/services/FwsRidesOptionServices.tsx"
click node_local_location "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/cabs/FWSLocalRide/common/LocationInput.tsx"
click node_airport_location "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/cabs/FWSAirport/common/LocationInput.tsx"
click node_ride_search "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/cabs/FWSLocalRide/common/RideSearchScreen.tsx"
click node_ride_api "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/rideBookingPrivateSlice.ts"
click node_ride_socket "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/utils/socket/socketRideSearching.ts"
click node_auth_api "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/public/authPublicSlice.ts"
click node_token "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/connections/token/tokenSlice.ts"
click node_storage_keys "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/connections/keys/storageKeys.ts"
click node_fetch "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/utils/handler/fetchHandler.ts"
click node_api_config "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/connections/snippet/apiBaseUrl.ts"
click node_endpoints "https://github.com/tafseelkhan/tizzygo/blob/main/src/api/connections/snippet/apiEndpoints.ts"
click node_theme "https://github.com/tafseelkhan/tizzygo/blob/main/src/core/contexts/theme/ThemeContext.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_app,node_navigation,node_user toneBlue
class node_home,node_product,node_search,node_cart,node_checkout,node_order_success,node_orders,node_ratings,node_async_storage toneAmber
class node_cab_home,node_ride_options,node_local_location,node_airport_location,node_ride_search toneMint
class node_search_api,node_ride_api,node_ride_socket,node_auth_api,node_token,node_storage_keys,node_fetch,node_api_config,node_endpoints,node_theme toneRose
class node_backend toneIndigo
```

## Components

### App and navigation

- [App providers](https://github.com/tafseelkhan/tizzygo/blob/main/App.tsx): `App.tsx`
- [Screen navigation](https://github.com/tafseelkhan/tizzygo/blob/main/src/navigations/index.tsx): `src/navigations/index.tsx`

### Buyer commerce

- [Buyer home](https://github.com/tafseelkhan/tizzygo/blob/main/src/screens/home/HomeScreen.tsx): `src/screens/home/HomeScreen.tsx`
- [Product details](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/buyers/store/ProductDetailStore.tsx): `src/core/components/buyers/store/ProductDetailStore.tsx`
- [Product search](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/hooks/useSearch.ts): `src/core/hooks/useSearch.ts`
- [Cart operations](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/addToCartPrivateSlice.ts): `src/api/features/private/addToCartPrivateSlice.ts`
- [Checkout and payment](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/checkoutPaymentPrivateSlice.ts): `src/api/features/private/checkoutPaymentPrivateSlice.ts`
- [Order success](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/buyers/inventory/OrderSuccessScreen.tsx): `src/core/components/buyers/inventory/OrderSuccessScreen.tsx`
- [Order history](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/yourOrderPrivateSlice.ts): `src/api/features/private/yourOrderPrivateSlice.ts`
- [Product reviews](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/productRatingReviewStatesPrivateSlice.ts): `src/api/features/private/productRatingReviewStatesPrivateSlice.ts`

### Cab booking

- [Cab discovery](https://github.com/tafseelkhan/tizzygo/blob/main/src/screens/cabs/home/customerHome.tsx): `src/screens/cabs/home/customerHome.tsx`
- [Ride options](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/cabs/services/FwsRidesOptionServices.tsx): `src/core/components/cabs/services/FwsRidesOptionServices.tsx`
- [Local ride location](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/cabs/FWSLocalRide/common/LocationInput.tsx): `src/core/components/cabs/FWSLocalRide/common/LocationInput.tsx`
- [Airport location](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/cabs/FWSAirport/common/LocationInput.tsx): `src/core/components/cabs/FWSAirport/common/LocationInput.tsx`
- [Ride search flow](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/components/cabs/FWSLocalRide/common/RideSearchScreen.tsx): `src/core/components/cabs/FWSLocalRide/common/RideSearchScreen.tsx`

### API and shared state

- [Search API](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/searchPrivateSlice.ts): `src/api/features/private/searchPrivateSlice.ts`
- [Ride booking API](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/private/rideBookingPrivateSlice.ts): `src/api/features/private/rideBookingPrivateSlice.ts`
- [Ride search socket](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/utils/socket/socketRideSearching.ts): `src/core/utils/socket/socketRideSearching.ts`
- [Authentication API](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/features/public/authPublicSlice.ts): `src/api/features/public/authPublicSlice.ts`
- [Session token](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/connections/token/tokenSlice.ts): `src/api/connections/token/tokenSlice.ts`
- [Storage keys](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/connections/keys/storageKeys.ts): `src/api/connections/keys/storageKeys.ts`
- [HTTP fetch helper](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/utils/handler/fetchHandler.ts): `src/core/utils/handler/fetchHandler.ts`
- [API configuration](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/connections/snippet/apiBaseUrl.ts): `src/api/connections/snippet/apiBaseUrl.ts`
- [API endpoints](https://github.com/tafseelkhan/tizzygo/blob/main/src/api/connections/snippet/apiEndpoints.ts): `src/api/connections/snippet/apiEndpoints.ts`
- [Theme state](https://github.com/tafseelkhan/tizzygo/blob/main/src/core/contexts/theme/ThemeContext.tsx): `src/core/contexts/theme/ThemeContext.tsx`

### Other components

- **App user**
- **TizzyGo backend**
- **AsyncStorage**

## Connections

- App user → App providers: opens app (evidence: `App.tsx`)
- App providers → Screen navigation: renders (evidence: `App.tsx`)
- App providers → Theme state: provides theme (evidence: `App.tsx`)
- Screen navigation → Buyer home: routes to (evidence: `src/navigations/index.tsx`)
- Screen navigation → Product details: routes to (evidence: `src/navigations/index.tsx`)
- Screen navigation → Order success: routes to (evidence: `src/navigations/index.tsx`)
- Screen navigation → Cab discovery: routes to (evidence: `src/navigations/index.tsx`)
- Screen navigation → Ride options: routes to (evidence: `src/navigations/index.tsx`)
- Screen navigation → Local ride location: routes to (evidence: `src/navigations/index.tsx`)
- Screen navigation → Airport location: routes to (evidence: `src/navigations/index.tsx`)
- Screen navigation → Ride search flow: routes to (evidence: `src/navigations/index.tsx`)
- Product search → Search API: calls (evidence: `src/core/hooks/useSearch.ts`)
- Search API → Session token: reads token (evidence: `src/api/features/private/searchPrivateSlice.ts`)
- Search API → TizzyGo backend: requests search (evidence: `src/api/features/private/searchPrivateSlice.ts`)
- Search API → HTTP fetch helper: uses helper (evidence: `src/api/features/private/searchPrivateSlice.ts`)
- Search API → API configuration: uses base URL (evidence: `src/api/features/private/searchPrivateSlice.ts`)
- Search API → API endpoints: uses routes (evidence: `src/api/features/private/searchPrivateSlice.ts`)
- Cart operations → TizzyGo backend: requests cart (evidence: `src/api/features/private/addToCartPrivateSlice.ts`)
- Cart operations → Session token: reads token (evidence: `src/api/features/private/addToCartPrivateSlice.ts`)
- Checkout and payment → TizzyGo backend: requests payment (evidence: `src/api/features/private/checkoutPaymentPrivateSlice.ts`)
- Checkout and payment → HTTP fetch helper: uses helper (evidence: `src/api/features/private/checkoutPaymentPrivateSlice.ts`)
- Checkout and payment → Session token: reads token (evidence: `src/api/features/private/checkoutPaymentPrivateSlice.ts`)
- Order success → TizzyGo backend: loads order result
- Order history → TizzyGo backend: requests orders (evidence: `src/api/features/private/yourOrderPrivateSlice.ts`)
- Product reviews → TizzyGo backend: requests reviews (evidence: `src/api/features/private/productRatingReviewStatesPrivateSlice.ts`)
- Product reviews → HTTP fetch helper: uses helper (evidence: `src/api/features/private/productRatingReviewStatesPrivateSlice.ts`)
- Ride search flow → Ride booking API: books ride (evidence: `src/core/components/cabs/FWSLocalRide/common/RideSearchScreen.tsx`)
- Ride search flow → Ride search socket: uses socket (evidence: `src/core/components/cabs/FWSLocalRide/common/RideSearchScreen.tsx`)
- Ride booking API → TizzyGo backend: requests booking
- Authentication API → TizzyGo backend: requests authentication (evidence: `src/api/features/public/authPublicSlice.ts`)
- Authentication API → HTTP fetch helper: uses helper (evidence: `src/api/features/public/authPublicSlice.ts`)
- Authentication API → Session token: stores token (evidence: `src/api/features/public/authPublicSlice.ts`)
- Session token → AsyncStorage: reads and writes (evidence: `src/api/connections/token/tokenSlice.ts`)
- Session token → Storage keys: uses keys (evidence: `src/api/connections/token/tokenSlice.ts`)
