How kreativekraft01-jpg/mepos-online works
MEPoS Online is a web point-of-sale register backed by Express and PostgreSQL, alongside a legacy register interface with broader trading and AI features. The online workflow is staff login, catalog/customer search or entry, then exact-cash checkout and persisted sale/stock updates. The legacy interface adds tills, refunds, vouchers, banking, and an in-browser assistant. Relationships for the online workflow and legacy capabilities are documented in the README; sampled source and the SOURCE INDEX support the internal links shown. Some unsampled feature wiring is therefore omitted.
Main entry points: App.tsx Legacy register app · server.ts API server · online.tsx Online interface · pipeline.ts Answer pipeline
Components 24
Online Register
- Online interface
src/online.tsx - Staff login
src/pages/Login.tsx - Products and customers
src/pages/Products.tsx - Cash checkout
server/src/online.ts
Server and Data
- Paged search
server/src/search.ts - API server
server/src/server.ts - Startup setup
server/src/bootstrap.ts - Fallback state
server/src/state.ts
Legacy Register
- Legacy register app
src/app/App.tsx - POS state
src/store/useStore.ts - Server synchronization
src/utils/serverSync.ts - Customer management
src/app/components/CustomerProfile.tsx - Cart and order history
src/app/components/CartPage.tsx - Refunds and vouchers
src/app/components/RefundOrder.tsx - Tills and banking
src/pages/Tills.tsx - Store settings
src/pages/Settings.tsx
SmartMate Assistant
- Assistant interface
src/components/AiAssistant.tsx - Answer pipeline
src/utils/pipeline.ts - Catalog answers
src/utils/ai.ts - Knowledge retrieval
src/utils/rag.ts - Store skills
src/utils/skills.ts - Browser language model
src/utils/browserLlm.ts
Other components
- Store staff
- PostgreSQL
Connections 25
- Store staff → Staff login: signs in
README.md - Store staff → Online interface: uses register
README.md - Online interface → Products and customers: creates records
README.md - Online interface → Paged search: requests pages
README.md - Online interface → Cash checkout: submits cash sale
README.md - API server → Startup setup: runs setup
server/src/server.ts - API server → Paged search: routes search
server/src/server.ts - API server → Cash checkout: routes register API
server/src/server.ts - Cash checkout → PostgreSQL: records sale
README.md - Paged search → PostgreSQL: queries catalog
README.md - API server → Fallback state: uses fallback state
server/src/server.ts - Store staff → Legacy register app: uses legacy interface
README.md - Legacy register app → POS state: reads and updates
src/app/App.tsx - Legacy register app → Customer management: shows profiles
src/app/App.tsx - Legacy register app → Cart and order history: shows cart pages
src/app/App.tsx - Legacy register app → Refunds and vouchers: routes refunds
src/app/App.tsx - Legacy register app → Tills and banking: supports till work
README.md - Legacy register app → Store settings: configures store
README.md - Legacy register app → Server synchronization: initializes sync
src/App.tsx - Assistant interface → Answer pipeline: uses answers
src/components/AiAssistant.tsx - Answer pipeline → Catalog answers: retrieves catalog answers
src/utils/pipeline.ts - Answer pipeline → Knowledge retrieval: retrieves knowledge
src/utils/pipeline.ts - Answer pipeline → Store skills: matches skills
src/utils/pipeline.ts - Assistant interface → Browser language model: uses local model
src/components/AiAssistant.tsx - Store settings → Browser language model: configures model
src/pages/Settings.tsx