# check77tp/electronics-gadget-store--pos--group-22 architecture

> Architecture diagram of the GitHub repository check77tp/electronics-gadget-store--pos--group-22, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/check77tp/electronics-gadget-store--pos--group-22
- Repository: https://github.com/check77tp/electronics-gadget-store--pos--group-22

## Overview

GadgetPOS is a web-based electronics-retail POS. Staff use the React application to authenticate, manage products and stock, complete sales, review transactions, and view or export reports; requests cross the FastAPI REST boundary into domain controllers and persistence. The documented product also includes user management and low-stock alerts. The excerpts show checkout, product/inventory, and reporting wiring; user/auth route internals and several frontend API-to-page links are not sampled, so those connections are kept at the documented HTTP boundary.

Main entry points: [`frontend/src/App.jsx`](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/App.jsx) (React application), [`backend/app/technical_services/persistence/database.py`](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/technical_services/persistence/database.py) (Session & storage), [`backend/app/main.py`](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/domain/controllers/inventory_controller.py`](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/domain/controllers/inventory_controller.py) (Catalog & inventory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Staff application"]
  node_app["React application<br/>[App.jsx]"]
  node_auth_ui["Auth context<br/>[AuthContext.jsx]"]
  node_pos_ui["POS terminal"]
  node_catalog_ui["Catalog &amp; stock<br/>[ProductsPage.jsx]"]
  node_inventory_ui["Inventory view<br/>[InventoryPage.jsx]"]
  node_transactions_ui["Transaction history"]
  node_reports_ui["Reports dashboard<br/>[ReportsPage.jsx]"]
  node_users_ui["User management"]
  node_http_client["HTTP client<br/>[client.js]"]
end

subgraph group_api["REST interface"]
  node_api_app["FastAPI app<br/>[main.py]"]
  node_sales_api["Sales routes<br/>[routes_sales.py]"]
  node_products_api["Product routes<br/>[routes_products.py]"]
  node_reports_api["Report routes<br/>[routes_reports.py]"]
  node_auth_api["Auth routes<br/>[routes_auth.py]"]
  node_users_api["User routes<br/>[routes_users.py]"]
end

subgraph group_domain["Retail operations"]
  node_sales_domain["Sales workflow"]
  node_inventory_domain["Catalog &amp; inventory"]
  node_reports_domain["Report aggregation"]
end

subgraph group_services["Technical services"]
  node_db_service["Session &amp; storage<br/>[database.py]"]
  node_data[("Retail records<br/>[models.py]")]
  node_payment_gateway["Payment gateway<br/>[payment_gateway.py]"]
  node_notifications["Alert delivery<br/>[sms_service.py]"]
  node_email_service["Email service<br/>[email_service.py]"]
end

node_staff(("Store staff"))
node_payment_provider{{"Payment provider"}}
node_sms_provider{{"SMS service"}}

node_staff -->|"uses"| node_app
node_app -->|"authenticates via"| node_auth_ui
node_app -->|"routes to"| node_pos_ui
node_app -->|"routes to"| node_catalog_ui
node_app -->|"routes to"| node_inventory_ui
node_app -->|"routes to"| node_transactions_ui
node_app -->|"routes to"| node_reports_ui
node_app -->|"routes to"| node_users_ui
node_app -->|"uses HTTP"| node_http_client
node_http_client -->|"sends REST requests"| node_api_app
node_api_app -->|"registers"| node_sales_api
node_api_app -->|"registers"| node_products_api
node_api_app -->|"registers"| node_reports_api
node_api_app -->|"registers"| node_auth_api
node_api_app -->|"registers"| node_users_api
node_sales_api -->|"calls"| node_sales_domain
node_sales_api -->|"requests session"| node_db_service
node_sales_domain -->|"reads and writes"| node_db_service
node_sales_domain -->|"authorizes payment"| node_payment_gateway
node_payment_gateway -.->|"integrates"| node_payment_provider
node_products_api -->|"calls"| node_inventory_domain
node_products_api -->|"requests session"| node_db_service
node_inventory_domain -->|"reads and writes"| node_db_service
node_inventory_domain -->|"sends low-stock alert"| node_notifications
node_notifications -.->|"sends SMS"| node_sms_provider
node_inventory_domain -->|"sends alert email"| node_email_service
node_reports_api -->|"calls"| node_reports_domain
node_reports_api -->|"requests session"| node_db_service
node_reports_domain -->|"queries records"| node_db_service
node_db_service -->|"persists"| node_data

click node_app "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/context/AuthContext.jsx"
click node_pos_ui "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/PosTerminalPage.jsx"
click node_catalog_ui "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/ProductsPage.jsx"
click node_inventory_ui "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/InventoryPage.jsx"
click node_transactions_ui "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/TransactionsPage.jsx"
click node_reports_ui "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/ReportsPage.jsx"
click node_users_ui "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/UserManagementPage.jsx"
click node_http_client "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/api/client.js"
click node_api_app "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/main.py"
click node_sales_api "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_sales.py"
click node_products_api "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_products.py"
click node_reports_api "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_reports.py"
click node_auth_api "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_auth.py"
click node_users_api "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_users.py"
click node_sales_domain "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/domain/controllers/sales_controller.py"
click node_inventory_domain "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/domain/controllers/inventory_controller.py"
click node_reports_domain "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/domain/controllers/report_controller.py"
click node_db_service "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/technical_services/persistence/database.py"
click node_data "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/domain/models.py"
click node_payment_gateway "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/business_infrastructure/payment_gateway.py"
click node_notifications "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/technical_services/notifications/sms_service.py"
click node_email_service "https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/technical_services/notifications/email_service.py"

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_auth_ui,node_pos_ui,node_catalog_ui,node_inventory_ui,node_transactions_ui,node_reports_ui,node_users_ui,node_http_client toneBlue
class node_api_app,node_sales_api,node_products_api,node_reports_api,node_auth_api,node_users_api toneAmber
class node_sales_domain,node_inventory_domain,node_reports_domain toneMint
class node_db_service,node_data,node_payment_gateway,node_notifications,node_email_service toneRose
class node_staff,node_payment_provider,node_sms_provider toneIndigo
```

## Components

### Staff application

- [React application](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth context](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [POS terminal](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/PosTerminalPage.jsx): `frontend/src/pages/PosTerminalPage.jsx`
- [Catalog & stock](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/ProductsPage.jsx): `frontend/src/pages/ProductsPage.jsx`
- [Inventory view](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/InventoryPage.jsx): `frontend/src/pages/InventoryPage.jsx`
- [Transaction history](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/TransactionsPage.jsx): `frontend/src/pages/TransactionsPage.jsx`
- [Reports dashboard](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/ReportsPage.jsx): `frontend/src/pages/ReportsPage.jsx`
- [User management](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/pages/UserManagementPage.jsx): `frontend/src/pages/UserManagementPage.jsx`
- [HTTP client](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### REST interface

- [FastAPI app](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/main.py): `backend/app/main.py`
- [Sales routes](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_sales.py): `backend/app/api/routes_sales.py`
- [Product routes](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_products.py): `backend/app/api/routes_products.py`
- [Report routes](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_reports.py): `backend/app/api/routes_reports.py`
- [Auth routes](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_auth.py): `backend/app/api/routes_auth.py`
- [User routes](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/api/routes_users.py): `backend/app/api/routes_users.py`

### Retail operations

- [Sales workflow](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/domain/controllers/sales_controller.py): `backend/app/domain/controllers/sales_controller.py`
- [Catalog & inventory](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/domain/controllers/inventory_controller.py): `backend/app/domain/controllers/inventory_controller.py`
- [Report aggregation](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/domain/controllers/report_controller.py): `backend/app/domain/controllers/report_controller.py`

### Technical services

- [Session & storage](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/technical_services/persistence/database.py): `backend/app/technical_services/persistence/database.py`
- [Retail records](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/domain/models.py): `backend/app/domain/models.py`
- [Payment gateway](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/business_infrastructure/payment_gateway.py): `backend/app/business_infrastructure/payment_gateway.py`
- [Alert delivery](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/technical_services/notifications/sms_service.py): `backend/app/technical_services/notifications/sms_service.py`
- [Email service](https://github.com/check77tp/electronics-gadget-store--pos--group-22/blob/main/backend/app/technical_services/notifications/email_service.py): `backend/app/technical_services/notifications/email_service.py`

### Other components

- **Store staff**
- **Payment provider**
- **SMS service**

## Connections

- Store staff → React application: uses
- React application → Auth context: authenticates via
- React application → POS terminal: routes to
- React application → Catalog & stock: routes to
- React application → Inventory view: routes to
- React application → Transaction history: routes to
- React application → Reports dashboard: routes to
- React application → User management: routes to
- React application → HTTP client: uses HTTP
- HTTP client → FastAPI app: sends REST requests
- FastAPI app → Sales routes: registers
- FastAPI app → Product routes: registers
- FastAPI app → Report routes: registers
- FastAPI app → Auth routes: registers
- FastAPI app → User routes: registers
- Sales routes → Sales workflow: calls
- Sales routes → Session & storage: requests session
- Sales workflow → Session & storage: reads and writes
- Sales workflow → Payment gateway: authorizes payment
- Payment gateway → Payment provider: integrates
- Product routes → Catalog & inventory: calls
- Product routes → Session & storage: requests session
- Catalog & inventory → Session & storage: reads and writes
- Catalog & inventory → Alert delivery: sends low-stock alert
- Alert delivery → SMS service: sends SMS
- Catalog & inventory → Email service: sends alert email
- Report routes → Report aggregation: calls
- Report routes → Session & storage: requests session
- Report aggregation → Session & storage: queries records
- Session & storage → Retail records: persists
