What it is A Next.js app for equity derivatives: look up a ticker, see quote + ~1y daily history, optionally chain expirations/strikes from Yahoo, and run a Black–Scholes pricer with Greeks (delta, gamma, theta, vega, rho, plus vanna/volga in lib/black-scholes.ts) and charts (OptionPricer, GreeksChart). Metadata and naming (generator: 'v0.app') indicate it originated as a Vercel v0–style scaffold, tuned for deployment on Vercel (@vercel/analytics). Tech stack Layer Choices Framework Next.js 16 (App Router), React 19, TypeScript Styling Tailwind CSS v4, Geist fonts UI Radix UI primitives, shadcn-like components/ui/* (see components.json), lucide-react icons Data SWR on the client; yahoo-finance2 in Route Handlers (app/api/...) Charts Recharts (stock-chart, greeks-chart) Forms / validation (available in deps) react-hook-form, zod, @hookform/resolvers Domain math lives in lib/black-scholes.ts; shared helpers in lib/utils.ts (typical cn() pattern for Tailwind). Folder structure (mental map) app/ — Root layout (layout.tsx), home page (page.tsx), global styles, global-error.tsx. app/api/stock/route.ts — Aggregates quote, 1d historical chart (~1 year), and options chain snapshot (when Yahoo returns it). app/api/options/route.ts — Options chain for a symbol, optional expiration query param. components/ — App-specific UI: option-pricer.tsx, stock-chart.tsx, greeks-chart.tsx, theme-provider.tsx, plus a large ui/ tree of reusable primitives. hooks/ — Shared hooks (e.g. mobile/toast patterns; there is some duplication with components/ui/ hooks). lib/ — black-scholes.ts (pricing + Greeks + data generation for charts), utils.ts. Request flow (high level) User enters a symbol on app/page.tsx (client component). SWR calls GET /api/stock?symbol=..., which uses Yahoo Finance server-side and returns JSON for the dashboard + optional options metadata. OptionPricer combines spot (and optional chain hints) with user inputs (strike, vol, rate, expiry) and lib/black-scholes for theoretical price and Greeks, visualized with GreeksChart / StockChart. If you want to go deeper next, the highest-signal files are app/page.tsx, app/api/stock/route.ts, components/option-pricer.tsx, and lib/black-scholes.ts.

