# zivarmahmod/corevo-pos-system architecture

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

- Interactive diagram: https://gitdiagram.com/zivarmahmod/corevo-pos-system
- Repository: https://github.com/zivarmahmod/corevo-pos-system

## Overview

Corevo is a multi-surface retail platform: customers browse and buy through kiosk and mobile storefronts, while backend services handle orders, payments, and operational evidence. The Android bridge supports the Swish payment workflow; administrators can review payment matches and evidence. The repository also includes Zentum document and Microsoft OneDrive integration, plus platform module and security infrastructure. The README is empty and source excerpts are selective, so uncertain runtime wiring is omitted.

Main entry points: [`5-Kod/server/corevo-api/src/db.ts`](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/db.ts) (Application Database), [`5-Kod/src/components/kiosk/KioskShell.tsx`](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/components/kiosk/KioskShell.tsx) (Kiosk UI), [`5-Kod/server/corevo-api/src/mobile/routes.ts`](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/mobile/routes.ts) (Mobile API), [`5-Kod/server/corevo-api/src/evidence/routes.ts`](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/evidence/routes.ts) (Evidence Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefronts"]
  node_kiosk["Kiosk UI<br/>[KioskShell.tsx]"]
  node_mobile["Mobile Shop<br/>[MobileKiosk.tsx]"]
end

subgraph group_commerce["Commerce Services"]
  node_pricing["Offer Pricing<br/>[offer-engine.ts]"]
  node_kiosk_order["Kiosk Orders"]
  node_mobile_api["Mobile API<br/>[routes.ts]"]
  node_recommendations["Recommendations<br/>[recommendations.ts]"]
  node_orders["Admin Order Engine<br/>[order-engine.ts]"]
end

subgraph group_payments["Payment Operations"]
  node_bridge["Android Bridge"]
  node_bridge_service["Bridge Service"]
  node_swish_parser["Swish Parser<br/>[swish.ts]"]
  node_payment_match["Payment Matching<br/>[matching.ts]"]
  node_evidence["Evidence Service<br/>[routes.ts]"]
  node_review["Admin Review<br/>[routes.ts]"]
end

subgraph group_zentum["Zentum Workspace"]
  node_zentum_routes["OneDrive Routes<br/>[onedrive-routes.ts]"]
  node_onedrive["OneDrive Service<br/>[onedrive.ts]"]
  node_documents["Document Service"]
end

subgraph group_platform["Platform Core"]
  node_platform_registry["Module Registry<br/>[module-registry.ts]"]
  node_platform_security["Security Context"]
end

node_customer(("Customer"))
node_database[("Application Database<br/>[db.ts]")]
node_supabase_storage[("Supabase Storage")]
node_microsoft_graph["Microsoft Graph"]
node_admin(("Administrator"))

node_customer -->|"uses kiosk"| node_kiosk
node_customer -->|"shops on"| node_mobile
node_kiosk -->|"prices cart"| node_pricing
node_kiosk -->|"submits order"| node_kiosk_order
node_mobile -->|"calls API"| node_mobile_api
node_mobile_api -->|"reads recommendations"| node_recommendations
node_kiosk_order -->|"submits transaction"| node_database
node_mobile_api -->|"uses transactions"| node_database
node_admin -->|"changes order"| node_orders
node_orders -->|"calls order RPC"| node_database
node_bridge_service -->|"keeps listener alive"| node_bridge
node_bridge_service -->|"sends heartbeat"| node_database
node_swish_parser -->|"parses notices"| node_payment_match
node_payment_match -->|"matches payment"| node_database
node_admin -->|"reviews matches"| node_review
node_review -->|"reads and resolves"| node_database
node_review -->|"removes evidence files"| node_evidence
node_evidence -->|"records evidence"| node_database
node_evidence -->|"stores uploads"| node_supabase_storage
node_admin -->|"manages connection"| node_zentum_routes
node_zentum_routes -->|"dispatches actions"| node_onedrive
node_onedrive -->|"accesses files"| node_microsoft_graph
node_onedrive -->|"supplies sources"| node_documents
node_platform_registry -->|"uses execution context"| node_platform_security

click node_kiosk "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/components/kiosk/KioskShell.tsx"
click node_mobile "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/pages/MobileKiosk.tsx"
click node_pricing "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/lib/offer-engine.ts"
click node_kiosk_order "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/lib/kiosk-order-engine.ts"
click node_mobile_api "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/mobile/routes.ts"
click node_recommendations "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/mobile/recommendations.ts"
click node_orders "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/lib/order-engine.ts"
click node_bridge "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/android/payment-bridge/app/src/main/java/se/corevo/paymentbridge/bridge/SwishListenerService.kt"
click node_bridge_service "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/android/payment-bridge/app/src/main/java/se/corevo/paymentbridge/bridge/BridgeForegroundService.kt"
click node_swish_parser "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/parser/swish.ts"
click node_payment_match "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/payments/matching.ts"
click node_evidence "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/evidence/routes.ts"
click node_review "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/admin/routes.ts"
click node_zentum_routes "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/agent/zentum/onedrive-routes.ts"
click node_onedrive "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/agent/zentum/onedrive.ts"
click node_documents "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/agent/zentum/document-service.ts"
click node_platform_registry "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/platform/kernel/module-registry.ts"
click node_platform_security "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/platform/security/src/execution-context.ts"
click node_database "https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/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_kiosk,node_mobile toneBlue
class node_pricing,node_kiosk_order,node_mobile_api,node_recommendations,node_orders,node_database,node_supabase_storage toneAmber
class node_bridge,node_bridge_service,node_swish_parser,node_payment_match,node_evidence,node_review toneMint
class node_zentum_routes,node_onedrive,node_documents toneRose
class node_platform_registry,node_platform_security,node_customer,node_microsoft_graph,node_admin toneIndigo
```

## Components

### Storefronts

- [Kiosk UI](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/components/kiosk/KioskShell.tsx): `5-Kod/src/components/kiosk/KioskShell.tsx`
- [Mobile Shop](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/pages/MobileKiosk.tsx): `5-Kod/src/pages/MobileKiosk.tsx`

### Commerce Services

- [Offer Pricing](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/lib/offer-engine.ts): `5-Kod/src/lib/offer-engine.ts`
- [Kiosk Orders](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/lib/kiosk-order-engine.ts): `5-Kod/src/lib/kiosk-order-engine.ts`
- [Mobile API](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/mobile/routes.ts): `5-Kod/server/corevo-api/src/mobile/routes.ts`
- [Recommendations](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/mobile/recommendations.ts): `5-Kod/server/corevo-api/src/mobile/recommendations.ts`
- [Admin Order Engine](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/src/lib/order-engine.ts): `5-Kod/src/lib/order-engine.ts`

### Payment Operations

- [Android Bridge](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/android/payment-bridge/app/src/main/java/se/corevo/paymentbridge/bridge/SwishListenerService.kt): `5-Kod/android/payment-bridge/app/src/main/java/se/corevo/paymentbridge/bridge/SwishListenerService.kt`
- [Bridge Service](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/android/payment-bridge/app/src/main/java/se/corevo/paymentbridge/bridge/BridgeForegroundService.kt): `5-Kod/android/payment-bridge/app/src/main/java/se/corevo/paymentbridge/bridge/BridgeForegroundService.kt`
- [Swish Parser](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/parser/swish.ts): `5-Kod/server/corevo-api/src/parser/swish.ts`
- [Payment Matching](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/payments/matching.ts): `5-Kod/server/corevo-api/src/payments/matching.ts`
- [Evidence Service](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/evidence/routes.ts): `5-Kod/server/corevo-api/src/evidence/routes.ts`
- [Admin Review](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/admin/routes.ts): `5-Kod/server/corevo-api/src/admin/routes.ts`

### Zentum Workspace

- [OneDrive Routes](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/agent/zentum/onedrive-routes.ts): `5-Kod/server/corevo-api/src/agent/zentum/onedrive-routes.ts`
- [OneDrive Service](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/agent/zentum/onedrive.ts): `5-Kod/server/corevo-api/src/agent/zentum/onedrive.ts`
- [Document Service](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/agent/zentum/document-service.ts): `5-Kod/server/corevo-api/src/agent/zentum/document-service.ts`

### Platform Core

- [Module Registry](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/platform/kernel/module-registry.ts): `5-Kod/platform/kernel/module-registry.ts`
- [Security Context](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/platform/security/src/execution-context.ts): `5-Kod/platform/security/src/execution-context.ts`

### Other components

- **Customer**
- [Application Database](https://github.com/zivarmahmod/corevo-pos-system/blob/main/5-Kod/server/corevo-api/src/db.ts): `5-Kod/server/corevo-api/src/db.ts`
- **Supabase Storage**
- **Microsoft Graph**
- **Administrator**

## Connections

- Customer → Kiosk UI: uses kiosk
- Customer → Mobile Shop: shops on
- Kiosk UI → Offer Pricing: prices cart
- Kiosk UI → Kiosk Orders: submits order
- Mobile Shop → Mobile API: calls API
- Mobile API → Recommendations: reads recommendations
- Kiosk Orders → Application Database: submits transaction
- Mobile API → Application Database: uses transactions
- Administrator → Admin Order Engine: changes order
- Admin Order Engine → Application Database: calls order RPC
- Bridge Service → Android Bridge: keeps listener alive
- Bridge Service → Application Database: sends heartbeat
- Swish Parser → Payment Matching: parses notices
- Payment Matching → Application Database: matches payment
- Administrator → Admin Review: reviews matches
- Admin Review → Application Database: reads and resolves
- Admin Review → Evidence Service: removes evidence files
- Evidence Service → Application Database: records evidence
- Evidence Service → Supabase Storage: stores uploads
- Administrator → OneDrive Routes: manages connection
- OneDrive Routes → OneDrive Service: dispatches actions
- OneDrive Service → Microsoft Graph: accesses files
- OneDrive Service → Document Service: supplies sources
- Module Registry → Security Context: uses execution context
