npm installCreate .env.local in the root directory:
ANTHROPIC_API_KEY=your-api-key-here
ANTHROPIC_MODEL=claude-3-5-sonnet-20241022Get your API key from: https://console.anthropic.com/
Note: The app will work without the API key, but AI explanations won't be generated.
npm run devVisit: http://localhost:3000
- Click "Get Started" on the landing page
- Complete the 4-step questionnaire:
- Step 1: Tax profile (filing status, income, state)
- Step 2: Investment details (amount, IDC %)
- Step 3: Tax rates (or let us estimate)
- Step 4: Review and calculate
- View your results with AI-generated explanations
# Run unit tests
npm test
# Run with UI
npm run test:ui✅ Complete Features:
- Multi-step questionnaire with validation
- Core tax calculation engine (deterministic)
- Results dashboard with summary cards
- TDC depreciation schedule table
- Claude AI integration for explanations
- Responsive UI with Tailwind + shadcn/ui
- Unit tests for calculation logic
- Disclaimers throughout
- Calculation Logic:
lib/calculations/taxPlanner.ts - AI Integration:
lib/ai/anthropicClient.ts - Questionnaire:
app/plan/page.tsx - Results:
app/results/page.tsx - API Endpoint:
app/api/explain/route.ts
- Add charts/visualizations for depreciation schedule
- PDF export functionality
- Save/load scenarios
- More detailed tax bracket calculations
- Additional validation and edge cases
Ready to use! Just add your Anthropic API key and start the dev server.