How jospay/ccnph-duplicate works
This is an Expo/React Native cooperative-finance app with file-based screens for accounts, wallet transfers and loans, cooperative services, training, news, commerce, and chat. The main evidenced workflow is opening the dashboard, which loads wallet information and ads through service modules; authenticated API requests use the shared API client and token store. Other screen families are represented from the route tree, but their internal flows are not inferred where source was not sampled.
Main entry points: api.ts HTTP API client · useAuthStore.ts Auth state · index.tsx Home dashboard · walletService.ts Wallet service
Components 34
Account and profile
- Authentication screens
app/(auth) - Profile screens
app/(main-profile) - Profile service
src/services/profileService.ts
Wallet and lending
- Wallet and transfers
app/(load) - Transfer workflow
app/(transper)/index.tsx - Wallet service
src/services/walletService.ts - Loan workflow
app/(loan) - Loan service
src/services/loanService.ts - Loan data types
src/types/loan.types.ts - Transfer verification
src/components/TransferVerifyModal.tsx
Cooperative and content
- Cooperative services
app/(coop)/index.tsx - Training screens
app/(business) - News screens
app/(news)/index.tsx - News service
src/services/newsService.ts
Store and messaging
- Store screens
app/(store) - Product service
src/services/productService.ts - Support chat
app/(chat-support)/index.tsx - Chat service
src/services/chatService.ts - Intellectual chat
app/(intellectual-chat)/index.tsx - Seller chat
app/(store-chat)/index.tsx - Shop chat service
src/services/chatShopService.ts - Chat presentation
src/components/chat-design.tsx
Shared app layer
- Route entry
app/index.tsx - Auth state
src/store/useAuthStore.ts - Home dashboard
app/(main)/index.tsx - HTTP API client
src/services/api.ts - Banner slider
src/components/BannerSlider.tsx - Ad service
src/services/adService.ts - Cooperative theme
src/hooks/useCoopTheme.ts - Alert component
src/components/CustomAlert.tsx - Loading skeleton
src/components/ui/skeleton.tsx - UI state
src/store/useUIStore.ts
Other components
- App user
- Application backend
Connections 36
- App user → Route entry: opens app
app/index.tsx - Route entry → Auth state: checks session
app/index.tsx - Auth state → HTTP API client: refreshes profile
src/store/useAuthStore.ts - Auth state → Application backend: fetches profile
src/store/useAuthStore.ts - Home dashboard → Wallet service: loads balance
app/(main)/index.tsx - Home dashboard → Ad service: loads ads
app/(main)/index.tsx - Banner slider → Ad service: loads ads
src/components/BannerSlider.tsx - Transfer workflow → Wallet service: gets config
app/(transper)/index.tsx - Transfer workflow → Wallet service: calculates fee
app/(transper)/index.tsx - Support chat → Chat service: loads and sends
app/(chat-support)/index.tsx - Intellectual chat → Chat service: loads and sends
app/(intellectual-chat)/index.tsx - Seller chat → Shop chat service: loads and sends
app/(store-chat)/index.tsx - Auth state → HTTP API client: sets auth token
src/services/api.ts - HTTP API client → Application backend: sends requests
src/services/api.ts - News screens → News service: loads news
app/(news)/index.tsx - News screens → News service: searches news
app/(news)/index.tsx - Store screens → Product service: searches products
app/(store)/search.tsx - Loan service → HTTP API client: requests loan data
src/services/loanService.ts - News service → HTTP API client: requests news
src/services/newsService.ts - Wallet service → HTTP API client: requests wallet data
src/services/walletService.ts - Chat service → HTTP API client: requests chat data
src/services/chatService.ts - Product service → HTTP API client: requests product data
src/services/productService.ts - Authentication screens → Auth state: updates session
- Profile screens → Profile service: manages profile
- Cooperative services → HTTP API client: loads cooperative data
- Training screens → HTTP API client: loads training data
- Loan workflow → Loan service: requests loan data
app/(loan)/index.tsx - Support chat → Chat presentation: renders chat UI
app/(chat-support)/index.tsx - Intellectual chat → Chat presentation: renders chat UI
app/(intellectual-chat)/index.tsx - Seller chat → Chat presentation: renders chat UI
app/(store-chat)/index.tsx - Home dashboard → Cooperative theme: uses branding
app/(main)/index.tsx - Home dashboard → UI state: reads UI state
app/(main)/index.tsx - Loan workflow → Loan data types: uses loan types
app/(loan)/index.tsx - Transfer workflow → Transfer verification: verifies transfer
- Alert component → Cooperative theme: uses brand color
src/components/CustomAlert.tsx - Loading skeleton → Application backend: none