How jomsq/pos works
This is a multi-client point-of-sale system: browser and desktop interfaces support counter sales and back-office work, while an ASP.NET API and application services handle business operations. Major domain areas include catalog, checkout, inventory/purchasing, shifts, reports, and e-services; offline sales and synchronization are also explicit subsystems. The API configures application and infrastructure services, authentication, and controller routing. The excerpts do not show most UI-to-API or controller-to-service calls, so those relationships are omitted or marked unverified rather than inferred as observed.
Main entry points: PosDbContext.cs Database context · Api/Program.cs HTTP API · ApiClients.cs API clients · Web/Program.cs Browser app
Components 24
POS clients
- Browser app
src/Web/Program.cs - Desktop app
src/Desktop/MauiProgram.cs - Checkout UI
src/UI/Features/Checkout/Checkout.razor.cs - E-services UI
src/UI/Features/EServices/EServicesPage.razor.cs - API clients
src/UI/Services/Api/ApiClients.cs - Client auth
src/UI/Services/Auth/AuthHandler.cs
API and identity
- HTTP API
src/Api/Program.cs - Authentication
src/Application/Auth/AuthService.cs
Store operations
- Product catalog
src/Application/Catalog/ProductService.cs - Catalog import
src/Application/Catalog/ProductImportService.cs - Sales and refunds
src/Application/Sales/SaleService.cs - Inventory and receiving
src/Application/Inventory/StockReceiptService.cs - Purchase orders
src/Application/Purchasing/PurchaseOrderService.cs - E-services
src/Application/EServices/EServiceService.cs - Shifts and closing
src/Application/Shifts/ZReadingService.cs - Reporting
src/Application/Reports/ReportService.cs - Pricing math
src/Pricing/CartCalculator.cs
Offline operations
- Offline sales
src/Offline/OfflineSales.cs - Sync engine
src/Offline/SyncEngine.cs - Local store
src/Offline/SqliteLocalStore.cs
Persistence and domain
- Database context
src/Infrastructure/Persistence/PosDbContext.cs - POS entities
src/Domain/Entities - Initial data
src/Infrastructure/Seed/DatabaseSeeder.cs
Other components
- Cashier / staff
Connections 24
- Cashier / staff → Browser app: uses
- Cashier / staff → Desktop app: uses
- Browser app → HTTP API: calls
- Desktop app → HTTP API: calls
- Browser app → API clients: configures UI
src/Web/Program.cs - Checkout UI → API clients: uses
- E-services UI → API clients: uses
- Client auth → API clients: authenticates requests
- HTTP API → Authentication: routes auth
- HTTP API → Database context: initializes database
src/Api/Program.cs - HTTP API → Initial data: runs seeding
src/Api/Program.cs - Product catalog → Database context: uses data context
src/Application/Catalog/ProductService.cs - Catalog import → Product catalog: uses product rules
src/Application/Catalog/ProductImportService.cs - Sales and refunds → Pricing math: calculates cart
src/Application/Sales/SaleService.cs - Sales and refunds → Product catalog: uses product service
src/Application/Sales/SaleService.cs - Inventory and receiving → Purchase orders: uses purchase orders
src/Application/Inventory/StockReceiptService.cs - Inventory and receiving → Pricing math: uses cost math
src/Application/Inventory/StockReceiptService.cs - Sync engine → Local store: reads and writes
src/Offline/SyncEngine.cs - Sync engine → Offline sales: updates offline state
src/Offline/SyncEngine.cs - E-services → POS entities: persists transactions
- Shifts and closing → Database context: uses data context
- Reporting → Database context: uses data context
- Database context → POS entities: maps entities
- Initial data → Database context: seeds records
src/Infrastructure/Seed/DatabaseSeeder.cs