A sophisticated web application designed to help cryptocurrency investors optimize their tax strategy by identifying opportunities for tax loss harvesting.
First, install the dependencies:
npm install
# or
yarn install
# or
pnpm install
# or
bun install
Then, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the application.
This Tax Loss Harvesting Tool helps crypto investors minimize their tax liability by strategically selling assets at a loss to offset capital gains. The application visualizes your current capital gains situation and allows you to select specific holdings to harvest for tax benefits.
- Real-time Capital Gains Tracking: View your short-term and long-term capital gains/losses
- Interactive Holdings Table: Sort and select cryptocurrency holdings for tax loss harvesting
- Tax Savings Calculator: Instantly see potential tax savings based on selected assets
- Responsive Design: Works seamlessly on desktop and mobile devices
src/
├── app/ # Next.js app directory
├── components/ # UI components
├── context/ # TaxHarvestingContext for state management
├── lib/ # Utility functions and calculations
├── services/ # API service functions
└── types/ # TypeScript type definitions
- Dashboard: Main container for the application UI
- CapitalGainsCard: Displays capital gains information
- HoldingsTable: Interactive table for selecting assets to harvest
- TaxHarvestingContext: Manages application state and calculations
This application makes the following assumptions:
- Tax Rate: Uses standard tax rates for short-term and long-term capital gains calculations (actual rates may vary by jurisdiction and income level)
- Asset Cost Basis: Calculates using the first-in, first-out (FIFO) method
- Holding Period: Assumes assets held more than 1 year qualify for long-term capital gains treatment
- Wash Sale Rules: While traditional securities have wash sale restrictions, this tool assumes cryptocurrency transactions are not subject to wash sale rules (as per current regulations in many jurisdictions)
- Data Freshness: Price data should be updated regularly for accurate calculations
- Next.js - React framework
- TypeScript - Typed JavaScript
- Tailwind CSS - Utility-first CSS framework
- Shadcn UI - UI component library
- Lucide React - Icon library
You can customize the application by:
- Modifying the tax rates in the calculations
- Updating the UI theme in
src/app/globals.css
- Adding additional asset types to the data model