How team-finch/finch-frontend works
FINCH is a mobile-first investing web app. Users sign in, choose stocks during onboarding, and then use home/briefings, stock search and analysis, portfolio insights, AI chat, and account actions such as orders and deposits. The main runtime path is route selection into pages, feature queries and mutations, shared API handling, and a backend; chat uses asynchronous job polling. The README documents the broader feature set and architectural direction, but several feature implementations were not sampled, so uncertain internal links are omitted or marked unverified.
Main entry points: router.tsx Route map · httpClient.ts HTTP client · RootLayout.tsx Root layout · SearchPage.tsx Stock search
Components 26
App shell
- App entry
src/main.tsx - Route map
src/app/router.tsx - Root layout
src/app/layouts/RootLayout.tsx - Route definitions
src/shared/config/routes.ts
Identity and account
- Sign-in and guards
src/features/auth/components/RequireAuth.tsx - Session state
src/features/auth/model/useAuthSession.ts - Auth bridge
src/shared/api/authBridge.ts - Stock onboarding
src/features/onboarding - Order checks
src/features/order - Cash operations
src/features/deposit
Market exploration
- Home and briefing
src/features/home - Stock search
src/pages/SearchPage.tsx - Stock analysis
src/pages/StockDetailPage.tsx
AI and portfolio
- Portfolio insights
src/features/portfolio - AI chat
src/pages/ChatPage.tsx - Chat job polling
src/features/chat/api/useChatJobQuery.ts
Shared runtime
- Query cache
src/shared/api/queryClient.ts - Query keys
src/shared/config/queryKeys.ts - API contracts
src/shared/config/apiContract.ts - HTTP client
src/shared/api/httpClient.ts - Shared UI
src/shared/ui/PageMain.tsx - Tab navigation
src/shared/ui/TabBar.tsx - Toast state
src/shared/hooks/useToastStore.ts - Domain types
src/shared/types/stock.ts
Other components
- Investor
- Backend API
Connections 26
- Investor → App entry: opens app
- App entry → Route map: mounts
src/main.tsx - Route map → Root layout: wraps routes
src/app/router.tsx - Route map → Route definitions: uses paths
src/app/router.tsx - Route map → Sign-in and guards: guards pages
src/app/router.tsx - Sign-in and guards → Session state: checks session
- Session state → Auth bridge: shares session
- Investor → Stock onboarding: picks stocks
- Investor → Home and briefing: views briefing
- Investor → Stock search: searches stocks
src/pages/SearchPage.tsx - Stock search → Stock analysis: opens stock
- Investor → Order checks: checks order
- Investor → Cash operations: manages cash
- Investor → Portfolio insights: reviews portfolio
- Investor → AI chat: asks AI
- AI chat → Chat job polling: polls jobs
src/pages/ChatPage.tsx - AI chat → Query cache: uses queries
src/pages/ChatPage.tsx - Chat job polling → Query keys: keys queries
src/features/chat/api/useChatJobQuery.ts - Query cache → HTTP client: uses transport
src/shared/api/index.ts - HTTP client → Auth bridge: checks auth
src/shared/api/httpClient.ts - HTTP client → API contracts: uses contract
src/shared/api/httpClient.ts - HTTP client → Backend API: sends requests
- Stock search → Shared UI: renders page
src/pages/SearchPage.tsx - Root layout → Toast state: shows notices
src/app/layouts/RootLayout.tsx - Root layout → Tab navigation: lays out tabs
- API contracts → Domain types: defines API values
src/shared/types/stock.ts