How saikothawal21/pos-system works
This is a multi-role point-of-sale platform: store administrators manage stores, branches, products, staff, and subscriptions; branch managers oversee operations and reports; cashiers create sales; and super administrators manage stores and plans. The primary workflow is a cashier assembling an order, recording payment, and reviewing shift results, with backend services for orders, payments, refunds, and reporting. The tree and excerpts establish role-based routing and parts of authentication, but do not expose most sales-service calls or frontend API wiring; those links are therefore omitted or marked unverified.
Main entry points: App.jsx Role router · PaymentServiceImpl.java Payment processing · AuthServiceImpl.java Authentication logic · OrderServiceImpl.java Order processing
Components 25
Client application
- Role router
pos-frontend-vite/src/App.jsx - Store workspace
pos-frontend-vite/src/routes/StoreRoutes.jsx - Admin workspace
pos-frontend-vite/src/routes/SuperAdminRoutes.jsx - Branch workspace
pos-frontend-vite/src/routes/BranchManagerRoutes.jsx - Cashier workspace
pos-frontend-vite/src/routes/CashierRoutes.jsx
Identity and access
- Authentication API
pos-backend/src/main/java/com/zosh/controller/AuthController.java - Authentication logic
pos-backend/src/main/java/com/zosh/service/impl/AuthServiceImpl.java - JWT provider
pos-backend/src/main/java/com/zosh/configrations/JwtProvider.java - User API
pos-backend/src/main/java/com/zosh/controller/UserController.java - User services
pos-backend/src/main/java/com/zosh/service/UserService.java - Users and stores
pos-backend/src/main/java/com/zosh/modal/User.java
Store operations
- Catalog and branches
pos-backend/src/main/java/com/zosh/service/impl/ProductServiceImpl.java - Inventory control
pos-backend/src/main/java/com/zosh/service/impl/InventoryServiceImpl.java - Customer records
pos-backend/src/main/java/com/zosh/service/impl/CustomerServiceImpl.java
Sales and billing
- Order processing
pos-backend/src/main/java/com/zosh/service/impl/OrderServiceImpl.java - Payment processing
pos-backend/src/main/java/com/zosh/service/impl/PaymentServiceImpl.java - Payment gateways
pos-backend/src/main/java/com/zosh/service/gateway/StripeService.java - Refund handling
pos-backend/src/main/java/com/zosh/service/impl/RefundServiceImpl.java - Subscriptions
pos-backend/src/main/java/com/zosh/service/SubscriptionService.java
Administration and analytics
- Store and branch analytics
pos-backend/src/main/java/com/zosh/service/impl/StoreAnalyticsServiceImpl.java - Shift reporting
pos-backend/src/main/java/com/zosh/service/ShiftReportService.java - Platform administration
pos-backend/src/main/java/com/zosh/service/impl/AdminDashboardServiceImpl.java
Other components
- Staff or admin
- Application database
- External payment provider
Connections 28
- Staff or admin → Role router: uses
pos-frontend-vite/src/App.jsx - Role router → Store workspace: routes by role
pos-frontend-vite/src/App.jsx - Role router → Admin workspace: routes by role
pos-frontend-vite/src/App.jsx - Role router → Branch workspace: routes by role
pos-frontend-vite/src/App.jsx - Role router → Cashier workspace: routes by role
pos-frontend-vite/src/App.jsx - Role router → User services: loads profile
- Store workspace → Catalog and branches: manages catalog
- Cashier workspace → Order processing: submits sales
- Order processing → Payment processing: records payment
- Payment processing → Payment gateways: delegates payment
- Payment processing → External payment provider: charges externally
- Branch workspace → Shift reporting: reviews shifts
- Staff or admin → Authentication API: authenticates
- Authentication API → Authentication logic: delegates auth
- Authentication logic → Users and stores: reads and saves
pos-backend/src/main/java/com/zosh/service/impl/AuthServiceImpl.java - Authentication logic → JWT provider: creates token
pos-backend/src/main/java/com/zosh/service/impl/AuthServiceImpl.java - User API → User services: requests users
pos-backend/src/main/java/com/zosh/controller/UserController.java - User API → Users and stores: reads users
pos-backend/src/main/java/com/zosh/controller/UserController.java - Catalog and branches → Application database: persists catalog
- Inventory control → Application database: persists stock
- Customer records → Application database: persists customers
- Order processing → Application database: persists orders
- Payment processing → Application database: persists payments
- Refund handling → Application database: persists refunds
- Subscriptions → Application database: persists plans
- Store and branch analytics → Application database: queries sales
- Shift reporting → Application database: queries shifts
- Platform administration → Application database: queries platform