How ahsensahfi78/techmosepos works
ShoplyPOS is a point-of-sale and retail operations system: staff build and check out sales, while the backend records transactions and updates stock; dashboards and reports expose business status. The Next.js frontend communicates with a FastAPI backend backed by SQLite, with WebSockets distributing stock changes to connected browsers. Beyond checkout, the repository includes inventory, purchasing, ledger/finance, quotations, repairs, warranty, user administration, audit, backup, and eCash capabilities. Several of these modules are unsampled; their presence and routing are visible, but their internal behavior is not inferred here.
Main entry points: main.py FastAPI entry point · api.ts API client · models.py Domain models · auth_mw.py Authentication middleware
Components 23
Storefront
- Point of sale
frontend/app/pos/page.tsx - Dashboard and reports
frontend/app/dashboard/page.tsx - Inventory screens
frontend/app/inventory/page.tsx - API client
frontend/lib/api.ts - Live stock hook
frontend/hooks/useStock.ts
API and Access
- FastAPI entry point
backend/app/main.py - Authentication middleware
backend/app/middleware/auth_mw.py - Token and identity logic
backend/app/auth.py - Role permissions
backend/app/permissions.py
Sales and Stock
- Sales and product routes
backend/app/routers - Sales processing
backend/app/services/sales_service.py - Inventory routes
backend/app/routers/inventory.py
Business Operations
- Purchasing
backend/app/services/purchase_service.py - Party ledger
backend/app/services/ledger_service.py - Transaction search
backend/app/services/transaction_service.py - Business operation routes
backend/app/routers
Data and Sync
- SQLite database
backend/app/database.py - Domain models
backend/app/models.py - User repository
backend/app/repositories/user_repo.py - Audit repository
backend/app/repositories/audit_repo.py - WebSocket manager
backend/app/manager.py
Other components
- Store staff
- Connected browsers
Connections 25
- Store staff → Point of sale: uses
README.md - Point of sale → API client: requests sales
- API client → Sales and product routes: calls API
- Dashboard and reports → API client: requests reports
- Inventory screens → API client: requests inventory
- FastAPI entry point → Sales and product routes: registers routes
backend/app/main.py - FastAPI entry point → Business operation routes: registers routes
backend/app/main.py - FastAPI entry point → Authentication middleware: installs middleware
backend/app/main.py - Authentication middleware → Token and identity logic: decodes tokens
backend/app/middleware/auth_mw.py - Authentication middleware → Domain models: loads user
backend/app/middleware/auth_mw.py - FastAPI entry point → WebSocket manager: manages connections
backend/app/main.py - FastAPI entry point → SQLite database: opens sessions
backend/app/main.py - Sales and product routes → Sales processing: delegates sales
- Sales processing → Domain models: updates sale and stock
backend/app/services/sales_service.py - Purchasing → Party ledger: uses ledger
backend/app/services/purchase_service.py - Sales processing → Party ledger: uses ledger
backend/app/services/sales_service.py - Transaction search → Domain models: queries records
backend/app/services/transaction_service.py - User repository → Domain models: queries users
backend/app/repositories/user_repo.py - FastAPI entry point → User repository: bootstraps admin
backend/app/main.py - FastAPI entry point → Connected browsers: serves WebSocket
backend/app/main.py - FastAPI entry point → WebSocket manager: broadcasts updates
backend/app/main.py - Live stock hook → Connected browsers: applies stock sync
README.md - Inventory routes → WebSocket manager: broadcasts stock
backend/app/routers/inventory.py - Business operation routes → Party ledger: uses ledger
backend/app/routers/ledger.py - Business operation routes → Transaction search: serves transaction feed