# assiddique96/dropcart architecture

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

- Interactive diagram: https://gitdiagram.com/assiddique96/dropcart
- Repository: https://github.com/assiddique96/dropcart

## Overview

DropCart is a multi-vendor e-commerce platform. Customers browse storefronts, build carts, and place and review orders; sellers apply for stores and manage products, orders, and sales; administrators review stores and oversee platform activity. Sampled code confirms several cart, order, rating, store-application, and dashboard interactions with API routes. Other documented capabilities are represented at their existing route-directory level; their internal wiring was not sampled.

Main entry points: [`src/db.ts`](https://github.com/assiddique96/dropcart/blob/main/src/db.ts) (Application Database), [`components/OrderSummary.jsx`](https://github.com/assiddique96/dropcart/blob/main/components/OrderSummary.jsx) (Checkout Summary), [`app/api/store`](https://github.com/assiddique96/dropcart/tree/main/app/api/store) (Store Services), [`app/(public)/cart/page.jsx`](https://github.com/assiddique96/dropcart/blob/main/app/(public)/cart/page.jsx) (Shopping Cart)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Commerce"]
  node_storefront["Storefront"]
  node_cart_page["Shopping Cart<br/>[page.jsx]"]
  node_order_summary["Checkout Summary<br/>[OrderSummary.jsx]"]
end

subgraph group_seller["Seller Operations"]
  node_store_application["Store Application<br/>[page.jsx]"]
  node_seller_dashboard["Seller Dashboard<br/>[page.jsx]"]
  node_seller_tools["Seller Management"]
end

subgraph group_admin["Platform Administration"]
  node_admin_dashboard["Admin Dashboard<br/>[page.jsx]"]
  node_admin_tools["Admin Management"]
end

subgraph group_backend["Commerce Services"]
  node_product_api["Product Catalog<br/>[route.js]"]
  node_cart_state["Cart State<br/>[cartSlice.js]"]
  node_address_api["Address Service<br/>[route.js]"]
  node_coupon_api["Coupon Verification<br/>[route.js]"]
  node_orders_api["Order Service<br/>[route.js]"]
  node_rating_api["Ratings Service<br/>[route.js]"]
  node_store_api["Store Services"]
  node_admin_api["Admin Services"]
  node_database[("Application Database<br/>[db.ts]")]
end

node_customer(("Customer"))
node_seller(("Seller"))
node_admin(("Administrator"))

node_customer -->|"browses"| node_storefront
node_storefront -.->|"loads catalog"| node_product_api
node_customer -->|"shops"| node_cart_page
node_cart_page -->|"updates"| node_cart_state
node_cart_page -->|"renders"| node_order_summary
node_order_summary -.->|"manages address"| node_address_api
node_order_summary -.->|"checks coupon"| node_coupon_api
node_order_summary -.->|"submits order"| node_orders_api
node_product_api -->|"queries products"| node_database
node_orders_api -->|"reads and writes"| node_database
node_address_api -->|"reads and writes"| node_database
node_coupon_api -->|"checks coupon"| node_database
node_rating_api -->|"reads and writes"| node_database
node_customer -.->|"rates purchases"| node_rating_api
node_seller -->|"applies"| node_store_application
node_store_application -->|"checks and submits"| node_store_api
node_seller -->|"views performance"| node_seller_dashboard
node_seller_dashboard -->|"fetches metrics"| node_store_api
node_seller -->|"manages store"| node_seller_tools
node_seller_tools -.->|"uses services"| node_store_api
node_admin -->|"oversees platform"| node_admin_dashboard
node_admin_dashboard -->|"fetches metrics"| node_admin_api
node_admin -->|"manages vendors"| node_admin_tools
node_admin_tools -.->|"uses services"| node_admin_api
node_store_api -.->|"accesses records"| node_database
node_admin_api -.->|"accesses records"| node_database

click node_storefront "https://github.com/assiddique96/dropcart/tree/main/app/(public)"
click node_product_api "https://github.com/assiddique96/dropcart/blob/main/app/api/products/route.js"
click node_cart_page "https://github.com/assiddique96/dropcart/blob/main/app/(public)/cart/page.jsx"
click node_cart_state "https://github.com/assiddique96/dropcart/blob/main/lib/features/cart/cartSlice.js"
click node_order_summary "https://github.com/assiddique96/dropcart/blob/main/components/OrderSummary.jsx"
click node_address_api "https://github.com/assiddique96/dropcart/blob/main/app/api/address/route.js"
click node_coupon_api "https://github.com/assiddique96/dropcart/blob/main/app/api/coupon/route.js"
click node_orders_api "https://github.com/assiddique96/dropcart/blob/main/app/api/orders/route.js"
click node_rating_api "https://github.com/assiddique96/dropcart/blob/main/app/api/rating/route.js"
click node_store_application "https://github.com/assiddique96/dropcart/blob/main/app/(public)/create-store/page.jsx"
click node_seller_dashboard "https://github.com/assiddique96/dropcart/blob/main/app/store/page.jsx"
click node_seller_tools "https://github.com/assiddique96/dropcart/tree/main/app/store"
click node_admin_dashboard "https://github.com/assiddique96/dropcart/blob/main/app/admin/page.jsx"
click node_admin_tools "https://github.com/assiddique96/dropcart/tree/main/app/admin"
click node_store_api "https://github.com/assiddique96/dropcart/tree/main/app/api/store"
click node_admin_api "https://github.com/assiddique96/dropcart/tree/main/app/api/admin"
click node_database "https://github.com/assiddique96/dropcart/blob/main/src/db.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_storefront,node_cart_page,node_order_summary toneBlue
class node_store_application,node_seller_dashboard,node_seller_tools toneAmber
class node_admin_dashboard,node_admin_tools toneMint
class node_product_api,node_cart_state,node_address_api,node_coupon_api,node_orders_api,node_rating_api,node_store_api,node_admin_api,node_database toneRose
class node_customer,node_seller,node_admin toneIndigo
```

## Components

### Customer Commerce

- [Storefront](https://github.com/assiddique96/dropcart/tree/main/app/(public)): `app/(public)`
- [Shopping Cart](https://github.com/assiddique96/dropcart/blob/main/app/(public)/cart/page.jsx): `app/(public)/cart/page.jsx`
- [Checkout Summary](https://github.com/assiddique96/dropcart/blob/main/components/OrderSummary.jsx): `components/OrderSummary.jsx`

### Seller Operations

- [Store Application](https://github.com/assiddique96/dropcart/blob/main/app/(public)/create-store/page.jsx): `app/(public)/create-store/page.jsx`
- [Seller Dashboard](https://github.com/assiddique96/dropcart/blob/main/app/store/page.jsx): `app/store/page.jsx`
- [Seller Management](https://github.com/assiddique96/dropcart/tree/main/app/store): `app/store`

### Platform Administration

- [Admin Dashboard](https://github.com/assiddique96/dropcart/blob/main/app/admin/page.jsx): `app/admin/page.jsx`
- [Admin Management](https://github.com/assiddique96/dropcart/tree/main/app/admin): `app/admin`

### Commerce Services

- [Product Catalog](https://github.com/assiddique96/dropcart/blob/main/app/api/products/route.js): `app/api/products/route.js`
- [Cart State](https://github.com/assiddique96/dropcart/blob/main/lib/features/cart/cartSlice.js): `lib/features/cart/cartSlice.js`
- [Address Service](https://github.com/assiddique96/dropcart/blob/main/app/api/address/route.js): `app/api/address/route.js`
- [Coupon Verification](https://github.com/assiddique96/dropcart/blob/main/app/api/coupon/route.js): `app/api/coupon/route.js`
- [Order Service](https://github.com/assiddique96/dropcart/blob/main/app/api/orders/route.js): `app/api/orders/route.js`
- [Ratings Service](https://github.com/assiddique96/dropcart/blob/main/app/api/rating/route.js): `app/api/rating/route.js`
- [Store Services](https://github.com/assiddique96/dropcart/tree/main/app/api/store): `app/api/store`
- [Admin Services](https://github.com/assiddique96/dropcart/tree/main/app/api/admin): `app/api/admin`
- [Application Database](https://github.com/assiddique96/dropcart/blob/main/src/db.ts): `src/db.ts`

### Other components

- **Customer**
- **Seller**
- **Administrator**

## Connections

- Customer → Storefront: browses
- Storefront → Product Catalog: loads catalog
- Customer → Shopping Cart: shops
- Shopping Cart → Cart State: updates (evidence: `app/(public)/cart/page.jsx`)
- Shopping Cart → Checkout Summary: renders (evidence: `app/(public)/cart/page.jsx`)
- Checkout Summary → Address Service: manages address
- Checkout Summary → Coupon Verification: checks coupon
- Checkout Summary → Order Service: submits order
- Product Catalog → Application Database: queries products (evidence: `app/api/products/route.js`)
- Order Service → Application Database: reads and writes (evidence: `app/api/orders/route.js`)
- Address Service → Application Database: reads and writes (evidence: `app/api/address/route.js`)
- Coupon Verification → Application Database: checks coupon (evidence: `app/api/coupon/route.js`)
- Ratings Service → Application Database: reads and writes (evidence: `app/api/rating/route.js`)
- Customer → Ratings Service: rates purchases
- Seller → Store Application: applies
- Store Application → Store Services: checks and submits (evidence: `app/(public)/create-store/page.jsx`)
- Seller → Seller Dashboard: views performance
- Seller Dashboard → Store Services: fetches metrics (evidence: `app/store/page.jsx`)
- Seller → Seller Management: manages store
- Seller Management → Store Services: uses services
- Administrator → Admin Dashboard: oversees platform
- Admin Dashboard → Admin Services: fetches metrics (evidence: `app/admin/page.jsx`)
- Administrator → Admin Management: manages vendors
- Admin Management → Admin Services: uses services
- Store Services → Application Database: accesses records
- Admin Services → Application Database: accesses records
