How nurasss/cashback-one works
POSCENTER Loyalty mirrors POSCENTER ONE balances and operations in a cloud API; it does not calculate or redeem loyalty value itself. The main workflow is Windows agent synchronization into the cloud, followed by customer authentication and wallet/app reads, with admin management alongside. The README also identifies Stage 0 discovery, notifications, wallet passes, and POS QR/redemption APIs as product capabilities. Edges are limited to relationships supported by excerpts or README; unsampled subsystem internals are represented at their owning directories.
Main entry points: main.py FastAPI Entry · app.ts Mobile API · runtime.py Sync Runtime · wallet_service.py Wallet Service
Components 29
ONE Sync Agent
- Sync Runtime
agent/src/poscenter_loyalty_agent/runtime.py - Sync State
agent/src/poscenter_loyalty_agent/state_store.py - Stage 0 Discovery
agent/src/poscenter_loyalty_agent/stage0
Cloud API
- FastAPI Entry
backend/app/main.py - Agent Sync API
backend/app/api/agent_sync.py - POS APIs
backend/app/api/agent_pos.py - POS Services
backend/app/api/pos.py - Customer Auth
backend/app/services/sms_auth_service.py - Wallet Service
backend/app/services/wallet_service.py - Loyalty Mirror
backend/app/services/loyalty.py - App Content
backend/app/services/content_service.py - Admin Operations
backend/app/services/admin_queries.py - Media Storage
backend/app/services/media_storage.py - Cloud Data
backend/app/models/entities.py - Notifications
backend/app/services/notification_scheduler.py - Wappi Webhook
backend/app/api/webhooks.py
Customer App
- Mobile Screens
mobile/app/(app)/(tabs)/index.tsx - Mobile Session
mobile/src/auth/provider.tsx - Mobile API
mobile/src/api/app.ts - App Cache
mobile/src/storage/appCache.ts - Login Screen
mobile/app/login.tsx
Admin Console
- Admin Routes
admin/src/layout/AdminRoutes.tsx - Admin Pages
admin/src/pages/BusinessesPage.tsx - Admin API Client
admin/src/api/client.ts
External Services
- Wappi
- SMS Provider
- FTPS Hosting
- Push Service
Other components
- POSCENTER ONE
Connections 29
- POSCENTER ONE → Sync Runtime: read-only data
- Sync Runtime → Sync State: stores sync state
agent/src/poscenter_loyalty_agent/runtime.py - Sync Runtime → Agent Sync API: pushes sync
- Stage 0 Discovery → POSCENTER ONE: profiles schema
- FastAPI Entry → Agent Sync API: routes requests
backend/app/main.py - FastAPI Entry → POS APIs: routes requests
backend/app/main.py - FastAPI Entry → POS Services: routes requests
backend/app/main.py - FastAPI Entry → Wappi Webhook: routes requests
backend/app/main.py - Agent Sync API → Cloud Data: mirrors records
- POS APIs → POS Services: dispatches POS calls
- FastAPI Entry → Customer Auth: serves customer login
- Customer Auth → SMS Provider: sends OTP
backend/app/services/sms_auth_service.py - FastAPI Entry → Wallet Service: serves wallet requests
- Wallet Service → Loyalty Mirror: reads loyalty data
backend/app/services/wallet_service.py - Wallet Service → Cloud Data: reads mirror
backend/app/services/wallet_service.py - FastAPI Entry → App Content: serves app content
- FastAPI Entry → Admin Operations: serves admin requests
- Media Storage → FTPS Hosting: uploads media
backend/app/services/media_storage.py - Wappi Webhook → Wappi: receives events
backend/app/api/webhooks.py - FastAPI Entry → Notifications: starts scheduler
backend/app/main.py - Notifications → Push Service: sends notifications
- Mobile Screens → Mobile API: requests app data
- Login Screen → Mobile Session: starts session
mobile/app/login.tsx - Mobile Session → Mobile API: provides session API
mobile/src/auth/provider.tsx - Mobile API → App Cache: caches content
mobile/src/api/app.ts - Mobile API → FastAPI Entry: calls cloud API
- Admin Routes → Admin Pages: routes to pages
admin/src/layout/AdminRoutes.tsx - Admin Pages → Admin API Client: requests admin data
- Admin API Client → FastAPI Entry: calls cloud API