How shigosag/shigosag-pos works
Shigosag POS is a web-and-mobile point-of-sale system for inventory, checkout, transfers, and transaction reporting. The web workflow runs from staff authentication and protected screens through product browsing/cart checkout or transfer requests, then backend routes and domain services to persistent records; the UI also exposes history, analytics, balance, and customer operations. Socket.IO supports live updates, and the README describes Stripe-ready checkout. The excerpts show several controller/service and frontend/API links; broader feature links are documented, while unsampled integrations are left unconnected.
Main entry points: prisma.ts Data access · MainLayout.tsx POS workspace · app.ts HTTP application · posController.ts Checkout and transactions
Components 29
Web experience
- Web application
frontend/src/App.tsx - Sign in and register
frontend/src/pages/Auth/Login.tsx - Authentication state
frontend/src/store/authStore.ts - POS workspace
frontend/src/layouts/MainLayout.tsx - Sales and checkout
frontend/src/pages/Sales.tsx - Product management
frontend/src/pages/Products.tsx - Operations reporting
frontend/src/pages/Dashboard.tsx - Other POS screens
frontend/src/pages - Mobile app
mobile/App.tsx - API client
frontend/src/api/api.ts - Checkout modal
frontend/src/pages/CheckoutModal.tsx
API and access
- HTTP application
backend/src/app.ts - Authentication routes
backend/src/routes/authRoutes.ts - Authentication and profiles
backend/src/controllers/authController.ts - Request authentication
backend/src/middleware/authMiddleware.ts - Product routes
backend/src/routes/productRoutes.ts - POS routes
backend/src/routes/posRoutes.ts - Payment route
backend/src/routes/payment.routes.ts
POS operations
- Product operations
backend/src/controllers/productController.ts - Checkout and transactions
backend/src/controllers/posController.ts - Transfer processing
backend/src/services/posService.ts - Retail sale processing
backend/src/services/saleService.ts - Inventory service
backend/src/services/productService.ts - Ledger service
backend/src/services/ledgerService.ts
Persistence and realtime
- Data access
backend/src/lib/prisma.ts - PostgreSQL
- Realtime events
backend/src/lib/socket.ts
Other components
- POS staff
- Stripe-ready payment
Connections 36
- POS staff → Sign in and register: signs in
- Sign in and register → API client: requests auth
frontend/src/pages/Auth/Login.tsx - Sign in and register → Authentication state: updates session
frontend/src/pages/Auth/Login.tsx - Authentication state → Web application: gates routes
frontend/src/App.tsx - Web application → POS workspace: renders protected
frontend/src/App.tsx - POS workspace → Sales and checkout: hosts screen
- POS workspace → Product management: hosts screen
- POS workspace → Operations reporting: hosts screen
- Web application → Other POS screens: routes to
frontend/src/App.tsx - POS staff → Mobile app: uses POS
README.md - Sales and checkout → API client: loads products
frontend/src/pages/Sales.tsx - Sales and checkout → Checkout modal: opens checkout
frontend/src/pages/Sales.tsx - API client → HTTP application: sends API requests
frontend/src/api/api.ts - HTTP application → Authentication routes: mounts
backend/src/app.ts - HTTP application → Product routes: mounts
backend/src/app.ts - HTTP application → POS routes: mounts
backend/src/app.ts - Authentication routes → Authentication and profiles: routes requests
backend/src/routes/authRoutes.ts - Authentication routes → Request authentication: protects endpoints
backend/src/routes/authRoutes.ts - Product routes → Product operations: routes requests
backend/src/routes/productRoutes.ts - Product routes → Request authentication: protects endpoints
backend/src/routes/productRoutes.ts - POS routes → Checkout and transactions: routes requests
backend/src/routes/posRoutes.ts - POS routes → Request authentication: protects endpoints
backend/src/routes/posRoutes.ts - Authentication and profiles → Data access: reads and writes users
backend/src/controllers/authController.ts - Product operations → Inventory service: delegates inventory
backend/src/controllers/productController.ts - Product operations → Realtime events: emits product events
backend/src/controllers/productController.ts - Checkout and transactions → Transfer processing: processes transfer
backend/src/controllers/posController.ts - Checkout and transactions → Retail sale processing: processes sale
backend/src/controllers/posController.ts - Checkout and transactions → Data access: reads transactions
backend/src/controllers/posController.ts - Inventory service → Data access: accesses records
backend/src/services/productService.ts - Transfer processing → Data access: accesses records
backend/src/services/posService.ts - Retail sale processing → Data access: accesses records
backend/src/services/saleService.ts - Ledger service → Data access: accesses records
backend/src/services/ledgerService.ts - Data access → PostgreSQL: persists data
README.md - Payment route → Stripe-ready payment: payment integration
README.md - API client → Realtime events: subscribes to live feed
README.md - Realtime events → POS staff: broadcasts updates
README.md