# ibrahimallmamun/dostishop architecture

> Architecture diagram of the GitHub repository ibrahimallmamun/dostishop, 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/ibrahimallmamun/dostishop
- Repository: https://github.com/ibrahimallmamun/dostishop

## Overview

Boutique Marketplace is a multi-vendor commerce product: customers browse and buy across shops as guests, while vendors fulfil shop-scoped orders and administrators manage marketplace operations. The graph follows the documented storefront-to-API-to-order workflow and includes dashboard operations, reviews, and shared persistence. Source excerpts confirm product and order handling, review moderation, and API routing; other README- or tree-backed capabilities are represented at their exact enclosing paths. Unshown subsystem internals and cross-app HTTP calls are not asserted.

Main entry points: [`dashboard/src/App.tsx`](https://github.com/ibrahimallmamun/dostishop/blob/main/dashboard/src/App.tsx) (Admin and vendor panel), [`api/src/controllers/order.controller.ts`](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/order.controller.ts) (Checkout and orders), [`api/src/app.ts`](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/app.ts) (API application), [`api/src/routes/order.routes.ts`](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/routes/order.routes.ts) (Order routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer storefront"]
  node_store["Storefront"]
  node_cart["Cart and checkout<br/>[page.tsx]"]
  node_track["Order tracking<br/>[page.tsx]"]
  node_reviewsui["Review submission<br/>[ReviewForm.tsx]"]
end

subgraph group_commerce["Commerce API"]
  node_api["API application<br/>[app.ts]"]
  node_productroutes["Product routes<br/>[product.routes.ts]"]
  node_products["Product catalog"]
  node_orderroutes["Order routes<br/>[order.routes.ts]"]
  node_orders["Checkout and orders"]
  node_reviewroutes["Review routes<br/>[review.routes.ts]"]
  node_reviews["Review moderation"]
end

subgraph group_operations["Marketplace operations"]
  node_dashboard["Admin and vendor panel<br/>[App.tsx]"]
  node_shopops["Shops and categories<br/>[index.ts]"]
  node_analytics["Analytics and reports"]
  node_payouts["Vendor payouts"]
  node_content["Marketplace content"]
  node_notifications["Notifications<br/>[notify.service.ts]"]
end

subgraph group_foundation["API foundation"]
  node_db[("PostgreSQL data<br/>[prisma.ts]")]
  node_auth["Authentication and roles<br/>[auth.ts]"]
  node_uploads["Media uploads<br/>[upload.service.ts]"]
  node_coupon["Coupon rules<br/>[coupon.service.ts]"]
end

node_visitor(("Guest customer"))

node_visitor -->|"browses"| node_store
node_store -.->|"requests catalog"| node_products
node_visitor -->|"checks out"| node_cart
node_cart -.->|"submits checkout"| node_orders
node_visitor -->|"tracks order"| node_track
node_visitor -.->|"submits review"| node_reviewsui
node_api -->|"mounts API routes"| node_productroutes
node_productroutes -->|"dispatches"| node_products
node_api -->|"mounts API routes"| node_orderroutes
node_orderroutes -->|"dispatches"| node_orders
node_api -->|"mounts API routes"| node_reviewroutes
node_reviewroutes -->|"dispatches"| node_reviews
node_products -->|"reads and writes"| node_db
node_orders -->|"reads and writes"| node_db
node_orders -->|"checks discounts"| node_coupon
node_orders -->|"sends order alerts"| node_notifications
node_reviews -->|"reads and writes"| node_db
node_dashboard -.->|"uses API"| node_api
node_dashboard -.->|"manages marketplace"| node_shopops
node_dashboard -.->|"views metrics"| node_analytics
node_dashboard -.->|"manages payouts"| node_payouts
node_dashboard -.->|"manages content"| node_content
node_dashboard -.->|"views alerts"| node_notifications
node_dashboard -.->|"manages media"| node_uploads
node_orderroutes -->|"authenticates vendors"| node_auth
node_reviewroutes -->|"protects moderation"| node_auth

click node_store "https://github.com/ibrahimallmamun/dostishop/tree/main/store-frontend/src/app"
click node_cart "https://github.com/ibrahimallmamun/dostishop/blob/main/store-frontend/src/app/checkout/page.tsx"
click node_track "https://github.com/ibrahimallmamun/dostishop/blob/main/store-frontend/src/app/track/page.tsx"
click node_reviewsui "https://github.com/ibrahimallmamun/dostishop/blob/main/store-frontend/src/components/ReviewForm.tsx"
click node_api "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/app.ts"
click node_productroutes "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/routes/product.routes.ts"
click node_products "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/product.controller.ts"
click node_orderroutes "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/routes/order.routes.ts"
click node_orders "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/order.controller.ts"
click node_reviewroutes "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/routes/review.routes.ts"
click node_reviews "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/review.controller.ts"
click node_dashboard "https://github.com/ibrahimallmamun/dostishop/blob/main/dashboard/src/App.tsx"
click node_shopops "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/routes/index.ts"
click node_analytics "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/analytics.controller.ts"
click node_payouts "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/payout.controller.ts"
click node_content "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/content.controller.ts"
click node_notifications "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/services/notify.service.ts"
click node_db "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/lib/prisma.ts"
click node_auth "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/middleware/auth.ts"
click node_uploads "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/services/upload.service.ts"
click node_coupon "https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/services/coupon.service.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_store,node_cart,node_track,node_reviewsui toneBlue
class node_api,node_productroutes,node_products,node_orderroutes,node_orders,node_reviewroutes,node_reviews toneAmber
class node_dashboard,node_shopops,node_analytics,node_payouts,node_content,node_notifications toneMint
class node_db,node_auth,node_uploads,node_coupon toneRose
class node_visitor toneIndigo
```

## Components

### Customer storefront

- [Storefront](https://github.com/ibrahimallmamun/dostishop/tree/main/store-frontend/src/app): `store-frontend/src/app`
- [Cart and checkout](https://github.com/ibrahimallmamun/dostishop/blob/main/store-frontend/src/app/checkout/page.tsx): `store-frontend/src/app/checkout/page.tsx`
- [Order tracking](https://github.com/ibrahimallmamun/dostishop/blob/main/store-frontend/src/app/track/page.tsx): `store-frontend/src/app/track/page.tsx`
- [Review submission](https://github.com/ibrahimallmamun/dostishop/blob/main/store-frontend/src/components/ReviewForm.tsx): `store-frontend/src/components/ReviewForm.tsx`

### Commerce API

- [API application](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/app.ts): `api/src/app.ts`
- [Product routes](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/routes/product.routes.ts): `api/src/routes/product.routes.ts`
- [Product catalog](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/product.controller.ts): `api/src/controllers/product.controller.ts`
- [Order routes](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/routes/order.routes.ts): `api/src/routes/order.routes.ts`
- [Checkout and orders](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/order.controller.ts): `api/src/controllers/order.controller.ts`
- [Review routes](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/routes/review.routes.ts): `api/src/routes/review.routes.ts`
- [Review moderation](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/review.controller.ts): `api/src/controllers/review.controller.ts`

### Marketplace operations

- [Admin and vendor panel](https://github.com/ibrahimallmamun/dostishop/blob/main/dashboard/src/App.tsx): `dashboard/src/App.tsx`
- [Shops and categories](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/routes/index.ts): `api/src/routes/index.ts`
- [Analytics and reports](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/analytics.controller.ts): `api/src/controllers/analytics.controller.ts`
- [Vendor payouts](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/payout.controller.ts): `api/src/controllers/payout.controller.ts`
- [Marketplace content](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/controllers/content.controller.ts): `api/src/controllers/content.controller.ts`
- [Notifications](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/services/notify.service.ts): `api/src/services/notify.service.ts`

### API foundation

- [PostgreSQL data](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/lib/prisma.ts): `api/src/lib/prisma.ts`
- [Authentication and roles](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/middleware/auth.ts): `api/src/middleware/auth.ts`
- [Media uploads](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/services/upload.service.ts): `api/src/services/upload.service.ts`
- [Coupon rules](https://github.com/ibrahimallmamun/dostishop/blob/main/api/src/services/coupon.service.ts): `api/src/services/coupon.service.ts`

### Other components

- **Guest customer**

## Connections

- Guest customer → Storefront: browses
- Storefront → Product catalog: requests catalog
- Guest customer → Cart and checkout: checks out
- Cart and checkout → Checkout and orders: submits checkout
- Guest customer → Order tracking: tracks order
- Guest customer → Review submission: submits review
- API application → Product routes: mounts API routes (evidence: `api/src/app.ts`)
- Product routes → Product catalog: dispatches (evidence: `api/src/routes/product.routes.ts`)
- API application → Order routes: mounts API routes
- Order routes → Checkout and orders: dispatches (evidence: `api/src/routes/order.routes.ts`)
- API application → Review routes: mounts API routes
- Review routes → Review moderation: dispatches (evidence: `api/src/routes/review.routes.ts`)
- Product catalog → PostgreSQL data: reads and writes (evidence: `api/src/controllers/product.controller.ts`)
- Checkout and orders → PostgreSQL data: reads and writes (evidence: `api/src/controllers/order.controller.ts`)
- Checkout and orders → Coupon rules: checks discounts (evidence: `api/src/controllers/order.controller.ts`)
- Checkout and orders → Notifications: sends order alerts (evidence: `api/src/controllers/order.controller.ts`)
- Review moderation → PostgreSQL data: reads and writes (evidence: `api/src/controllers/review.controller.ts`)
- Admin and vendor panel → API application: uses API
- Admin and vendor panel → Shops and categories: manages marketplace
- Admin and vendor panel → Analytics and reports: views metrics
- Admin and vendor panel → Vendor payouts: manages payouts
- Admin and vendor panel → Marketplace content: manages content
- Admin and vendor panel → Notifications: views alerts
- Admin and vendor panel → Media uploads: manages media
- Order routes → Authentication and roles: authenticates vendors (evidence: `api/src/routes/order.routes.ts`)
- Review routes → Authentication and roles: protects moderation (evidence: `api/src/routes/review.routes.ts`)
