How sapirshenkor/ai-crypto-adviso works
AI Crypto Advisor is a personalized crypto dashboard. Users sign up or log in, save investment preferences during onboarding, then load a dashboard with news, prices, a daily AI insight, and a meme; they can vote on eligible content. The frontend’s authenticated API client connects these stages to FastAPI routes, which delegate to services and persistent user data. README documents provider fallbacks and major features; some backend service internals and frontend components were not excerpted, so edges involving them rely on documented behavior or indexed references.
Main entry points: apiClient.ts Authenticated API client · dashboard_service.py Dashboard assembly · main.py FastAPI routes · App.tsx Application routing
Components 34
Web application
- Application routing
frontend/src/App.tsx - Login and signup
frontend/src/pages/LoginPage.tsx - Onboarding form
frontend/src/pages/OnboardingPage.tsx - Dashboard page
frontend/src/pages/DashboardPage.tsx - Session state
frontend/src/context/AuthProvider.tsx - Token storage
frontend/src/utils/tokenStorage.ts - Authenticated API client
frontend/src/services/apiClient.ts
Identity and preferences
- Auth API service
frontend/src/services/authService.ts - Onboarding API service
frontend/src/services/onboardingService.ts - Auth routes
backend/app/api/routes/auth.py - Auth service
backend/app/services/auth_service.py - JWT user resolution
backend/app/api/deps.py - Onboarding routes
backend/app/api/routes/onboarding.py - Preference service
backend/app/services/onboarding_service.py
Dashboard content
- Dashboard API service
frontend/src/services/dashboardService.ts - Feedback API service
frontend/src/services/feedbackService.ts - Dashboard cards
frontend/src/components/dashboard - Dashboard route
backend/app/api/routes/dashboard.py - Dashboard assembly
backend/app/services/dashboard_service.py - News provider
backend/app/services/news_service.py - Market prices
backend/app/services/market_data_service.py - AI insight
backend/app/services/ai_insight_service.py - Meme content
backend/app/services/meme_service.py - Static fallbacks
backend/app/data/dashboard_fallbacks.py - Feedback routes
backend/app/api/routes/feedback.py - Vote service
backend/app/services/feedback_service.py
API and persistence
- FastAPI routes
backend/app/main.py - User records
backend/app/models/user.py - Preference records
backend/app/models/user_preferences.py - Vote records
backend/app/models/feedback.py
Other components
- Investor
- PostgreSQL
- NewsData.io
- CoinGecko
Connections 43
- Investor → Application routing: opens
README.md - Application routing → Login and signup: routes to
frontend/src/App.tsx - Application routing → Onboarding form: routes to
frontend/src/App.tsx - Application routing → Dashboard page: routes to
frontend/src/App.tsx - Login and signup → Auth API service: submits credentials
README.md - Session state → Auth API service: calls
frontend/src/context/AuthProvider.tsx - Auth API service → Authenticated API client: sends requests
frontend/src/services/authService.ts - Authenticated API client → Token storage: reads token
frontend/src/services/apiClient.ts - Authenticated API client → FastAPI routes: calls API
README.md - FastAPI routes → Auth routes: registers routes
backend/app/main.py - FastAPI routes → Onboarding routes: registers routes
backend/app/main.py - FastAPI routes → Dashboard route: registers routes
backend/app/main.py - FastAPI routes → Feedback routes: registers routes
backend/app/main.py - Auth routes → Auth service: delegates to
backend/app/api/routes/auth.py - Auth routes → JWT user resolution: resolves user
backend/app/api/routes/auth.py - Auth service → User records: reads and writes
backend/app/services/auth_service.py - Onboarding form → Onboarding API service: loads and saves
frontend/src/pages/OnboardingPage.tsx - Onboarding API service → Authenticated API client: sends requests
frontend/src/services/onboardingService.ts - Onboarding API service → Onboarding routes: calls endpoints
README.md - Onboarding routes → Preference service: delegates to
backend/app/api/routes/onboarding.py - Preference service → Preference records: reads and writes
backend/app/services/onboarding_service.py - Dashboard page → Dashboard API service: loads dashboard
frontend/src/pages/DashboardPage.tsx - Dashboard page → Feedback API service: submits votes
frontend/src/pages/DashboardPage.tsx - Dashboard page → Dashboard cards: renders
frontend/src/pages/DashboardPage.tsx - Dashboard API service → Authenticated API client: sends requests
README.md - Dashboard API service → Dashboard route: requests dashboard
README.md - Dashboard route → Dashboard assembly: delegates to
backend/app/api/routes/dashboard.py - Dashboard assembly → News provider: assembles news
README.md - Dashboard assembly → Market prices: assembles prices
README.md - Dashboard assembly → AI insight: assembles insight
README.md - Dashboard assembly → Meme content: assembles meme
README.md - News provider → Static fallbacks: uses fallback
backend/app/services/news_service.py - Market prices → Static fallbacks: uses fallback
backend/app/services/market_data_service.py - AI insight → Static fallbacks: uses fallback
backend/app/services/ai_insight_service.py - News provider → NewsData.io: fetches articles
README.md - Market prices → CoinGecko: fetches prices
README.md - Feedback API service → Authenticated API client: sends requests
frontend/src/services/feedbackService.ts - Feedback API service → Feedback routes: submits votes
README.md - Feedback routes → Vote service: delegates to
backend/app/api/routes/feedback.py - Vote service → Vote records: stores votes
README.md - User records → PostgreSQL: persists in
README.md - Preference records → PostgreSQL: persists in
README.md - Vote records → PostgreSQL: persists in
README.md