How netinova/spomap works
SPOMAP is a Swing desktop point-of-sale and marketplace application. Users authenticate, browse a product catalog, manage a cart, and check out; checkout verifies wallet funds, adjusts stock and balance, then records an invoice. Separate workflows cover invoice history/refunds, profile and wallet management, product administration, shop analytics, and settings and themes. The architecture is documented as MVC, with controllers coordinating UI actions and services handling JSON persistence. Some controller and service implementations were not sampled, so uncertain wiring is omitted.
Main entry points: Main.java Application startup · ShoppingCartController.java Cart and checkout · InvoiceService.java Invoice service · UserService.java User service
Components 25
Swing interface
- Authentication UI
src/View/AuthenticationView.java - Shop UI
src/View/ShopView.java - Cart UI
src/View/ShoppingCartView.java - Invoice UI
src/View/InvoiceView.java - Settings UI
src/View/SettingView.java
Application control
- Application startup
src/Main.java - App orchestrator
src/Controller/AppController.java - Authentication
src/Controller/AuthenticationController.java - Cart and checkout
src/Controller/ShoppingCartController.java - Invoice workflow
src/Controller/InvoiceController.java - Profile management
src/Controller/UserProfileController.java
Commerce services
- Product persistence
src/Service/ProductService.java - Invoice service
src/Service/InvoiceService.java - User service
src/Service/UserService.java
Domain and persistence
- Product catalog
src/Model/ProductCatalog.java - Product records
database/products.json - Invoice records
database/invoices.json - Role user records
database/normal_users.json - Analytics records
database/shop_analytics.json - App settings
database/settings.json - Theme definitions
database/themes.json
Preferences and analytics
- Shop analytics
src/Service/AnalyticsService.java - Settings service
src/Service/SettingsService.java - Theme service
src/Service/ThemeService.java
Other components
- Shop user
Connections 27
- Shop user → Authentication UI: enters credentials
- Authentication UI → Authentication: sends input
- Authentication → User service: authenticates/registers
- User service → Role user records: reads/writes users
- Application startup → App orchestrator: creates controllers
- Application startup → Product persistence: loads products
- Product persistence → Product records: reads/writes catalog
- App orchestrator → Cart and checkout: creates controller
- App orchestrator → Invoice workflow: creates controller
- Shop user → Shop UI: browses products
- Shop user → Cart UI: manages cart
- Cart and checkout → Product catalog: checks products and stock
- Cart and checkout → Invoice service: records checkout
- Cart and checkout → User service: persists wallet
- Invoice workflow → Invoice service: loads invoices
- Invoice workflow → Invoice UI: updates invoice UI
- Invoice service → Invoice records: reads/writes invoices
- Shop user → Profile management: manages profile
- Profile management → User service: updates account
- Profile management → Shop analytics: requests sales metrics
- Shop analytics → Invoice service: queries invoice data
- Shop analytics → Analytics records: persists metrics
- Shop user → Settings UI: changes preferences
- Application startup → Settings service: loads settings
- Application startup → Theme service: loads active theme
- Settings service → App settings: reads/writes settings
- Theme service → Theme definitions: reads/writes themes