# kprafullasd-rgb/dailyneeds-releases architecture

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

- Interactive diagram: https://gitdiagram.com/kprafullasd-rgb/dailyneeds-releases
- Repository: https://github.com/kprafullasd-rgb/dailyneeds-releases

## Overview

DailyNeeds is a React Native grocery-delivery app for customers and a shop administrator. The main flow is sign-up/login, browse and search the catalog, manage cart and promotions, choose payment, place an order, then view order history or live tracking; admins monitor orders and update their status. Firebase Auth and Firestore provide identity and order storage, while Razorpay, WhatsApp, location selection, and push notifications are documented product capabilities. The graph follows shown imports/calls and README claims; unsampled screens and integrations are included only where documented, without inferring their wiring.

Main entry points: [`App.js`](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/App.js) (Navigation and app shell), [`src/screens/CheckoutScreen.js`](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/CheckoutScreen.js) (Checkout), [`src/utils/orders.js`](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/utils/orders.js) (Order operations), [`src/screens/AuthScreen.js`](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/AuthScreen.js) (Sign-in and signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Mobile experience"]
  node_app["Navigation and app shell<br/>[App.js]"]
  node_authscreen["Sign-in and signup<br/>[AuthScreen.js]"]
  node_home["Catalog browsing<br/>[HomeScreen.js]"]
  node_cartscreen["Cart view<br/>[CartScreen.js]"]
  node_checkout["Checkout<br/>[CheckoutScreen.js]"]
  node_success["Order confirmation"]
  node_history["Order history<br/>[OrdersScreen.js]"]
  node_tracking["Live order tracking"]
  node_adminpanel["Admin order management<br/>[AdminDashboard.js]"]
  node_profile["Customer profile<br/>[ProfileScreen.js]"]
end

subgraph group_commerce["Shopping and orders"]
  node_products["Product catalog<br/>[products.js]"]
  node_cart["Cart and promotions<br/>[CartContext.js]"]
  node_orders["Order operations<br/>[orders.js]"]
end

subgraph group_identity["Identity and state"]
  node_authstate["Authentication state<br/>[AuthContext.js]"]
  node_theme["Theme tokens<br/>[theme.js]"]
end

subgraph group_services["Backend and integrations"]
  node_payment["Razorpay payments<br/>[razorpay.js]"]
  node_firebase["Firebase setup<br/>[firebase.js]"]
  node_firestore[("Firestore")]
  node_whatsapp["WhatsApp alerts and support<br/>[whatsapp.js]"]
  node_push["Push notifications<br/>[notifications.js]"]
  node_location["Location picker"]
end

node_customer(("Customer"))
node_admin(("Shop admin"))
node_owner(("Shop owner"))

node_customer -->|"opens app"| node_app
node_app -->|"provides auth"| node_authstate
node_app -->|"provides cart"| node_cart
node_app -->|"routes unauthenticated"| node_authscreen
node_app -->|"routes signed-in"| node_home
node_app -->|"routes to"| node_cartscreen
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_success
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_tracking
node_app -->|"routes to"| node_profile
node_app -->|"routes for admin"| node_adminpanel
node_app -->|"supplies catalog"| node_products
node_authscreen -->|"signs in/up"| node_authstate
node_authstate -->|"uses auth and data"| node_firebase
node_firebase -->|"configures client"| node_firestore
node_home -->|"browses catalog"| node_products
node_home -.->|"adds items"| node_cart
node_cartscreen -->|"reads cart"| node_cart
node_checkout -->|"reads cart totals"| node_cart
node_checkout -->|"places order"| node_orders
node_orders -->|"writes and subscribes"| node_firestore
node_checkout -->|"sends order alert"| node_whatsapp
node_whatsapp -->|"opens alert chat"| node_owner
node_checkout -.->|"accepts UPI payment"| node_payment
node_payment -.->|"charges UPI"| node_customer
node_customer -->|"selects COD or UPI"| node_checkout
node_history -->|"subscribes user orders"| node_orders
node_tracking -.->|"tracks order live"| node_firestore
node_admin -->|"manages orders"| node_adminpanel
node_adminpanel -->|"updates order status"| node_orders
node_orders -->|"updates status"| node_firestore
node_app -->|"registers notifications"| node_push
node_push -->|"uses Firebase"| node_firebase
node_authscreen -.->|"picks signup location"| node_location
node_authscreen -.->|"styles screen"| node_theme
node_app -->|"styles navigation"| node_theme

click node_app "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/App.js"
click node_authscreen "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/AuthScreen.js"
click node_home "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/HomeScreen.js"
click node_products "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/data/products.js"
click node_cart "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/context/CartContext.js"
click node_cartscreen "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/CartScreen.js"
click node_checkout "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/CheckoutScreen.js"
click node_payment "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/utils/razorpay.js"
click node_orders "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/utils/orders.js"
click node_success "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/OrderSuccessScreen.js"
click node_history "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/OrdersScreen.js"
click node_tracking "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/OrderTrackingScreen.js"
click node_adminpanel "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/admin/AdminDashboard.js"
click node_profile "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/ProfileScreen.js"
click node_authstate "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/context/AuthContext.js"
click node_firebase "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/config/firebase.js"
click node_whatsapp "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/utils/whatsapp.js"
click node_push "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/utils/notifications.js"
click node_theme "https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/config/theme.js"

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_authscreen,node_home,node_cartscreen,node_checkout,node_success,node_history,node_tracking,node_adminpanel,node_profile toneBlue
class node_products,node_cart,node_orders toneAmber
class node_authstate,node_theme toneMint
class node_payment,node_firebase,node_firestore,node_whatsapp,node_push,node_location toneRose
class node_customer,node_admin,node_owner toneIndigo
```

## Components

### Mobile experience

- [Navigation and app shell](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/App.js): `App.js`
- [Sign-in and signup](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/AuthScreen.js): `src/screens/AuthScreen.js`
- [Catalog browsing](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/HomeScreen.js): `src/screens/HomeScreen.js`
- [Cart view](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/CartScreen.js): `src/screens/CartScreen.js`
- [Checkout](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/CheckoutScreen.js): `src/screens/CheckoutScreen.js`
- [Order confirmation](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/OrderSuccessScreen.js): `src/screens/OrderSuccessScreen.js`
- [Order history](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/OrdersScreen.js): `src/screens/OrdersScreen.js`
- [Live order tracking](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/OrderTrackingScreen.js): `src/screens/OrderTrackingScreen.js`
- [Admin order management](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/admin/AdminDashboard.js): `src/screens/admin/AdminDashboard.js`
- [Customer profile](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/screens/ProfileScreen.js): `src/screens/ProfileScreen.js`

### Shopping and orders

- [Product catalog](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/data/products.js): `src/data/products.js`
- [Cart and promotions](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/context/CartContext.js): `src/context/CartContext.js`
- [Order operations](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/utils/orders.js): `src/utils/orders.js`

### Identity and state

- [Authentication state](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/context/AuthContext.js): `src/context/AuthContext.js`
- [Theme tokens](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/config/theme.js): `src/config/theme.js`

### Backend and integrations

- [Razorpay payments](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/utils/razorpay.js): `src/utils/razorpay.js`
- [Firebase setup](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/config/firebase.js): `src/config/firebase.js`
- **Firestore**
- [WhatsApp alerts and support](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/utils/whatsapp.js): `src/utils/whatsapp.js`
- [Push notifications](https://github.com/kprafullasd-rgb/dailyneeds-releases/blob/main/src/utils/notifications.js): `src/utils/notifications.js`
- **Location picker**

### Other components

- **Customer**
- **Shop admin**
- **Shop owner**

## Connections

- Customer → Navigation and app shell: opens app (evidence: `README.md`)
- Navigation and app shell → Authentication state: provides auth (evidence: `App.js`)
- Navigation and app shell → Cart and promotions: provides cart (evidence: `App.js`)
- Navigation and app shell → Sign-in and signup: routes unauthenticated (evidence: `App.js`)
- Navigation and app shell → Catalog browsing: routes signed-in (evidence: `App.js`)
- Navigation and app shell → Cart view: routes to (evidence: `App.js`)
- Navigation and app shell → Checkout: routes to (evidence: `App.js`)
- Navigation and app shell → Order confirmation: routes to (evidence: `App.js`)
- Navigation and app shell → Order history: routes to (evidence: `App.js`)
- Navigation and app shell → Live order tracking: routes to (evidence: `App.js`)
- Navigation and app shell → Customer profile: routes to (evidence: `App.js`)
- Navigation and app shell → Admin order management: routes for admin (evidence: `App.js`)
- Navigation and app shell → Product catalog: supplies catalog (evidence: `App.js`)
- Sign-in and signup → Authentication state: signs in/up (evidence: `src/screens/AuthScreen.js`)
- Authentication state → Firebase setup: uses auth and data (evidence: `src/context/AuthContext.js`)
- Firebase setup → Firestore: configures client (evidence: `src/config/firebase.js`)
- Catalog browsing → Product catalog: browses catalog (evidence: `src/screens/HomeScreen.js`)
- Catalog browsing → Cart and promotions: adds items (evidence: `src/screens/HomeScreen.js`)
- Cart view → Cart and promotions: reads cart (evidence: `src/screens/CartScreen.js`)
- Checkout → Cart and promotions: reads cart totals (evidence: `src/screens/CheckoutScreen.js`)
- Checkout → Order operations: places order (evidence: `src/screens/CheckoutScreen.js`)
- Order operations → Firestore: writes and subscribes (evidence: `src/utils/orders.js`)
- Checkout → WhatsApp alerts and support: sends order alert (evidence: `src/screens/CheckoutScreen.js`)
- WhatsApp alerts and support → Shop owner: opens alert chat (evidence: `src/utils/whatsapp.js`)
- Checkout → Razorpay payments: accepts UPI payment
- Razorpay payments → Customer: charges UPI
- Customer → Checkout: selects COD or UPI (evidence: `README.md`)
- Order history → Order operations: subscribes user orders (evidence: `src/screens/OrdersScreen.js`)
- Live order tracking → Firestore: tracks order live
- Shop admin → Admin order management: manages orders (evidence: `README.md`)
- Admin order management → Order operations: updates order status (evidence: `src/screens/admin/AdminDashboard.js`)
- Order operations → Firestore: updates status (evidence: `src/utils/orders.js`)
- Navigation and app shell → Push notifications: registers notifications (evidence: `App.js`)
- Push notifications → Firebase setup: uses Firebase (evidence: `src/utils/notifications.js`)
- Sign-in and signup → Location picker: picks signup location
- Sign-in and signup → Theme tokens: styles screen (evidence: `src/screens/AuthScreen.js`)
- Navigation and app shell → Theme tokens: styles navigation (evidence: `App.js`)
