How prowider5565/vpos works
This repository implements a point-of-sale and shop-management application: staff use a desktop-oriented frontend to manage sales, order history, cash-desk transactions, products, users, and statistics; a FastAPI backend exposes the domain operations and persists them through SQLAlchemy. The principal workflow is taking a sale and recording an order, then reviewing its history and financial impact. The source index supports several backend and frontend connections; other UI-to-hook and frontend-to-API links are shown as unverified where excerpts do not establish the calls. The mobile tree contains platform shells but no sampled product runtime.
Main entry points: App.tsx App shell · main.py FastAPI application · router.py Cash-desk routes · handlers.py User operations
Components 26
Staff application
- App shell
frontend/src/app/App.tsx - Authentication gate
frontend/src/app/AuthGate.tsx - Point of sale
frontend/src/modules/pos/pages/PosPage.tsx - Sale workflow
frontend/src/modules/pos/hooks/usePosPage.ts - Order history
frontend/src/modules/orderHistory/pages/OrderHistoryPage.tsx - History workflow
frontend/src/modules/orderHistory/hooks/useOrderHistoryPage.ts - Cash desk
frontend/src/modules/cashDesk/pages/CashDeskPage.tsx - Cash desk workflow
frontend/src/modules/cashDesk/hooks/useCashDeskPage.ts - Statistics
frontend/src/modules/statistics/pages/StatisticsPage.tsx - User management
frontend/src/modules/users/pages/UsersPage.tsx - Settings
frontend/src/modules/settings/pages/SettingsPage.tsx
Sales and catalog
- Order routes
backend/orders/router.py - Order operations
backend/orders/handlers.py - Orders and tables
backend/orders/models.py - Product routes
backend/products/router.py - Product operations
backend/products/handlers.py - Products and categories
backend/products/models.py
Financial records
- Cash-desk routes
backend/cash_desk/router.py - Cash-desk records
backend/cash_desk/models.py
Identity and operations
- FastAPI application
backend/main.py - User operations
backend/users/handlers.py - User records
backend/users/models.py - Authentication helpers
backend/users/helpers.py - Cheque printing
backend/cheque/handlers.py
Backend persistence
- Database sessions
backend/config/database.py
Other components
- Staff user
Connections 35
- Staff user → Authentication gate: opens app
- Authentication gate → App shell: admits session
frontend/src/app/App.tsx - App shell → Point of sale: shows sales
frontend/src/app/App.tsx - App shell → Order history: shows history
frontend/src/app/App.tsx - App shell → Cash desk: shows cash desk
frontend/src/app/App.tsx - App shell → Statistics: shows statistics
frontend/src/app/App.tsx - App shell → User management: shows users
frontend/src/app/App.tsx - App shell → Settings: shows settings
frontend/src/app/App.tsx - Point of sale → Sale workflow: uses workflow
- Order history → History workflow: uses workflow
- Cash desk → Cash desk workflow: uses workflow
- Sale workflow → Order routes: requests sales
- History workflow → Order routes: requests history
- Cash desk workflow → Cash-desk routes: requests records
- User management → User operations: requests users
- Statistics → Order routes: requests analytics
- FastAPI application → Order routes: mounts routes
backend/main.py - FastAPI application → Product routes: mounts routes
backend/main.py - FastAPI application → User operations: mounts routes
backend/main.py - FastAPI application → Cash-desk routes: mounts routes
backend/main.py - FastAPI application → Cheque printing: mounts on Windows
backend/main.py - Order routes → Order operations: dispatches operations
backend/orders/router.py - Order operations → Orders and tables: queries and writes
backend/orders/handlers.py - Order operations → Products and categories: reads products
backend/orders/handlers.py - Product routes → Product operations: dispatches operations
backend/products/router.py - Product operations → Products and categories: queries and writes
backend/products/handlers.py - Cash-desk routes → Cash-desk records: queries and writes
backend/cash_desk/router.py - Cash-desk routes → Orders and tables: reads paid orders
backend/cash_desk/router.py - User operations → Authentication helpers: authenticates and hashes
backend/users/handlers.py - User operations → User records: queries and writes
backend/users/handlers.py - Order operations → Database sessions: uses session
- Product operations → Database sessions: uses session
- Cash-desk routes → Database sessions: gets session
backend/cash_desk/router.py - User operations → Database sessions: gets session
backend/users/handlers.py - Cheque printing → FastAPI application: included conditionally
backend/main.py