# rithish-codecraft/zabbro architecture

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

- Interactive diagram: https://gitdiagram.com/rithish-codecraft/zabbro
- Repository: https://github.com/rithish-codecraft/zabbro

## Overview

ZABBRO is a full-stack streetwear storefront. Shoppers browse and filter drops, inspect product variants, add items to a persistent cart, submit checkout, and view confirmation or order history. Separate account and admin workflows support profile/authentication, inventory and order management, image uploads, and wishlists. The app’s database layer provides Neon-backed catalog and order data with in-memory fallback; Cloudinary supports image delivery and uploads. Relationships are limited to those shown in excerpts, the route registry, or README; unsampled route internals are not asserted.

Main entry points: [`app/root.tsx`](https://github.com/rithish-codecraft/zabbro/blob/main/app/root.tsx) (App Shell), [`app/db/index.server.ts`](https://github.com/rithish-codecraft/zabbro/blob/main/app/db/index.server.ts) (Catalog and Order Access), [`app/routes/checkout.tsx`](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/checkout.tsx) (Checkout), [`app/context/cart-context.tsx`](https://github.com/rithish-codecraft/zabbro/blob/main/app/context/cart-context.tsx) (Cart State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["App Shell<br/>[root.tsx]"]
  node_home["Drop Catalog<br/>[home.tsx]"]
  node_category["Category Browse<br/>[category.tsx]"]
  node_product["Product Detail<br/>[product-detail.tsx]"]
  node_productcard["Product Card<br/>[ProductCard.tsx]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
end

subgraph group_commerce["Shopping and Orders"]
  node_cartstate["Cart State<br/>[cart-context.tsx]"]
  node_cartdrawer["Cart Drawer<br/>[CartDrawer.tsx]"]
  node_checkout["Checkout<br/>[checkout.tsx]"]
  node_orderapi["Order API<br/>[api.orders.ts]"]
  node_confirmation["Order Confirmation<br/>[order-success.tsx]"]
end

subgraph group_accounts["Accounts and Admin"]
  node_orders["Order History<br/>[orders.tsx]"]
  node_auth["Authentication<br/>[auth.server.ts]"]
  node_login["Login and Registration<br/>[auth.login.tsx]"]
  node_profile["Customer Profile<br/>[profile.tsx]"]
  node_admin["Admin Center<br/>[admin.tsx]"]
  node_wishlist["Wishlist API<br/>[api.wishlist.ts]"]
  node_upload["Upload API<br/>[api.upload.ts]"]
end

subgraph group_data["Data and Integrations"]
  node_imageserver["Cloudinary Upload"]
  node_imageclient["Image Optimization<br/>[cloudinary.ts]"]
  node_dataaccess["Catalog and Order Access<br/>[index.server.ts]"]
  node_schema["Database Schema<br/>[schema.ts]"]
  node_mockdata["Fallback Catalog<br/>[mock-data.ts]"]
  node_neon[("Neon PostgreSQL")]
  node_cloudinary["Cloudinary CDN"]
end

node_shopper(("Shopper"))

node_shopper -->|"browses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_category
node_app -->|"routes to"| node_product
node_home -.->|"renders"| node_productcard
node_shopper -->|"adds items"| node_cartstate
node_cartdrawer -->|"reads and updates"| node_cartstate
node_app -->|"renders"| node_cartdrawer
node_shopper -->|"submits order"| node_checkout
node_checkout -.->|"uses cart"| node_cartstate
node_checkout -.->|"posts order"| node_orderapi
node_orderapi -.->|"persists order"| node_dataaccess
node_checkout -->|"confirms order"| node_confirmation
node_shopper -->|"signs in"| node_login
node_login -.->|"manages session"| node_auth
node_app -->|"loads user"| node_auth
node_shopper -->|"manages profile"| node_profile
node_shopper -->|"views orders"| node_orders
node_shopper -->|"manages wishlist"| node_wishlist
node_shopper -->|"manages inventory"| node_admin
node_admin -->|"uploads images"| node_upload
node_upload -.->|"requests upload"| node_imageserver
node_imageserver -->|"uploads assets"| node_cloudinary
node_product -.->|"transforms images"| node_imageclient
node_dataaccess -->|"queries schema"| node_schema
node_dataaccess -->|"uses fallback data"| node_mockdata
node_dataaccess -->|"queries database"| node_neon
node_app -->|"renders"| node_navbar
node_app -->|"loads wishlist"| node_dataaccess

click node_app "https://github.com/rithish-codecraft/zabbro/blob/main/app/root.tsx"
click node_home "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/home.tsx"
click node_category "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/category.tsx"
click node_product "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/product-detail.tsx"
click node_productcard "https://github.com/rithish-codecraft/zabbro/blob/main/app/components/ProductCard.tsx"
click node_navbar "https://github.com/rithish-codecraft/zabbro/blob/main/app/components/Navbar.tsx"
click node_cartstate "https://github.com/rithish-codecraft/zabbro/blob/main/app/context/cart-context.tsx"
click node_cartdrawer "https://github.com/rithish-codecraft/zabbro/blob/main/app/components/CartDrawer.tsx"
click node_checkout "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/checkout.tsx"
click node_orderapi "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/api.orders.ts"
click node_confirmation "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/order-success.tsx"
click node_orders "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/orders.tsx"
click node_auth "https://github.com/rithish-codecraft/zabbro/blob/main/app/lib/auth.server.ts"
click node_login "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/auth.login.tsx"
click node_profile "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/profile.tsx"
click node_admin "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/admin.tsx"
click node_wishlist "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/api.wishlist.ts"
click node_upload "https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/api.upload.ts"
click node_imageserver "https://github.com/rithish-codecraft/zabbro/blob/main/app/lib/cloudinary.server.ts"
click node_imageclient "https://github.com/rithish-codecraft/zabbro/blob/main/app/lib/cloudinary.ts"
click node_dataaccess "https://github.com/rithish-codecraft/zabbro/blob/main/app/db/index.server.ts"
click node_schema "https://github.com/rithish-codecraft/zabbro/blob/main/app/db/schema.ts"
click node_mockdata "https://github.com/rithish-codecraft/zabbro/blob/main/app/db/mock-data.ts"

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_home,node_category,node_product,node_productcard,node_navbar toneBlue
class node_cartstate,node_cartdrawer,node_checkout,node_orderapi,node_confirmation toneAmber
class node_orders,node_auth,node_login,node_profile,node_admin,node_wishlist,node_upload toneMint
class node_imageserver,node_imageclient,node_dataaccess,node_schema,node_mockdata,node_neon,node_cloudinary toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [App Shell](https://github.com/rithish-codecraft/zabbro/blob/main/app/root.tsx): `app/root.tsx`
- [Drop Catalog](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/home.tsx): `app/routes/home.tsx`
- [Category Browse](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/category.tsx): `app/routes/category.tsx`
- [Product Detail](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/product-detail.tsx): `app/routes/product-detail.tsx`
- [Product Card](https://github.com/rithish-codecraft/zabbro/blob/main/app/components/ProductCard.tsx): `app/components/ProductCard.tsx`
- [Navigation](https://github.com/rithish-codecraft/zabbro/blob/main/app/components/Navbar.tsx): `app/components/Navbar.tsx`

### Shopping and Orders

- [Cart State](https://github.com/rithish-codecraft/zabbro/blob/main/app/context/cart-context.tsx): `app/context/cart-context.tsx`
- [Cart Drawer](https://github.com/rithish-codecraft/zabbro/blob/main/app/components/CartDrawer.tsx): `app/components/CartDrawer.tsx`
- [Checkout](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/checkout.tsx): `app/routes/checkout.tsx`
- [Order API](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/api.orders.ts): `app/routes/api.orders.ts`
- [Order Confirmation](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/order-success.tsx): `app/routes/order-success.tsx`

### Accounts and Admin

- [Order History](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/orders.tsx): `app/routes/orders.tsx`
- [Authentication](https://github.com/rithish-codecraft/zabbro/blob/main/app/lib/auth.server.ts): `app/lib/auth.server.ts`
- [Login and Registration](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/auth.login.tsx): `app/routes/auth.login.tsx`
- [Customer Profile](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/profile.tsx): `app/routes/profile.tsx`
- [Admin Center](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/admin.tsx): `app/routes/admin.tsx`
- [Wishlist API](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/api.wishlist.ts): `app/routes/api.wishlist.ts`
- [Upload API](https://github.com/rithish-codecraft/zabbro/blob/main/app/routes/api.upload.ts): `app/routes/api.upload.ts`

### Data and Integrations

- [Cloudinary Upload](https://github.com/rithish-codecraft/zabbro/blob/main/app/lib/cloudinary.server.ts): `app/lib/cloudinary.server.ts`
- [Image Optimization](https://github.com/rithish-codecraft/zabbro/blob/main/app/lib/cloudinary.ts): `app/lib/cloudinary.ts`
- [Catalog and Order Access](https://github.com/rithish-codecraft/zabbro/blob/main/app/db/index.server.ts): `app/db/index.server.ts`
- [Database Schema](https://github.com/rithish-codecraft/zabbro/blob/main/app/db/schema.ts): `app/db/schema.ts`
- [Fallback Catalog](https://github.com/rithish-codecraft/zabbro/blob/main/app/db/mock-data.ts): `app/db/mock-data.ts`
- **Neon PostgreSQL**
- **Cloudinary CDN**

### Other components

- **Shopper**

## Connections

- Shopper → App Shell: browses (evidence: `README.md`)
- App Shell → Drop Catalog: routes to
- App Shell → Category Browse: routes to
- App Shell → Product Detail: routes to
- Drop Catalog → Product Card: renders
- Shopper → Cart State: adds items (evidence: `README.md`)
- Cart Drawer → Cart State: reads and updates (evidence: `app/components/CartDrawer.tsx`)
- App Shell → Cart Drawer: renders (evidence: `app/root.tsx`)
- Shopper → Checkout: submits order (evidence: `README.md`)
- Checkout → Cart State: uses cart
- Checkout → Order API: posts order
- Order API → Catalog and Order Access: persists order (evidence: `README.md`)
- Checkout → Order Confirmation: confirms order (evidence: `README.md`)
- Shopper → Login and Registration: signs in (evidence: `README.md`)
- Login and Registration → Authentication: manages session
- App Shell → Authentication: loads user (evidence: `app/root.tsx`)
- Shopper → Customer Profile: manages profile (evidence: `README.md`)
- Shopper → Order History: views orders (evidence: `README.md`)
- Shopper → Wishlist API: manages wishlist
- Shopper → Admin Center: manages inventory (evidence: `README.md`)
- Admin Center → Upload API: uploads images (evidence: `README.md`)
- Upload API → Cloudinary Upload: requests upload
- Cloudinary Upload → Cloudinary CDN: uploads assets (evidence: `README.md`)
- Product Detail → Image Optimization: transforms images
- Catalog and Order Access → Database Schema: queries schema (evidence: `app/db/index.server.ts`)
- Catalog and Order Access → Fallback Catalog: uses fallback data (evidence: `app/db/index.server.ts`)
- Catalog and Order Access → Neon PostgreSQL: queries database (evidence: `README.md`)
- App Shell → Navigation: renders (evidence: `app/root.tsx`)
- App Shell → Catalog and Order Access: loads wishlist (evidence: `app/root.tsx`)
