# benjamin-future/big_kenya architecture

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

- Interactive diagram: https://gitdiagram.com/benjamin-future/big_kenya
- Repository: https://github.com/benjamin-future/big_kenya

## Overview

This is a Vue storefront and marketplace frontend branded SwiftCart, with customer shopping and ordering, vendor workflows, delivery views, and administrator tools. The main customer flow is routed through product browsing, cart, checkout, and order pages; authentication and API services support those screens. Vendor and admin capabilities form distinct management branches. The README describes only a Vue/Vite starter, so product capabilities are inferred from the source tree and indexed references; several component-to-store relationships are supported by the index rather than inspected implementation excerpts.

Main entry points: [`src/router/index.js`](https://github.com/benjamin-future/big_kenya/blob/main/src/router/index.js) (Route and access control), [`src/services/api.js`](https://github.com/benjamin-future/big_kenya/blob/main/src/services/api.js) (HTTP and payment API), [`src/components/AdminDashboard.vue`](https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminDashboard.vue) (Admin dashboard), [`src/components/VendorDashboard.vue`](https://github.com/benjamin-future/big_kenya/blob/main/src/components/VendorDashboard.vue) (Vendor dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shop["Customer shopping"]
  node_products["Product browsing"]
  node_product_detail["Product details"]
  node_cart["Cart<br/>[useCartStore.js]"]
  node_cart_page["Cart page<br/>[CartPage.vue]"]
  node_checkout["Checkout<br/>[CheckoutPage.vue]"]
  node_orders["Customer orders<br/>[OrdersPage.vue]"]
  node_order_store["Order state<br/>[useOrderStore.js]"]
  node_order_success["Order confirmation"]
  node_navbar["Navigation<br/>[NavBar.vue]"]
  node_footer["Footer and newsletter<br/>[Footer.vue]"]
end

subgraph group_identity["Identity and API"]
  node_router["Route and access control<br/>[index.js]"]
  node_auth["Authentication state<br/>[useAuthStore.js]"]
  node_auth_service["Authentication service<br/>[auth_service.js]"]
  node_api["HTTP and payment API<br/>[api.js]"]
end

subgraph group_operations["Marketplace operations"]
  node_admin_dashboard["Admin dashboard<br/>[AdminDashboard.vue]"]
  node_admin_store["Admin state<br/>[useAdminStore.js]"]
  node_admin_products["Product administration<br/>[AdminProducts.vue]"]
  node_admin_orders["Order administration<br/>[AdminOrders.vue]"]
  node_admin_users["User administration<br/>[AdminUsers.vue]"]
  node_admin_wallet["Wallet administration<br/>[AdminWallet.vue]"]
  node_vendor_dashboard["Vendor dashboard"]
  node_vendor_request["Become a vendor"]
  node_vendor_requests["Vendor requests<br/>[VendorRequests.vue]"]
  node_vendors["Vendor directory<br/>[Vendors.vue]"]
end

subgraph group_delivery["Delivery"]
  node_admin_deliveries["Delivery administration"]
  node_admin_riders["Rider administration<br/>[AdminRiders.vue]"]
  node_delivery_page["Delivery tracking<br/>[DeliveriesPage.vue]"]
  node_delivery_service["Delivery service<br/>[deliveries.js]"]
  node_delivery_order["Order delivery"]
end

node_shopper(("Shopper"))
node_backend{{"Marketplace backend"}}

node_shopper -->|"opens pages"| node_router
node_router -->|"routes to"| node_products
node_router -->|"routes to"| node_product_detail
node_router -->|"routes to"| node_cart_page
node_router -->|"routes to"| node_checkout
node_router -->|"routes to"| node_order_success
node_router -->|"routes to"| node_orders
node_router -->|"routes to"| node_delivery_page
node_router -->|"checks access"| node_auth
node_products -->|"updates cart"| node_cart
node_product_detail -->|"updates cart"| node_cart
node_cart_page -->|"uses cart"| node_cart
node_checkout -->|"reads cart"| node_cart
node_checkout -->|"uses orders"| node_order_store
node_orders -->|"uses orders"| node_order_store
node_auth_service -->|"calls"| node_api
node_auth_service -.->|"updates auth"| node_auth
node_navbar -->|"uses auth"| node_auth_service
node_order_store -->|"requests data"| node_api
node_api -->|"sends requests"| node_backend
node_admin_dashboard -->|"shows section"| node_admin_products
node_admin_dashboard -->|"shows section"| node_admin_orders
node_admin_dashboard -->|"shows section"| node_admin_users
node_admin_dashboard -->|"shows section"| node_admin_wallet
node_admin_dashboard -->|"shows section"| node_admin_deliveries
node_admin_dashboard -->|"shows section"| node_admin_riders
node_admin_users -->|"uses state"| node_admin_store
node_admin_orders -->|"requests data"| node_api
node_admin_products -->|"requests data"| node_api
node_admin_wallet -->|"requests data"| node_api
node_vendor_dashboard -->|"shows section"| node_admin_products
node_vendor_dashboard -->|"shows section"| node_admin_orders
node_vendor_dashboard -->|"shows section"| node_admin_wallet
node_vendor_dashboard -->|"shows section"| node_admin_deliveries
node_vendor_dashboard -->|"shows section"| node_admin_riders
node_delivery_page -->|"requests data"| node_api
node_delivery_order -->|"uses service"| node_delivery_service
node_delivery_service -->|"calls"| node_api
node_footer -.->|"newsletter feedback"| node_shopper

click node_router "https://github.com/benjamin-future/big_kenya/blob/main/src/router/index.js"
click node_products "https://github.com/benjamin-future/big_kenya/blob/main/src/components/ProductListPage.vue"
click node_product_detail "https://github.com/benjamin-future/big_kenya/blob/main/src/components/ProductDetailPage.vue"
click node_cart "https://github.com/benjamin-future/big_kenya/blob/main/src/stores/useCartStore.js"
click node_cart_page "https://github.com/benjamin-future/big_kenya/blob/main/src/components/CartPage.vue"
click node_checkout "https://github.com/benjamin-future/big_kenya/blob/main/src/components/CheckoutPage.vue"
click node_orders "https://github.com/benjamin-future/big_kenya/blob/main/src/components/OrdersPage.vue"
click node_order_store "https://github.com/benjamin-future/big_kenya/blob/main/src/stores/useOrderStore.js"
click node_order_success "https://github.com/benjamin-future/big_kenya/blob/main/src/components/OrderSuccessPage.vue"
click node_auth "https://github.com/benjamin-future/big_kenya/blob/main/src/stores/useAuthStore.js"
click node_auth_service "https://github.com/benjamin-future/big_kenya/blob/main/src/services/auth_service.js"
click node_api "https://github.com/benjamin-future/big_kenya/blob/main/src/services/api.js"
click node_admin_dashboard "https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminDashboard.vue"
click node_admin_store "https://github.com/benjamin-future/big_kenya/blob/main/src/stores/useAdminStore.js"
click node_admin_products "https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminProducts.vue"
click node_admin_orders "https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminOrders.vue"
click node_admin_users "https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminUsers.vue"
click node_admin_wallet "https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminWallet.vue"
click node_admin_deliveries "https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminDeliveries.vue"
click node_admin_riders "https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminRiders.vue"
click node_delivery_page "https://github.com/benjamin-future/big_kenya/blob/main/src/components/DeliveriesPage.vue"
click node_delivery_service "https://github.com/benjamin-future/big_kenya/blob/main/src/services/deliveries.js"
click node_delivery_order "https://github.com/benjamin-future/big_kenya/blob/main/src/components/OrderDeliveryPage.vue"
click node_vendor_dashboard "https://github.com/benjamin-future/big_kenya/blob/main/src/components/VendorDashboard.vue"
click node_vendor_request "https://github.com/benjamin-future/big_kenya/blob/main/src/components/BecomeVendorPage.vue"
click node_vendor_requests "https://github.com/benjamin-future/big_kenya/blob/main/src/components/VendorRequests.vue"
click node_vendors "https://github.com/benjamin-future/big_kenya/blob/main/src/components/Vendors.vue"
click node_navbar "https://github.com/benjamin-future/big_kenya/blob/main/src/components/NavBar.vue"
click node_footer "https://github.com/benjamin-future/big_kenya/blob/main/src/components/Footer.vue"

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_products,node_product_detail,node_cart,node_cart_page,node_checkout,node_orders,node_order_store,node_order_success,node_navbar,node_footer toneBlue
class node_router,node_auth,node_auth_service,node_api toneAmber
class node_admin_dashboard,node_admin_store,node_admin_products,node_admin_orders,node_admin_users,node_admin_wallet,node_vendor_dashboard,node_vendor_request,node_vendor_requests,node_vendors toneMint
class node_admin_deliveries,node_admin_riders,node_delivery_page,node_delivery_service,node_delivery_order toneRose
class node_shopper,node_backend toneIndigo
```

## Components

### Customer shopping

- [Product browsing](https://github.com/benjamin-future/big_kenya/blob/main/src/components/ProductListPage.vue): `src/components/ProductListPage.vue`
- [Product details](https://github.com/benjamin-future/big_kenya/blob/main/src/components/ProductDetailPage.vue): `src/components/ProductDetailPage.vue`
- [Cart](https://github.com/benjamin-future/big_kenya/blob/main/src/stores/useCartStore.js): `src/stores/useCartStore.js`
- [Cart page](https://github.com/benjamin-future/big_kenya/blob/main/src/components/CartPage.vue): `src/components/CartPage.vue`
- [Checkout](https://github.com/benjamin-future/big_kenya/blob/main/src/components/CheckoutPage.vue): `src/components/CheckoutPage.vue`
- [Customer orders](https://github.com/benjamin-future/big_kenya/blob/main/src/components/OrdersPage.vue): `src/components/OrdersPage.vue`
- [Order state](https://github.com/benjamin-future/big_kenya/blob/main/src/stores/useOrderStore.js): `src/stores/useOrderStore.js`
- [Order confirmation](https://github.com/benjamin-future/big_kenya/blob/main/src/components/OrderSuccessPage.vue): `src/components/OrderSuccessPage.vue`
- [Navigation](https://github.com/benjamin-future/big_kenya/blob/main/src/components/NavBar.vue): `src/components/NavBar.vue`
- [Footer and newsletter](https://github.com/benjamin-future/big_kenya/blob/main/src/components/Footer.vue): `src/components/Footer.vue`

### Identity and API

- [Route and access control](https://github.com/benjamin-future/big_kenya/blob/main/src/router/index.js): `src/router/index.js`
- [Authentication state](https://github.com/benjamin-future/big_kenya/blob/main/src/stores/useAuthStore.js): `src/stores/useAuthStore.js`
- [Authentication service](https://github.com/benjamin-future/big_kenya/blob/main/src/services/auth_service.js): `src/services/auth_service.js`
- [HTTP and payment API](https://github.com/benjamin-future/big_kenya/blob/main/src/services/api.js): `src/services/api.js`

### Marketplace operations

- [Admin dashboard](https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminDashboard.vue): `src/components/AdminDashboard.vue`
- [Admin state](https://github.com/benjamin-future/big_kenya/blob/main/src/stores/useAdminStore.js): `src/stores/useAdminStore.js`
- [Product administration](https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminProducts.vue): `src/components/AdminProducts.vue`
- [Order administration](https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminOrders.vue): `src/components/AdminOrders.vue`
- [User administration](https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminUsers.vue): `src/components/AdminUsers.vue`
- [Wallet administration](https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminWallet.vue): `src/components/AdminWallet.vue`
- [Vendor dashboard](https://github.com/benjamin-future/big_kenya/blob/main/src/components/VendorDashboard.vue): `src/components/VendorDashboard.vue`
- [Become a vendor](https://github.com/benjamin-future/big_kenya/blob/main/src/components/BecomeVendorPage.vue): `src/components/BecomeVendorPage.vue`
- [Vendor requests](https://github.com/benjamin-future/big_kenya/blob/main/src/components/VendorRequests.vue): `src/components/VendorRequests.vue`
- [Vendor directory](https://github.com/benjamin-future/big_kenya/blob/main/src/components/Vendors.vue): `src/components/Vendors.vue`

### Delivery

- [Delivery administration](https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminDeliveries.vue): `src/components/AdminDeliveries.vue`
- [Rider administration](https://github.com/benjamin-future/big_kenya/blob/main/src/components/AdminRiders.vue): `src/components/AdminRiders.vue`
- [Delivery tracking](https://github.com/benjamin-future/big_kenya/blob/main/src/components/DeliveriesPage.vue): `src/components/DeliveriesPage.vue`
- [Delivery service](https://github.com/benjamin-future/big_kenya/blob/main/src/services/deliveries.js): `src/services/deliveries.js`
- [Order delivery](https://github.com/benjamin-future/big_kenya/blob/main/src/components/OrderDeliveryPage.vue): `src/components/OrderDeliveryPage.vue`

### Other components

- **Shopper**
- **Marketplace backend**

## Connections

- Shopper → Route and access control: opens pages (evidence: `src/router/index.js`)
- Route and access control → Product browsing: routes to (evidence: `src/router/index.js`)
- Route and access control → Product details: routes to (evidence: `src/router/index.js`)
- Route and access control → Cart page: routes to (evidence: `src/router/index.js`)
- Route and access control → Checkout: routes to (evidence: `src/router/index.js`)
- Route and access control → Order confirmation: routes to (evidence: `src/router/index.js`)
- Route and access control → Customer orders: routes to (evidence: `src/router/index.js`)
- Route and access control → Delivery tracking: routes to (evidence: `src/router/index.js`)
- Route and access control → Authentication state: checks access (evidence: `src/router/index.js`)
- Product browsing → Cart: updates cart (evidence: `src/components/ProductListPage.vue`)
- Product details → Cart: updates cart (evidence: `src/components/ProductDetailPage.vue`)
- Cart page → Cart: uses cart (evidence: `src/components/CartPage.vue`)
- Checkout → Cart: reads cart (evidence: `src/components/CheckoutPage.vue`)
- Checkout → Order state: uses orders (evidence: `src/components/CheckoutPage.vue`)
- Customer orders → Order state: uses orders (evidence: `src/components/OrdersPage.vue`)
- Authentication service → HTTP and payment API: calls (evidence: `src/services/auth_service.js`)
- Authentication service → Authentication state: updates auth
- Navigation → Authentication service: uses auth (evidence: `src/components/NavBar.vue`)
- Order state → HTTP and payment API: requests data (evidence: `src/stores/useOrderStore.js`)
- HTTP and payment API → Marketplace backend: sends requests (evidence: `src/services/api.js`)
- Admin dashboard → Product administration: shows section (evidence: `src/components/AdminDashboard.vue`)
- Admin dashboard → Order administration: shows section (evidence: `src/components/AdminDashboard.vue`)
- Admin dashboard → User administration: shows section (evidence: `src/components/AdminDashboard.vue`)
- Admin dashboard → Wallet administration: shows section (evidence: `src/components/AdminDashboard.vue`)
- Admin dashboard → Delivery administration: shows section (evidence: `src/components/AdminDashboard.vue`)
- Admin dashboard → Rider administration: shows section (evidence: `src/components/AdminDashboard.vue`)
- User administration → Admin state: uses state (evidence: `src/components/AdminUsers.vue`)
- Order administration → HTTP and payment API: requests data (evidence: `src/components/AdminOrders.vue`)
- Product administration → HTTP and payment API: requests data (evidence: `src/components/AdminProducts.vue`)
- Wallet administration → HTTP and payment API: requests data (evidence: `src/components/AdminWallet.vue`)
- Vendor dashboard → Product administration: shows section (evidence: `src/components/VendorDashboard.vue`)
- Vendor dashboard → Order administration: shows section (evidence: `src/components/VendorDashboard.vue`)
- Vendor dashboard → Wallet administration: shows section (evidence: `src/components/VendorDashboard.vue`)
- Vendor dashboard → Delivery administration: shows section (evidence: `src/components/VendorDashboard.vue`)
- Vendor dashboard → Rider administration: shows section (evidence: `src/components/VendorDashboard.vue`)
- Delivery tracking → HTTP and payment API: requests data (evidence: `src/components/DeliveriesPage.vue`)
- Order delivery → Delivery service: uses service (evidence: `src/components/OrderDeliveryPage.vue`)
- Delivery service → HTTP and payment API: calls (evidence: `src/services/deliveries.js`)
- Footer and newsletter → Shopper: newsletter feedback
