How houda-farrag/pos-system works
ReactPOS is a desktop point-of-sale and inventory application built with a React interface inside Electron, with SQLite-backed operations. The main workflow is a user signing in, navigating permission-gated sales and management screens, and using the API bridge to request application data or actions. The interface also includes purchasing, receiving, supplier payments, reporting, audit, and user administration. The excerpts show the application routing, invoice listing logic, Electron startup, and selected IPC handlers; connections from other screens into the API are not drawn where call evidence was not shown.
Main entry points: App.tsx App routing · api.ts Frontend API · main.cjs Electron IPC handlers · sqlite.cjs SQLite operations
Components 21
Desktop interface
- App routing
src/App.tsx - Application layout
src/components/Layout.tsx - Global modal
src/components/GlobalModal.tsx - Sign in
src/pages/LoginPage.tsx
Sales and inventory
- Dashboard
src/pages/DashboardPage.tsx - Point of sale
src/pages/PosPage.tsx - Products
src/pages/ProductsPage.tsx - Invoices
src/pages/InvoicesPage.tsx - Invoice logic
src/services/invoiceLogic.ts - Invoice details
src/components/InvoiceDetails.tsx
Purchasing
- Suppliers
src/pages/SuppliersPage.tsx - Purchase orders
src/pages/PurchaseOrdersPage.tsx - Goods receiving
src/pages/GoodsReceivingPage.tsx - Supplier payments
src/pages/SupplierPaymentsPage.tsx
Application services
- Frontend API
src/api.ts - Electron preload bridge
electron/preload.cjs - Electron IPC handlers
electron/main.cjs - SQLite operations
electron/sqlite.cjs - User administration
src/pages/UserManagementPage.tsx - Audit log
src/pages/AuditLogPage.tsx
Other components
- Store operator
Connections 23
- Store operator → App routing: uses
src/App.tsx - App routing → Sign in: shows signed out
src/App.tsx - App routing → Application layout: renders
src/App.tsx - App routing → Global modal: renders
src/App.tsx - App routing → Dashboard: routes to
src/App.tsx - App routing → Point of sale: routes to
src/App.tsx - App routing → Products: routes to
src/App.tsx - App routing → Invoices: routes to
src/App.tsx - App routing → Suppliers: routes to
src/App.tsx - App routing → Purchase orders: routes to
src/App.tsx - App routing → Goods receiving: routes to
src/App.tsx - App routing → Supplier payments: routes to
src/App.tsx - App routing → User administration: routes to
src/App.tsx - App routing → Audit log: routes to
src/App.tsx - Invoices → Invoice logic: uses
src/pages/InvoicesPage.tsx - Invoice logic → Frontend API: requests invoices
src/services/invoiceLogic.ts - Invoice details → Frontend API: loads details
src/components/InvoiceDetails.tsx - App routing → Frontend API: restores session
src/App.tsx - Frontend API → Electron preload bridge: calls bridge
src/api.ts - Electron IPC handlers → Electron preload bridge: configures
electron/main.cjs - Electron IPC handlers → SQLite operations: dispatches handlers
electron/main.cjs - Electron IPC handlers → SQLite operations: initializes
electron/main.cjs - SQLite operations → User administration: uses password utilities
electron/sqlite.cjs