# odoo/obox-app architecture

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

## Overview

ePOS Proxy is a desktop bridge that makes a USB Epson printer available to Odoo POS through a local HTTP endpoint. The documented user flow is to launch the app, let it detect the printer, copy its displayed address, and configure Odoo to use it. The frontend also exposes printer status and LAN-printer management, while print-format handlers and ESC/POS code indicate internal print-processing capabilities. Backend implementation excerpts were not provided, so backend relationships beyond the documented HTTP workflow are left out.

Main entry points: [`frontend/src/App.tsx`](https://github.com/odoo/obox-app/blob/main/frontend/src/App.tsx) (App interface), [`frontend/src/components/StepDialog.tsx`](https://github.com/odoo/obox-app/blob/main/frontend/src/components/StepDialog.tsx) (Step guide dialog), [`frontend/src/components/PrinterList.tsx`](https://github.com/odoo/obox-app/blob/main/frontend/src/components/PrinterList.tsx) (Printer list), [`frontend/src/contexts/PrinterContext.tsx`](https://github.com/odoo/obox-app/blob/main/frontend/src/contexts/PrinterContext.tsx) (Printer state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_ui["App interface<br/>[App.tsx]"]
  node_appstate["App state<br/>[AppContext.tsx]"]
  node_toast["Toast feedback<br/>[ToastContext.tsx]"]
  node_dialog["Dialog framework<br/>[Dialog.tsx]"]
  node_stepdialog["Step guide dialog<br/>[StepDialog.tsx]"]
  node_stepstate["Guide navigation<br/>[useStepDialog.ts]"]
  node_formatter["Formatted text"]
end

subgraph group_printer["Printer management"]
  node_printerstate["Printer state<br/>[PrinterContext.tsx]"]
  node_printerlist["Printer list<br/>[PrinterList.tsx]"]
  node_printeritem["Printer item"]
  node_lanentry["LAN printer setup"]
  node_networkguide["Network setup guide"]
  node_enabledguide["Enabled guidance"]
  node_printeractions["Printer actions<br/>[PrinterActions.tsx]"]
  node_manager["Printer manager<br/>[manager.go]"]
  node_usb["USB printer access<br/>[usb.go]"]
  node_lan["LAN printer access<br/>[lan.go]"]
end

subgraph group_printing["Print processing"]
  node_printdispatch["Print dispatch<br/>[executePrint.ts]"]
  node_eposprint["ePOS print sender<br/>[sendEposPrint.ts]"]
  node_labelprint["Label print sender<br/>[sendLabelPrint.ts]"]
  node_escpos["ESC/POS encoding<br/>[commands.go]"]
  node_escposxml["ESC/POS XML<br/>[xml.go]"]
end

subgraph group_backend["Local service"]
  node_httpservice["Local HTTP service<br/>[server.go]"]
  node_appbinding["Desktop app binding<br/>[app.go]"]
end

node_operator(("Desktop user"))
node_pos(("Odoo POS"))

node_operator -->|"uses"| node_ui
node_ui -->|"renders"| node_printerlist
node_ui -->|"renders"| node_networkguide
node_ui -->|"renders"| node_enabledguide
node_ui -->|"provides state"| node_appstate
node_ui -->|"provides state"| node_printerstate
node_printerlist -->|"reads state"| node_printerstate
node_printerlist -->|"renders"| node_printeritem
node_printerlist -->|"opens"| node_lanentry
node_printerstate -->|"calls bindings"| node_appbinding
node_networkguide -->|"reads state"| node_printerstate
node_networkguide -->|"opens guide"| node_stepdialog
node_enabledguide -->|"formats text"| node_formatter
node_enabledguide -->|"uses"| node_dialog
node_stepdialog -->|"navigates steps"| node_stepstate
node_stepdialog -->|"formats text"| node_formatter
node_stepdialog -->|"uses"| node_dialog
node_printdispatch -->|"dispatches"| node_eposprint
node_printdispatch -->|"dispatches"| node_labelprint
node_pos -->|"sends print requests"| node_httpservice
node_operator -->|"configures address"| node_pos

click node_ui "https://github.com/odoo/obox-app/blob/main/frontend/src/App.tsx"
click node_appstate "https://github.com/odoo/obox-app/blob/main/frontend/src/contexts/AppContext.tsx"
click node_printerstate "https://github.com/odoo/obox-app/blob/main/frontend/src/contexts/PrinterContext.tsx"
click node_printerlist "https://github.com/odoo/obox-app/blob/main/frontend/src/components/PrinterList.tsx"
click node_printeritem "https://github.com/odoo/obox-app/blob/main/frontend/src/components/PrinterListItem.tsx"
click node_lanentry "https://github.com/odoo/obox-app/blob/main/frontend/src/components/NetworkIpDialog.tsx"
click node_networkguide "https://github.com/odoo/obox-app/blob/main/frontend/src/components/NetworkPrinting.tsx"
click node_enabledguide "https://github.com/odoo/obox-app/blob/main/frontend/src/components/NetworkPrintingEnabledDialog.tsx"
click node_printeractions "https://github.com/odoo/obox-app/blob/main/frontend/src/components/PrinterActions.tsx"
click node_toast "https://github.com/odoo/obox-app/blob/main/frontend/src/contexts/ToastContext.tsx"
click node_dialog "https://github.com/odoo/obox-app/blob/main/frontend/src/components/Dialog.tsx"
click node_stepdialog "https://github.com/odoo/obox-app/blob/main/frontend/src/components/StepDialog.tsx"
click node_stepstate "https://github.com/odoo/obox-app/blob/main/frontend/src/hooks/useStepDialog.ts"
click node_formatter "https://github.com/odoo/obox-app/blob/main/frontend/src/functions/renderFormattedText.tsx"
click node_printdispatch "https://github.com/odoo/obox-app/blob/main/frontend/src/functions/executePrint.ts"
click node_eposprint "https://github.com/odoo/obox-app/blob/main/frontend/src/functions/sendEposPrint.ts"
click node_labelprint "https://github.com/odoo/obox-app/blob/main/frontend/src/functions/sendLabelPrint.ts"
click node_httpservice "https://github.com/odoo/obox-app/blob/main/internal/server/server.go"
click node_appbinding "https://github.com/odoo/obox-app/blob/main/app.go"
click node_manager "https://github.com/odoo/obox-app/blob/main/internal/printer/manager.go"
click node_usb "https://github.com/odoo/obox-app/blob/main/internal/printer/usb.go"
click node_lan "https://github.com/odoo/obox-app/blob/main/internal/printer/lan.go"
click node_escpos "https://github.com/odoo/obox-app/blob/main/internal/escpos/commands.go"
click node_escposxml "https://github.com/odoo/obox-app/blob/main/internal/escpos/xml.go"

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_ui,node_appstate,node_toast,node_dialog,node_stepdialog,node_stepstate,node_formatter,node_operator toneBlue
class node_printerstate,node_printerlist,node_printeritem,node_lanentry,node_networkguide,node_enabledguide,node_printeractions,node_manager,node_usb,node_lan toneAmber
class node_printdispatch,node_eposprint,node_labelprint,node_escpos,node_escposxml toneMint
class node_httpservice,node_appbinding toneRose
class node_pos toneIndigo
```

## Components

### Desktop interface

- [App interface](https://github.com/odoo/obox-app/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [App state](https://github.com/odoo/obox-app/blob/main/frontend/src/contexts/AppContext.tsx): `frontend/src/contexts/AppContext.tsx`
- [Toast feedback](https://github.com/odoo/obox-app/blob/main/frontend/src/contexts/ToastContext.tsx): `frontend/src/contexts/ToastContext.tsx`
- [Dialog framework](https://github.com/odoo/obox-app/blob/main/frontend/src/components/Dialog.tsx): `frontend/src/components/Dialog.tsx`
- [Step guide dialog](https://github.com/odoo/obox-app/blob/main/frontend/src/components/StepDialog.tsx): `frontend/src/components/StepDialog.tsx`
- [Guide navigation](https://github.com/odoo/obox-app/blob/main/frontend/src/hooks/useStepDialog.ts): `frontend/src/hooks/useStepDialog.ts`
- [Formatted text](https://github.com/odoo/obox-app/blob/main/frontend/src/functions/renderFormattedText.tsx): `frontend/src/functions/renderFormattedText.tsx`

### Printer management

- [Printer state](https://github.com/odoo/obox-app/blob/main/frontend/src/contexts/PrinterContext.tsx): `frontend/src/contexts/PrinterContext.tsx`
- [Printer list](https://github.com/odoo/obox-app/blob/main/frontend/src/components/PrinterList.tsx): `frontend/src/components/PrinterList.tsx`
- [Printer item](https://github.com/odoo/obox-app/blob/main/frontend/src/components/PrinterListItem.tsx): `frontend/src/components/PrinterListItem.tsx`
- [LAN printer setup](https://github.com/odoo/obox-app/blob/main/frontend/src/components/NetworkIpDialog.tsx): `frontend/src/components/NetworkIpDialog.tsx`
- [Network setup guide](https://github.com/odoo/obox-app/blob/main/frontend/src/components/NetworkPrinting.tsx): `frontend/src/components/NetworkPrinting.tsx`
- [Enabled guidance](https://github.com/odoo/obox-app/blob/main/frontend/src/components/NetworkPrintingEnabledDialog.tsx): `frontend/src/components/NetworkPrintingEnabledDialog.tsx`
- [Printer actions](https://github.com/odoo/obox-app/blob/main/frontend/src/components/PrinterActions.tsx): `frontend/src/components/PrinterActions.tsx`
- [Printer manager](https://github.com/odoo/obox-app/blob/main/internal/printer/manager.go): `internal/printer/manager.go`
- [USB printer access](https://github.com/odoo/obox-app/blob/main/internal/printer/usb.go): `internal/printer/usb.go`
- [LAN printer access](https://github.com/odoo/obox-app/blob/main/internal/printer/lan.go): `internal/printer/lan.go`

### Print processing

- [Print dispatch](https://github.com/odoo/obox-app/blob/main/frontend/src/functions/executePrint.ts): `frontend/src/functions/executePrint.ts`
- [ePOS print sender](https://github.com/odoo/obox-app/blob/main/frontend/src/functions/sendEposPrint.ts): `frontend/src/functions/sendEposPrint.ts`
- [Label print sender](https://github.com/odoo/obox-app/blob/main/frontend/src/functions/sendLabelPrint.ts): `frontend/src/functions/sendLabelPrint.ts`
- [ESC/POS encoding](https://github.com/odoo/obox-app/blob/main/internal/escpos/commands.go): `internal/escpos/commands.go`
- [ESC/POS XML](https://github.com/odoo/obox-app/blob/main/internal/escpos/xml.go): `internal/escpos/xml.go`

### Local service

- [Local HTTP service](https://github.com/odoo/obox-app/blob/main/internal/server/server.go): `internal/server/server.go`
- [Desktop app binding](https://github.com/odoo/obox-app/blob/main/app.go): `app.go`

### Other components

- **Desktop user**
- **Odoo POS**

## Connections

- Desktop user → App interface: uses
- App interface → Printer list: renders (evidence: `frontend/src/App.tsx`)
- App interface → Network setup guide: renders (evidence: `frontend/src/App.tsx`)
- App interface → Enabled guidance: renders (evidence: `frontend/src/App.tsx`)
- App interface → App state: provides state (evidence: `frontend/src/App.tsx`)
- App interface → Printer state: provides state (evidence: `frontend/src/App.tsx`)
- Printer list → Printer state: reads state (evidence: `frontend/src/components/PrinterList.tsx`)
- Printer list → Printer item: renders (evidence: `frontend/src/components/PrinterList.tsx`)
- Printer list → LAN printer setup: opens (evidence: `frontend/src/components/PrinterList.tsx`)
- Printer state → Desktop app binding: calls bindings (evidence: `frontend/src/contexts/PrinterContext.tsx`)
- Network setup guide → Printer state: reads state (evidence: `frontend/src/components/NetworkPrinting.tsx`)
- Network setup guide → Step guide dialog: opens guide (evidence: `frontend/src/components/NetworkPrinting.tsx`)
- Enabled guidance → Formatted text: formats text (evidence: `frontend/src/components/NetworkPrintingEnabledDialog.tsx`)
- Enabled guidance → Dialog framework: uses (evidence: `frontend/src/components/NetworkPrintingEnabledDialog.tsx`)
- Step guide dialog → Guide navigation: navigates steps (evidence: `frontend/src/components/StepDialog.tsx`)
- Step guide dialog → Formatted text: formats text (evidence: `frontend/src/components/StepDialog.tsx`)
- Step guide dialog → Dialog framework: uses (evidence: `frontend/src/components/StepDialog.tsx`)
- Print dispatch → ePOS print sender: dispatches (evidence: `frontend/src/functions/executePrint.ts`)
- Print dispatch → Label print sender: dispatches (evidence: `frontend/src/functions/executePrint.ts`)
- Odoo POS → Local HTTP service: sends print requests
- Desktop user → Odoo POS: configures address
