How manisuryalingineni/ca_ai_demo works
This is a local retail-management app for setting up a business and maintaining its customers, products, and vendors. The main workflow is to complete business setup, then manage those records through screens that call domain services, which validate and scope data before repository access to SQLite. The dashboard and purchase repository are also represented; the tree and excerpts do not establish a broader sales or purchasing workflow. Some screen-to-service links are supported by SOURCE INDEX references rather than inspected call bodies.
Main entry points: App.tsx App shell · businessRepository.ts Business repository · database.ts SQLite database · index.tsx Dashboard
Components 21
App screens
- App shell
App.tsx - Business setup
app/setup/index.tsx - Dashboard
app/dashboard/index.tsx - Customer screens
app/customers - Product screens
app/products - Vendor screens
app/vendors
Domain services
- Business service
src/services/businessService.ts - Customer service
src/services/customerService.ts - Product service
src/services/productService.ts - Vendor service
src/services/vendorService.ts
Persistence
- Business repository
src/repositories/businessRepository.ts - Customer repository
src/repositories/customerRepository.ts - Product repository
src/repositories/productRepository.ts - Vendor repository
src/repositories/vendorRepository.ts - Purchase repository
src/repositories/purchaseRepository.ts - SQLite database
src/database/database.ts
Domain models
- Business model
src/types/business.ts - Customer model
src/types/customer.ts - Product model
src/types/product.ts - Vendor model
src/types/vendor.ts
Other components
- Retail user
Connections 24
- Retail user → App shell: uses
- App shell → Business setup: routes to
- App shell → Dashboard: routes to
- App shell → Customer screens: routes to
- App shell → Product screens: routes to
- App shell → Vendor screens: routes to
- Business setup → Business service: calls
app/setup/index.tsx - Dashboard → Business repository: reads
app/dashboard/index.tsx - Dashboard → Customer repository: reads
app/dashboard/index.tsx - Customer screens → Customer service: calls
app/customers/index.tsx - Product screens → Product service: calls
app/products/index.tsx - Vendor screens → Vendor service: calls
app/vendors/index.tsx - Business service → Business repository: delegates to
src/services/businessService.ts - Customer service → Business repository: checks business
src/services/customerService.ts - Customer service → Customer repository: delegates to
src/services/customerService.ts - Product service → Business repository: checks business
src/services/productService.ts - Product service → Product repository: delegates to
src/services/productService.ts - Vendor service → Business repository: checks business
src/services/vendorService.ts - Vendor service → Vendor repository: delegates to
src/services/vendorService.ts - Business repository → SQLite database: queries
src/repositories/businessRepository.ts - Customer repository → SQLite database: queries
src/repositories/customerRepository.ts - Product repository → SQLite database: queries
src/repositories/productRepository.ts - Vendor repository → SQLite database: queries
src/repositories/vendorRepository.ts - Purchase repository → SQLite database: queries
src/repositories/purchaseRepository.ts