How anusaini-12/flyrank-ai-capstone works
FlyRank AI is a conversational shopping assistant: a shopper describes needs, the chat route runs a streaming tool-calling model, product search returns real listings, and the home page derives shortlist cards and comparisons from chat results. The README documents additional saved and health routes, an interactive shader hero, a 3D product configurator, accessible component demos, and a motion-button demo. Those branches are included, but their implementation details are not inferred beyond the supplied excerpts.
Main entry points: route.ts Chat API · app/page.tsx Chat and board · playground/page.tsx Accessible demos · ChatPanel.tsx Chat panel
Components 26
Shopping experience
- Chat and board
app/page.tsx - Chat panel
components/chat/ChatPanel.tsx - Budget filter
components/filters/BudgetFilter.tsx - Saved products
app/(shop)/saved/page.tsx - Product card
components/chat/ToolProductCard.tsx
AI and search
- Chat API
app/api/chat/route.ts - Model config
lib/ai-config.ts - Product search tool
lib/tools/search-products.ts
App operations
- Rate limiter
lib/rate-limit.ts - Health page
app/(shop)/health/page.tsx - Health API
app/api/health/route.ts - Primary navigation
app/components/PrimaryNav.tsx
Interactive demos
- Shader hero
app/shader-hero/ShaderPlane.tsx - Shader route
app/shader-hero/page.tsx - 3D configurator
app/3d-viewer/Scene.tsx - 3D viewer route
app/3d-viewer/page.tsx - Headphones model
public/models/headphones.glb
Reusable components
- Accessible demos
app/playground/page.tsx - Disclosure
app/playground/disclosure/Disclosure.tsx - Modal
app/playground/modal/Modal.tsx - Tabs
app/playground/tabs/Tabs.tsx - Motion button demo
app/demo/page.tsx
Other components
- Shopper
- Google Gemini
- SerpApi Shopping
- Upstash Redis
Connections 29
- Shopper → Chat and board: describes needs
- Chat and board → Chat panel: renders chat
- Chat and board → Budget filter: renders filter
- Budget filter → Chat and board: submits criteria
- Chat panel → Chat API: sends messages
- Chat API → Rate limiter: checks limit
- Rate limiter → Upstash Redis: checks quota
- Chat API → Model config: uses prompt and model
- Model config → Google Gemini: configures model
- Chat API → Google Gemini: streams response
- Chat API → Product search tool: offers tool
- Product search tool → SerpApi Shopping: searches listings
- Chat API → Chat and board: streams chat results
- Chat panel → Product card: renders tool results
- Chat and board → Product card: renders board cards
- Shopper → Saved products: opens saved items
- Shopper → Health page: opens health
- Health page → Health API: requests status
- Shopper → Primary navigation: uses navigation
- Shopper → Shader route: opens shader demo
- Shader route → Shader hero: renders scene
- Shopper → 3D viewer route: opens 3D viewer
- 3D viewer route → 3D configurator: renders configurator
- 3D configurator → Headphones model: loads model
- Shopper → Accessible demos: opens component demos
- Accessible demos → Disclosure: renders demo
- Accessible demos → Modal: renders demo
- Accessible demos → Tabs: renders demo
- Shopper → Motion button demo: opens button demo