# vmjamtech/vpos1 architecture

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

## Overview

The repository is an Ionic/Angular point-of-sale app, despite the README describing a generic UI-template starter. Its main workflow routes signed-in users into the drawer-based POS, where they manage inventory, customers, transfers and sales; POS sales and receipt printing are also represented in the source tree. This map includes the documented-by-source dashboard/chat and offline-AI capabilities. Several domain screens and services are only identified by the tree, so their internal calls are not inferred.

Main entry points: [`src/app/drawer/drawer.routes.ts`](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/drawer.routes.ts) (Drawer navigation), [`src/app/drawer/dashboard/dashboard.component.ts`](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/dashboard/dashboard.component.ts) (Dashboard), [`src/main.ts`](https://github.com/vmjamtech/vpos1/blob/main/src/main.ts) (App bootstrap), [`src/app/drawer/sales/sales.component.ts`](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/sales/sales.component.ts) (Sales history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["App bootstrap<br/>[main.ts]"]
  node_routes["Route configuration<br/>[app.routes.ts]"]
  node_drawer_routes["Drawer navigation<br/>[drawer.routes.ts]"]
end

subgraph group_commerce["POS and commerce"]
  node_dashboard["Dashboard"]
  node_chat["Dashboard chat<br/>[chat.component.ts]"]
  node_pos["POS checkout"]
  node_purchase["Purchase summary"]
  node_sales["Sales history<br/>[sales.component.ts]"]
  node_sale_detail["Sale details"]
end

subgraph group_operations["Business operations"]
  node_customers["Customer management"]
  node_customer_filter["Transaction filter"]
  node_inventory["Inventory management"]
  node_dispose["Item disposal"]
  node_transfers["Stock transfers"]
  node_convert["Item conversion"]
  node_item_lists["Transfer item lists"]
  node_restock["Item restocking"]
  node_personnel["Personnel management"]
  node_cash["Petty cash logs"]
  node_users["User management<br/>[users.component.ts]"]
end

subgraph group_platform["Data and assistance"]
  node_ai["Offline AI queries"]
  node_seed["AI data seeding<br/>[ai-seed.service.ts]"]
  node_sqlite[("SQLite database<br/>[sqlite.service.ts]")]
  node_storage[("App preferences<br/>[storage.service.ts]")]
  node_printer["Receipt printing<br/>[printer.service.ts]"]
  node_imin["iMin printer adapter"]
end

node_user(("Staff user"))

node_user -->|"opens app"| node_routes
node_app -->|"registers routes"| node_routes
node_routes -->|"loads signed-in area"| node_drawer_routes
node_drawer_routes -->|"routes to"| node_dashboard
node_drawer_routes -.->|"routes to"| node_pos
node_drawer_routes -->|"routes to"| node_inventory
node_drawer_routes -->|"routes to"| node_transfers
node_drawer_routes -->|"routes to"| node_customers
node_drawer_routes -->|"routes to"| node_sales
node_drawer_routes -->|"routes to"| node_personnel
node_drawer_routes -->|"routes to"| node_cash
node_drawer_routes -->|"routes to"| node_users
node_dashboard -->|"opens"| node_chat
node_dashboard -->|"opens"| node_convert
node_dashboard -->|"opens"| node_restock
node_pos -->|"opens summary"| node_purchase
node_sales -->|"opens details"| node_sale_detail
node_sales -->|"uses filter"| node_customer_filter
node_customers -->|"uses filter"| node_customer_filter
node_transfers -->|"opens conversion"| node_convert
node_transfers -->|"opens restock"| node_restock
node_convert -->|"opens item lists"| node_item_lists
node_restock -->|"uses item lists"| node_item_lists
node_inventory -->|"opens disposal"| node_dispose
node_app -->|"initializes database"| node_sqlite
node_app -->|"seeds AI data"| node_seed
node_ai -->|"queries data"| node_sqlite
node_ai -->|"uses seed service"| node_seed
node_seed -->|"stores seed data"| node_sqlite
node_printer -->|"sends print commands"| node_imin

click node_app "https://github.com/vmjamtech/vpos1/blob/main/src/main.ts"
click node_routes "https://github.com/vmjamtech/vpos1/blob/main/src/app/app.routes.ts"
click node_drawer_routes "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/drawer.routes.ts"
click node_dashboard "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/dashboard/dashboard.component.ts"
click node_chat "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/dashboard/modal/chat/chat.component.ts"
click node_pos "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/pos-sales/pos-sales.component.ts"
click node_purchase "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/pos-sales/modals/purchase-summary/purchase-summary.component.ts"
click node_sales "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/sales/sales.component.ts"
click node_sale_detail "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/sales/modal/salesdetails/salesdetails.component.ts"
click node_customers "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/customers/customers.component.ts"
click node_customer_filter "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/customers/modal/customertransactions/modals/filtermodal/filtermodal.component.ts"
click node_inventory "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/inventory/inventory.component.ts"
click node_dispose "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/inventory/modals/disposeitems/disposeitems.component.ts"
click node_transfers "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/transfers/transfers.component.ts"
click node_convert "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/transfers/modals/itemconvertform/itemconvertform.component.ts"
click node_item_lists "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/transfers/modals/itemconvertform/modal/itemlists/itemlists.component.ts"
click node_restock "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/transfers/modals/itemrestockform/itemrestockform.component.ts"
click node_personnel "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/personels/personels.component.ts"
click node_cash "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/pettycashlogs/pettycashlogs.component.ts"
click node_users "https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/users/users.component.ts"
click node_ai "https://github.com/vmjamtech/vpos1/blob/main/src/app/services/offline-ai.service.ts"
click node_seed "https://github.com/vmjamtech/vpos1/blob/main/src/app/services/ai-seed.service.ts"
click node_sqlite "https://github.com/vmjamtech/vpos1/blob/main/src/app/services/sqlite.service.ts"
click node_storage "https://github.com/vmjamtech/vpos1/blob/main/src/app/services/storage.service.ts"
click node_printer "https://github.com/vmjamtech/vpos1/blob/main/src/app/services/printer.service.ts"
click node_imin "https://github.com/vmjamtech/vpos1/blob/main/src/app/services/imin-printer.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_app,node_routes,node_drawer_routes,node_user toneBlue
class node_dashboard,node_chat,node_pos,node_purchase,node_sales,node_sale_detail toneAmber
class node_customers,node_customer_filter,node_inventory,node_dispose,node_transfers,node_convert,node_item_lists,node_restock,node_personnel,node_cash,node_users toneMint
class node_ai,node_seed,node_sqlite,node_storage,node_printer,node_imin toneRose
```

## Components

### App shell

- [App bootstrap](https://github.com/vmjamtech/vpos1/blob/main/src/main.ts): `src/main.ts`
- [Route configuration](https://github.com/vmjamtech/vpos1/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Drawer navigation](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/drawer.routes.ts): `src/app/drawer/drawer.routes.ts`

### POS and commerce

- [Dashboard](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/dashboard/dashboard.component.ts): `src/app/drawer/dashboard/dashboard.component.ts`
- [Dashboard chat](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/dashboard/modal/chat/chat.component.ts): `src/app/drawer/dashboard/modal/chat/chat.component.ts`
- [POS checkout](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/pos-sales/pos-sales.component.ts): `src/app/drawer/pos-sales/pos-sales.component.ts`
- [Purchase summary](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/pos-sales/modals/purchase-summary/purchase-summary.component.ts): `src/app/drawer/pos-sales/modals/purchase-summary/purchase-summary.component.ts`
- [Sales history](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/sales/sales.component.ts): `src/app/drawer/sales/sales.component.ts`
- [Sale details](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/sales/modal/salesdetails/salesdetails.component.ts): `src/app/drawer/sales/modal/salesdetails/salesdetails.component.ts`

### Business operations

- [Customer management](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/customers/customers.component.ts): `src/app/drawer/customers/customers.component.ts`
- [Transaction filter](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/customers/modal/customertransactions/modals/filtermodal/filtermodal.component.ts): `src/app/drawer/customers/modal/customertransactions/modals/filtermodal/filtermodal.component.ts`
- [Inventory management](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/inventory/inventory.component.ts): `src/app/drawer/inventory/inventory.component.ts`
- [Item disposal](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/inventory/modals/disposeitems/disposeitems.component.ts): `src/app/drawer/inventory/modals/disposeitems/disposeitems.component.ts`
- [Stock transfers](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/transfers/transfers.component.ts): `src/app/drawer/transfers/transfers.component.ts`
- [Item conversion](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/transfers/modals/itemconvertform/itemconvertform.component.ts): `src/app/drawer/transfers/modals/itemconvertform/itemconvertform.component.ts`
- [Transfer item lists](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/transfers/modals/itemconvertform/modal/itemlists/itemlists.component.ts): `src/app/drawer/transfers/modals/itemconvertform/modal/itemlists/itemlists.component.ts`
- [Item restocking](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/transfers/modals/itemrestockform/itemrestockform.component.ts): `src/app/drawer/transfers/modals/itemrestockform/itemrestockform.component.ts`
- [Personnel management](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/personels/personels.component.ts): `src/app/drawer/personels/personels.component.ts`
- [Petty cash logs](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/pettycashlogs/pettycashlogs.component.ts): `src/app/drawer/pettycashlogs/pettycashlogs.component.ts`
- [User management](https://github.com/vmjamtech/vpos1/blob/main/src/app/drawer/users/users.component.ts): `src/app/drawer/users/users.component.ts`

### Data and assistance

- [Offline AI queries](https://github.com/vmjamtech/vpos1/blob/main/src/app/services/offline-ai.service.ts): `src/app/services/offline-ai.service.ts`
- [AI data seeding](https://github.com/vmjamtech/vpos1/blob/main/src/app/services/ai-seed.service.ts): `src/app/services/ai-seed.service.ts`
- [SQLite database](https://github.com/vmjamtech/vpos1/blob/main/src/app/services/sqlite.service.ts): `src/app/services/sqlite.service.ts`
- [App preferences](https://github.com/vmjamtech/vpos1/blob/main/src/app/services/storage.service.ts): `src/app/services/storage.service.ts`
- [Receipt printing](https://github.com/vmjamtech/vpos1/blob/main/src/app/services/printer.service.ts): `src/app/services/printer.service.ts`
- [iMin printer adapter](https://github.com/vmjamtech/vpos1/blob/main/src/app/services/imin-printer.service.ts): `src/app/services/imin-printer.service.ts`

### Other components

- **Staff user**

## Connections

- Staff user → Route configuration: opens app
- App bootstrap → Route configuration: registers routes (evidence: `src/main.ts`)
- Route configuration → Drawer navigation: loads signed-in area (evidence: `src/app/app.routes.ts`)
- Drawer navigation → Dashboard: routes to (evidence: `src/app/drawer/drawer.routes.ts`)
- Drawer navigation → POS checkout: routes to (evidence: `src/app/drawer/drawer.routes.ts`)
- Drawer navigation → Inventory management: routes to (evidence: `src/app/drawer/drawer.routes.ts`)
- Drawer navigation → Stock transfers: routes to (evidence: `src/app/drawer/drawer.routes.ts`)
- Drawer navigation → Customer management: routes to (evidence: `src/app/drawer/drawer.routes.ts`)
- Drawer navigation → Sales history: routes to (evidence: `src/app/drawer/drawer.routes.ts`)
- Drawer navigation → Personnel management: routes to (evidence: `src/app/drawer/drawer.routes.ts`)
- Drawer navigation → Petty cash logs: routes to (evidence: `src/app/drawer/drawer.routes.ts`)
- Drawer navigation → User management: routes to (evidence: `src/app/drawer/drawer.routes.ts`)
- Dashboard → Dashboard chat: opens (evidence: `src/app/drawer/dashboard/dashboard.component.ts`)
- Dashboard → Item conversion: opens (evidence: `src/app/drawer/dashboard/dashboard.component.ts`)
- Dashboard → Item restocking: opens (evidence: `src/app/drawer/dashboard/dashboard.component.ts`)
- POS checkout → Purchase summary: opens summary (evidence: `src/app/drawer/pos-sales/pos-sales.component.ts`)
- Sales history → Sale details: opens details (evidence: `src/app/drawer/sales/sales.component.ts`)
- Sales history → Transaction filter: uses filter (evidence: `src/app/drawer/sales/sales.component.ts`)
- Customer management → Transaction filter: uses filter (evidence: `src/app/drawer/customers/customers.component.ts`)
- Stock transfers → Item conversion: opens conversion (evidence: `src/app/drawer/transfers/transfers.component.ts`)
- Stock transfers → Item restocking: opens restock (evidence: `src/app/drawer/transfers/transfers.component.ts`)
- Item conversion → Transfer item lists: opens item lists (evidence: `src/app/drawer/transfers/modals/itemconvertform/itemconvertform.component.ts`)
- Item restocking → Transfer item lists: uses item lists (evidence: `src/app/drawer/transfers/modals/itemrestockform/itemrestockform.component.ts`)
- Inventory management → Item disposal: opens disposal (evidence: `src/app/drawer/inventory/inventory.component.ts`)
- App bootstrap → SQLite database: initializes database (evidence: `src/main.ts`)
- App bootstrap → AI data seeding: seeds AI data (evidence: `src/main.ts`)
- Offline AI queries → SQLite database: queries data (evidence: `src/app/services/offline-ai.service.ts`)
- Offline AI queries → AI data seeding: uses seed service (evidence: `src/app/services/offline-ai.service.ts`)
- AI data seeding → SQLite database: stores seed data (evidence: `src/app/services/ai-seed.service.ts`)
- Receipt printing → iMin printer adapter: sends print commands (evidence: `src/app/services/printer.service.ts`)
