# centmarde/vincare-pharma architecture

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

- Interactive diagram: https://gitdiagram.com/centmarde/vincare-pharma
- Repository: https://github.com/centmarde/vincare-pharma

## Overview

Vincare-Pharma is a Vue web app for coordinating pharmaceutical procurement, inventory, distribution, sales, and finance. The main user journey is authenticated access to role-specific operations: procurement requests and sourcing, inventory management, fulfillment or sales, and financial recording and reporting. The graph also preserves ethical orders, executive oversight, and audit logs as distinct product areas. Source evidence is partial: documented routes and imports support the shown links; broader subsystem connections are omitted where sampled files do not establish them.

Main entry points: [`src/router/router.ts`](https://github.com/centmarde/vincare-pharma/blob/rebase/src/router/router.ts) (Route dispatch), [`src/stores/productsData.ts`](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/productsData.ts) (Product data), [`src/lib/supabase.ts`](https://github.com/centmarde/vincare-pharma/blob/rebase/src/lib/supabase.ts) (Supabase services), [`src/stores/draftPRData.ts`](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/draftPRData.ts) (Requisition data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shell"]
  node_router["Route dispatch<br/>[router.ts]"]
  node_auth["Authentication<br/>[authUser.ts]"]
  node_landing["Landing content"]
  node_theme["Theme settings<br/>[useTheme.ts]"]
end

subgraph group_procurement["Procurement and inventory"]
  node_purchasing["Purchasing"]
  node_canvass["Supplier canvass<br/>[useCanvass.ts]"]
  node_draftpr["Requisition data<br/>[draftPRData.ts]"]
  node_suppliers["Supplier offers"]
  node_inventory["Product operations"]
  node_products["Product data<br/>[productsData.ts]"]
end

subgraph group_operations["Sales and fulfillment"]
  node_warehouse["Warehouse operations"]
  node_inhouse["In-house orders"]
  node_sales["Sales and POS"]
  node_ethical["Ethical orders"]
end

subgraph group_finance["Finance and oversight"]
  node_finance["Finance operations"]
  node_finance_data["Finance data<br/>[financeData.ts]"]
  node_gl["General ledger<br/>[glData.ts]"]
  node_executive["Executive dashboards"]
end

subgraph group_shared["Shared services"]
  node_logs["Audit logs<br/>[logsData.ts]"]
  node_customers["Customer data<br/>[customersData.ts]"]
  node_supabase[("Supabase services<br/>[supabase.ts]")]
  node_drafts["Form draft persistence<br/>[useFormDraft.ts]"]
end

node_user(("User"))

node_user -->|"navigates"| node_router
node_router -->|"routes to"| node_auth
node_router -->|"routes to"| node_purchasing
node_router -->|"routes to"| node_sales
node_router -->|"routes to"| node_inhouse
node_router -->|"routes to"| node_executive
node_auth -->|"authenticates with"| node_supabase
node_auth -->|"clears drafts"| node_drafts
node_landing -->|"initializes"| node_theme
node_canvass -->|"uses"| node_draftpr
node_canvass -->|"uses"| node_suppliers
node_inventory -->|"reads and updates"| node_products
node_inventory -->|"reads"| node_customers
node_inventory -->|"uses"| node_logs
node_products -->|"reads and writes"| node_supabase
node_draftpr -->|"reads and writes"| node_supabase
node_customers -->|"reads and writes"| node_supabase
node_finance_data -->|"reads and writes"| node_supabase
node_finance_data -->|"uses"| node_gl
node_ethical -.->|"uses"| node_customers
node_ethical -.->|"uses"| node_products
node_finance -.->|"uses"| node_finance_data
node_purchasing -.->|"uses"| node_draftpr
node_warehouse -.->|"uses"| node_products
node_sales -.->|"uses"| node_products
node_executive -.->|"reviews"| node_draftpr

click node_router "https://github.com/centmarde/vincare-pharma/blob/rebase/src/router/router.ts"
click node_auth "https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/authUser.ts"
click node_landing "https://github.com/centmarde/vincare-pharma/blob/rebase/src/controller/landingController.ts"
click node_theme "https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/useTheme.ts"
click node_purchasing "https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/purchasing"
click node_canvass "https://github.com/centmarde/vincare-pharma/blob/rebase/src/components/canvass/useCanvass.ts"
click node_draftpr "https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/draftPRData.ts"
click node_suppliers "https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/supplierOffersData.ts"
click node_inventory "https://github.com/centmarde/vincare-pharma/blob/rebase/src/components/products/composables/useProductsWidget.ts"
click node_products "https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/productsData.ts"
click node_warehouse "https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/warehouse"
click node_inhouse "https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/inhouse"
click node_sales "https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/sales"
click node_ethical "https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/ethical"
click node_finance "https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/finance"
click node_finance_data "https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/financeData.ts"
click node_gl "https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/glData.ts"
click node_executive "https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/executive"
click node_logs "https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/logsData.ts"
click node_customers "https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/customersData.ts"
click node_supabase "https://github.com/centmarde/vincare-pharma/blob/rebase/src/lib/supabase.ts"
click node_drafts "https://github.com/centmarde/vincare-pharma/blob/rebase/src/composables/useFormDraft.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_router,node_auth,node_landing,node_theme,node_user toneBlue
class node_purchasing,node_canvass,node_draftpr,node_suppliers,node_inventory,node_products toneAmber
class node_warehouse,node_inhouse,node_sales,node_ethical toneMint
class node_finance,node_finance_data,node_gl,node_executive toneRose
class node_logs,node_customers,node_supabase,node_drafts toneIndigo
```

## Components

### Access and shell

- [Route dispatch](https://github.com/centmarde/vincare-pharma/blob/rebase/src/router/router.ts): `src/router/router.ts`
- [Authentication](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/authUser.ts): `src/stores/authUser.ts`
- [Landing content](https://github.com/centmarde/vincare-pharma/blob/rebase/src/controller/landingController.ts): `src/controller/landingController.ts`
- [Theme settings](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/useTheme.ts): `src/stores/useTheme.ts`

### Procurement and inventory

- [Purchasing](https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/purchasing): `src/pages/purchasing`
- [Supplier canvass](https://github.com/centmarde/vincare-pharma/blob/rebase/src/components/canvass/useCanvass.ts): `src/components/canvass/useCanvass.ts`
- [Requisition data](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/draftPRData.ts): `src/stores/draftPRData.ts`
- [Supplier offers](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/supplierOffersData.ts): `src/stores/supplierOffersData.ts`
- [Product operations](https://github.com/centmarde/vincare-pharma/blob/rebase/src/components/products/composables/useProductsWidget.ts): `src/components/products/composables/useProductsWidget.ts`
- [Product data](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/productsData.ts): `src/stores/productsData.ts`

### Sales and fulfillment

- [Warehouse operations](https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/warehouse): `src/pages/warehouse`
- [In-house orders](https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/inhouse): `src/pages/inhouse`
- [Sales and POS](https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/sales): `src/pages/sales`
- [Ethical orders](https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/ethical): `src/pages/ethical`

### Finance and oversight

- [Finance operations](https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/finance): `src/pages/finance`
- [Finance data](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/financeData.ts): `src/stores/financeData.ts`
- [General ledger](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/glData.ts): `src/stores/glData.ts`
- [Executive dashboards](https://github.com/centmarde/vincare-pharma/tree/rebase/src/pages/executive): `src/pages/executive`

### Shared services

- [Audit logs](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/logsData.ts): `src/stores/logsData.ts`
- [Customer data](https://github.com/centmarde/vincare-pharma/blob/rebase/src/stores/customersData.ts): `src/stores/customersData.ts`
- [Supabase services](https://github.com/centmarde/vincare-pharma/blob/rebase/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Form draft persistence](https://github.com/centmarde/vincare-pharma/blob/rebase/src/composables/useFormDraft.ts): `src/composables/useFormDraft.ts`

### Other components

- **User**

## Connections

- User → Route dispatch: navigates (evidence: `src/router/router.ts`)
- Route dispatch → Authentication: routes to (evidence: `src/router/router.ts`)
- Route dispatch → Purchasing: routes to (evidence: `src/router/router.ts`)
- Route dispatch → Sales and POS: routes to (evidence: `src/router/router.ts`)
- Route dispatch → In-house orders: routes to (evidence: `src/router/router.ts`)
- Route dispatch → Executive dashboards: routes to (evidence: `src/router/router.ts`)
- Authentication → Supabase services: authenticates with (evidence: `src/stores/authUser.ts`)
- Authentication → Form draft persistence: clears drafts (evidence: `src/stores/authUser.ts`)
- Landing content → Theme settings: initializes (evidence: `src/controller/landingController.ts`)
- Supplier canvass → Requisition data: uses (evidence: `src/components/canvass/useCanvass.ts`)
- Supplier canvass → Supplier offers: uses (evidence: `src/components/canvass/useCanvass.ts`)
- Product operations → Product data: reads and updates (evidence: `src/components/products/composables/useProductsWidget.ts`)
- Product operations → Customer data: reads (evidence: `src/components/products/composables/useProductsWidget.ts`)
- Product operations → Audit logs: uses (evidence: `src/components/products/composables/useProductsWidget.ts`)
- Product data → Supabase services: reads and writes (evidence: `src/stores/productsData.ts`)
- Requisition data → Supabase services: reads and writes (evidence: `src/stores/draftPRData.ts`)
- Customer data → Supabase services: reads and writes (evidence: `src/stores/customersData.ts`)
- Finance data → Supabase services: reads and writes (evidence: `src/stores/financeData.ts`)
- Finance data → General ledger: uses (evidence: `src/stores/financeData.ts`)
- Ethical orders → Customer data: uses
- Ethical orders → Product data: uses (evidence: `src/pages/ethical/composables/useCreateOrder.ts`)
- Finance operations → Finance data: uses (evidence: `src/pages/finance/composables/useCashAccountsManager.ts`)
- Purchasing → Requisition data: uses (evidence: `src/pages/purchasing/composables/useDraftPRReview.ts`)
- Warehouse operations → Product data: uses
- Sales and POS → Product data: uses (evidence: `src/pages/sales/composables/usePos.ts`)
- Executive dashboards → Requisition data: reviews
