How itsflaid/katalyst works
Katalyst is a decision-support app for small businesses: staff record sales and owners review performance, manage products and inventory, and test pricing scenarios. Its documented workflow runs from transaction entry through stored receipt data to dashboard and period analytics; the simulator and grounded Copilot are separate decision-support branches. The graph combines documented capabilities with sampled analytics/query references. Several route-to-domain and Copilot-tool call paths were not shown, so those relationships are omitted rather than inferred.
Main entry points: queries.ts Fact Queries · +server.ts Copilot Chat · +page.server.ts Sales and Product UI · loaders.ts Statistics
Components 18
Sales and Catalog
- Sales and Product UI
src/routes/transactions/+page.server.ts - Product and Stock
src/lib/server/domains/products/queries.ts - Discounts
src/lib/server/domains/discounts/validate.ts
Business Insights
- Dashboard
src/routes/dashboard/+page.server.ts - Statistics
src/lib/server/domains/stats/loaders.ts - Fact Queries
src/lib/server/domains/facts/queries.ts - Sales Analytics
src/lib/analytics/core.ts - Fact Calculations
src/lib/analytics/facts.ts - Period and Time
src/lib/shared/period.ts
Decision Support
- Price Simulator
src/lib/simulation.ts - Copilot Chat
src/routes/copilot/chat/+server.ts - Copilot Tools
src/lib/server/domains/copilot/tools/summary.ts - LLM Provider
Accounts and Data
- Receipts and Items
src/lib/server/db/schema.ts - Authentication and Staff
src/lib/server/domains/auth/auth.ts - Business Settings
src/routes/api/business/+server.ts
Other components
- Owner
- Staff
Connections 20
- Staff → Sales and Product UI: records sales
- Owner → Sales and Product UI: manages sales
- Owner → Product and Stock: manages products
- Owner → Discounts: manages discounts
- Sales and Product UI → Receipts and Items: stores receipts
- Owner → Dashboard: reviews KPIs
- Owner → Statistics: reviews reports
- Statistics → Fact Queries: loads facts
src/lib/server/domains/stats/loaders.ts - Fact Queries → Receipts and Items: queries
src/lib/server/domains/facts/queries.ts - Fact Queries → Sales Analytics: uses calculations
src/lib/server/domains/facts/queries.ts - Sales Analytics → Fact Calculations: uses fact math
src/lib/analytics/core.ts - Period and Time → Statistics: sets report range
- Owner → Price Simulator: tests scenarios
- Price Simulator → Fact Calculations: calculates metrics
src/lib/simulation.ts - Owner → Copilot Chat: asks questions
- Copilot Chat → Copilot Tools: dispatches tools
- Copilot Chat → LLM Provider: requests explanations
- Owner → Authentication and Staff: manages staff
- Owner → Business Settings: updates identity
- Business Settings → Period and Time: sets business timezone