Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
df1d1b0
docs: add production env template and self-hosting guide
namjar Mar 13, 2026
2cc2984
feat(infra): add database backup script with retention
namjar Mar 13, 2026
b07a916
fix(packages): reorder exports field — types before conditional imports
namjar Mar 13, 2026
3add86b
chore(cli): add tsup.config.ts for consistent build configuration
namjar Mar 13, 2026
80966ce
fix(infra): make backup script executable
namjar Mar 13, 2026
34f2a79
refactor(web): consolidate billing fetch calls into typed api.ts, rem…
namjar Mar 13, 2026
b055a83
feat: add 1099-DA covered vs noncovered classification for 2026 compl…
namjar Mar 13, 2026
467fa11
chore(web): install lucide-react and create component library directory
namjar Mar 14, 2026
68c50f2
feat: add strategy pattern to CostBasisCalculator + landing global ro…
namjar Mar 14, 2026
a152dbf
docs: update README with dTax branding, logo, and 6 language translat…
namjar Mar 14, 2026
f8f72c6
fix: include multilingual READMEs in public repo sync + fix logo path
namjar Mar 14, 2026
1244fe3
feat(seo): comprehensive SEO + GEO + content marketing implementation
namjar Mar 15, 2026
97439d5
feat(tax-engine): add 3 international cost basis methods (GERMANY_FIF…
namjar Mar 15, 2026
362ceef
fix(web): replace dtax.ai/dtax.dev with getdtax.com + add PWA support
namjar Mar 15, 2026
39ed0ba
fix(tax-engine): use calendar-based holding period per IRS rules
namjar Mar 16, 2026
8f271df
fix(tax-engine): fix fragile wrap-unwrap consumed lot check
namjar Mar 16, 2026
d8de1f8
refactor(tax-engine): extract shared getHoldingPeriod to DRY method h…
namjar Mar 16, 2026
52a6cab
fix(types): align parser TxType with shared-types and add internation…
namjar Mar 16, 2026
6426330
fix(tax-engine): add backward 30-day wash sale check in risk scanner
namjar Mar 16, 2026
48bb1a7
refactor(tax-engine): split form8949-pdf.ts into 3 focused modules
namjar Mar 17, 2026
c5af18d
test(cli): expand integration tests from 13 to 30 cases
namjar Mar 17, 2026
a3845e4
feat(web): support Excel (.xlsx/.xls) file import with auto CSV conve…
namjar Mar 17, 2026
690b51d
feat(tax-engine): add multi-language support for Binance CSV parser
namjar Mar 17, 2026
8fe5947
refactor(tax-engine): extract shared col-resolver module from Binance…
namjar Mar 17, 2026
fa7dc82
feat(tax-engine): add Japanese/Chinese header support for HTX parser
namjar Mar 17, 2026
64a5de0
feat(tax-engine): add defensive i18n header support for Crypto.com pa…
namjar Mar 17, 2026
1d68db8
feat(tax-engine): add defensive i18n header support for OKX parser
namjar Mar 17, 2026
4067dab
feat(tax-engine): add defensive i18n header support for Bybit parser
namjar Mar 17, 2026
267aae6
feat(tax-engine): add defensive i18n header support for MEXC parser
namjar Mar 17, 2026
7acc25f
feat(tax-engine): add defensive i18n header support for Bitget parser
namjar Mar 17, 2026
d81e501
feat(tax-engine): add defensive i18n header support for Gate.io parser
namjar Mar 17, 2026
3c4c1fc
feat(tax-engine): add i18n cross-format detection tests and fix false…
namjar Mar 17, 2026
486591a
feat: implement multi-provider AI system with BYOK support
namjar Mar 17, 2026
2676f3f
refactor: extract analytics routes to admin-analytics.ts + install re…
namjar Mar 18, 2026
38a62c9
feat: CARF compliance features — UK Share Pooling, countdown, export
namjar Mar 18, 2026
08530cb
feat(simulator): expand compare-methods to 7 cost-basis methods + fix…
namjar Mar 19, 2026
ef35098
fix(cli): update compareAllMethods usage to new methods Record structure
namjar Mar 19, 2026
dee1726
fix(security): 22-item security audit fixes — OWASP hardening pass
namjar Mar 19, 2026
1a5357e
feat(security): architecture tasks #55-#60 — TOTP encryption, admin g…
namjar Mar 19, 2026
cd9a8f8
chore(deps): Bump the production-deps group across 1 directory with 1…
dependabot[bot] Mar 19, 2026
5ff7527
ci: add public-repo CI and fix sync workflow
namjar Mar 19, 2026
dc4689f
ci(deps): Bump actions/setup-node from 4 to 6
dependabot[bot] Mar 19, 2026
3d25b29
ci(deps): Bump actions/checkout from 4 to 6
dependabot[bot] Mar 19, 2026
6f5d987
docs: update all READMEs — 8 cost basis methods + 980+ tests
namjar Mar 19, 2026
43cf531
chore(deps): bump pdfkit 0.17.2 → 0.18.0
namjar Mar 19, 2026
ab02c2f
Merge pull request #1 from dTaxLab/dependabot/github_actions/actions/…
namjar Mar 19, 2026
c3841f9
Merge pull request #2 from dTaxLab/dependabot/github_actions/actions/…
namjar Mar 19, 2026
ff27b54
Merge pull request #15 from dTaxLab/dependabot/npm_and_yarn/productio…
namjar Mar 19, 2026
87be13e
ci(deps): Bump pnpm/action-setup from 4 to 5
dependabot[bot] Mar 19, 2026
cab07bf
Merge pull request #17 from dTaxLab/dependabot/github_actions/pnpm/ac…
namjar Mar 19, 2026
0d0de3d
chore(deps): Bump @types/node from 20.19.37 to 25.4.0
dependabot[bot] Mar 19, 2026
915dee5
chore(deps): Bump dotenv from 16.6.1 to 17.3.1
dependabot[bot] Mar 19, 2026
a9ec98f
chore(deps): Bump the production-deps group across 1 directory with 1…
dependabot[bot] Mar 19, 2026
1518a9e
Merge pull request #19 from dTaxLab/dependabot/npm_and_yarn/productio…
namjar Mar 19, 2026
9a0a272
Merge pull request #9 from dTaxLab/dependabot/npm_and_yarn/types/node…
namjar Mar 19, 2026
cab21ad
Merge pull request #4 from dTaxLab/dependabot/npm_and_yarn/dotenv-17.3.1
namjar Mar 19, 2026
438c6e3
chore(deps): Bump eslint from 9.39.4 to 10.0.3
dependabot[bot] Mar 19, 2026
01ccd31
chore(deps): Bump @fastify/cors from 10.1.0 to 11.2.0
dependabot[bot] Mar 19, 2026
488a694
chore(deps): Bump zod from 3.25.76 to 4.3.6
dependabot[bot] Mar 19, 2026
bc31880
security: five-step audit fixes — JWT, Sentry PII, Actions SHA pinnin…
namjar Mar 19, 2026
51d0eb0
Merge pull request #5 from dTaxLab/dependabot/npm_and_yarn/fastify/co…
namjar Mar 19, 2026
d29b2cd
Merge pull request #7 from dTaxLab/dependabot/npm_and_yarn/eslint-10.0.3
namjar Mar 19, 2026
e90ead0
Merge pull request #10 from dTaxLab/dependabot/npm_and_yarn/zod-4.3.6
namjar Mar 19, 2026
a4102aa
feat: upgrade Zod 3→4 and Vitest 2→4 (Plan A + B)
namjar Mar 20, 2026
8494e5d
refactor: merge AdminNav isAdminPlus blocks + add UK_SHARE_POOLING to…
namjar Mar 20, 2026
a9fbdb1
feat(docs): add docs-site (dtax.dev), migrate apps/docs → docs/
namjar Mar 20, 2026
87fe585
feat(docs-site): add 6-language i18n (zh-CN/ja/ko/de/fr/es) + footer …
namjar Mar 20, 2026
259cbe7
fix(docs-site): redirect / to /en/ via Cloudflare Pages _redirects
namjar Mar 20, 2026
6d4af7e
fix(docs-site): browser language detection + zh-cn lowercase fix
namjar Mar 20, 2026
d82d2e2
fix(docs-site): use Pages Function for Accept-Language detection
namjar Mar 20, 2026
fa5dfa5
feat(docs-site): redesign logo with badge icon + path-based wordmark
namjar Mar 20, 2026
5cc32d3
fix(docs-site): use actual brand logo (logo-512.png from web/public)
namjar Mar 20, 2026
971768c
feat(blockchain): Plan-35 DeFi wallet sync — NFT/WRAP/BRIDGE/STAKING/…
namjar Mar 21, 2026
b4178be
feat(docs-site): add self-hosting page (7 locales) + fix Docker deplo…
namjar Mar 21, 2026
481c373
feat(price): dual-source routing — Polygon.io + CoinGecko adapter pat…
namjar Mar 21, 2026
8c3e2c7
fix(ci): update pnpm lockfile + add tsconfig.base.json to public sync
namjar Mar 21, 2026
4c12877
feat(wallet): fix EVM sync rate limit, dust filter, FAQ docs, AI play…
namjar Mar 22, 2026
14f4749
feat(admin): IP geolocation, user filters, sync feedback, decimal ove…
namjar Mar 22, 2026
235ff0d
docs: update public docs and sync whitelist
namjar Mar 22, 2026
3347220
ci: skip CI and publish jobs on private repo to avoid billing
namjar Mar 22, 2026
52ca1c9
feat(deploy): production Docker Compose config, SSL automation, and d…
maxwellyu1024 Mar 23, 2026
863453f
perf(docker): upgrade to Node 24, fix pnpm symlink issue, optimize AP…
maxwellyu1024 Mar 23, 2026
41ee84c
fix(deploy): rewrite init-letsencrypt.sh to avoid depends_on deadlock
maxwellyu1024 Mar 23, 2026
aa99c11
fix(api): upgrade zod-openapi to v5, fix Zod v4 schema validation error
maxwellyu1024 Mar 23, 2026
560f00a
feat(dx): add typecheck command across all workspace packages
maxwellyu1024 Mar 24, 2026
a37b321
fix(docs-site): install @astrojs/check for typecheck command
maxwellyu1024 Mar 24, 2026
70235ed
fix(lint): add ESLint 9 flat config for api and tax-engine
maxwellyu1024 Mar 24, 2026
e7ada73
feat(dx): add start command to root and turbo config
maxwellyu1024 Mar 24, 2026
e2092a4
fix(cli): add @types/node to fix DTS build errors
maxwellyu1024 Mar 24, 2026
46e6a50
fix(api): deduplicate operationId, install openapi-generator-cli
maxwellyu1024 Mar 24, 2026
aca4cb9
chore(docs-site): update Astro generated types
maxwellyu1024 Mar 24, 2026
77fcf39
chore(docs-site): gitignore .astro/ generated files
maxwellyu1024 Mar 24, 2026
74766f3
fix(docker): use node fetch for API healthcheck, fix web listen address
maxwellyu1024 Mar 24, 2026
a9965d8
fix(deploy): nginx dual API path, update runbook and env example
maxwellyu1024 Mar 24, 2026
9a599a0
feat(web): i18n SEO hardcodes + JSON-LD + breadcrumbs + PostHog nginx…
namjar Mar 24, 2026
18f7422
feat(docker): mount blog content as volume for hot-update without reb…
namjar Mar 25, 2026
8ee1579
docs: cloud server deployment update guide for ops Claude Code
namjar Mar 25, 2026
2ba4364
feat(docs-site): replace ugly text logo with Stitch-generated hero il…
namjar Mar 25, 2026
fc64e08
feat(deploy): rewrite setup-server.sh as idempotent one-command deploy
powerpook Mar 25, 2026
999e617
fix: clean cron block properly on repeated setup-server runs
powerpook Mar 25, 2026
06c72a2
feat(deploy): add auto-update script with smart change detection
powerpook Mar 25, 2026
5d344d1
docs: update README.md to match actual dtax.dev sections
namjar Mar 25, 2026
61563ef
fix(deploy): prevent cron conflicts, add cleanup for images/logs
powerpook Mar 25, 2026
536093e
feat(deploy): add maintenance mode to auto-update
powerpook Mar 25, 2026
e857cb9
feat(deploy): add maintenance.sh for manual ops workflow
powerpook Mar 25, 2026
2374c2e
docs: rewrite cloud deploy guide with automation and maintenance mode
powerpook Mar 25, 2026
b63dfbb
docs: remove obsolete deployment docs
powerpook Mar 25, 2026
163a95e
docs: add mermaid diagrams for auto-update flow and cron timeline
powerpook Mar 25, 2026
e686396
Merge branch 'main' of powerpook:dTaxLab/dtax-private
powerpook Mar 25, 2026
c10711e
fix(docs-site): hero Get Started link use relative slug for i18n routing
namjar Mar 25, 2026
b999d57
Add Cloudflare Workers configuration
cloudflare-workers-and-pages[bot] Mar 25, 2026
3558325
Merge pull request #9 from dTaxLab/cloudflare/workers-autoconfig
namjar Mar 25, 2026
8dd0762
ci(deps): Bump changesets/action
dependabot[bot] Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .env.production.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# =============================================================================
# DTax Production Environment Variables
# Copy this file to .env and fill in the values
# =============================================================================

# ---- Required ----
DATABASE_URL="postgresql://dtax:CHANGE_ME@postgres:5432/dtax?schema=public"
POSTGRES_PASSWORD=CHANGE_ME
JWT_SECRET=CHANGE_ME_AT_LEAST_32_CHARACTERS_LONG
# ENCRYPTION_KEY must be a 64-char hex string: run `openssl rand -hex 32`
ENCRYPTION_KEY=CHANGE_ME_64_HEX_CHARS_RUN_openssl_rand_hex_32
NODE_ENV=production

# ---- URLs ----
HOST=0.0.0.0
PORT=3001
CORS_ORIGIN=https://yourdomain.com
APP_URL=https://yourdomain.com
NEXT_PUBLIC_API_URL=https://yourdomain.com
NEXT_PUBLIC_SITE_URL=https://yourdomain.com

# ---- Email (Resend) ----
RESEND_API_KEY=CHANGE_ME
FROM_EMAIL=noreply@yourdomain.com

# ---- Payments (Stripe) ----
STRIPE_SECRET_KEY=CHANGE_ME
STRIPE_WEBHOOK_SECRET=CHANGE_ME
STRIPE_PRO_PRICE_ID=
STRIPE_CPA_PRICE_ID=

# ---- AI (Anthropic) ----
ANTHROPIC_API_KEY=CHANGE_ME

# ---- Blockchain Indexers ----
ETHERSCAN_API_KEY=
SOLSCAN_API_KEY=

# ---- Analytics (PostHog) ----
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com

# ---- Error Tracking (Sentry) ----
SENTRY_DSN=
SENTRY_AUTH_TOKEN=
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://github.com/dTaxLab/dtax/discussions
about: Ask questions or share ideas
- name: Documentation
url: https://dtax.dev
url: https://getdtax.com
about: Check the docs first
99 changes: 99 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test & Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22]

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install pnpm
uses: pnpm/action-setup@b307475762933b98ed359c036b0e51f26b63b74b # v5.0.0

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build shared-types
run: pnpm --filter @dtax/shared-types run build

- name: Type check (tax-engine)
run: pnpm --filter @dtax/tax-engine exec tsc --noEmit

- name: Type check (cli)
run: pnpm --filter @dtax/cli exec tsc --noEmit

- name: Test (tax-engine)
run: pnpm --filter @dtax/tax-engine run test

- name: Test (cli)
run: pnpm --filter @dtax/cli run test

- name: Build (all packages)
run: pnpm run build

lint:
name: Lint & Format
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install pnpm
uses: pnpm/action-setup@b307475762933b98ed359c036b0e51f26b63b74b # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check formatting
run: npx prettier --check "**/*.{ts,tsx,js,jsx,json,md}"

dependency-audit:
name: Dependency Audit
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install pnpm
uses: pnpm/action-setup@b307475762933b98ed359c036b0e51f26b63b74b # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Audit dependencies
run: pnpm audit --audit-level=high
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish:
runs-on: ubuntu-latest
if: github.repository != 'dTaxLab/dtax-private'
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: pnpm/action-setup@b307475762933b98ed359c036b0e51f26b63b74b # v5.0.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: pnpm
Expand All @@ -25,7 +26,7 @@ jobs:
- run: pnpm build

- name: Create Release PR or Publish
uses: changesets/action@v1
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
with:
publish: pnpm publish-packages
title: "chore: release packages"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ data/reports/

# Generated
*.tsbuildinfo
apps/data/
.maintenance
171 changes: 171 additions & 0 deletions README.es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
<p align="center">
<img src="docs/logo.png" alt="dTax" width="120" height="120">
<h1 align="center">dTax</h1>
<p align="center">
<strong>El único motor completo de impuestos cripto en TypeScript disponible en npm</strong>
</p>
<p align="center">
<a href="https://github.com/dTaxLab/dtax/actions/workflows/ci.yml"><img src="https://github.com/dTaxLab/dtax/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-blue" alt="License"></a>
<a href="https://www.npmjs.com/package/@dtax/tax-engine"><img src="https://img.shields.io/npm/v/@dtax/tax-engine" alt="npm"></a>
<a href="https://github.com/dTaxLab/dtax"><img src="https://img.shields.io/github/stars/dTaxLab/dtax?style=social" alt="Stars"></a>
</p>
<p align="center">
<a href="README.md">English</a> · <a href="README.zh.md">简体中文</a> · <a href="README.zh-Hant.md">繁體中文</a> · <a href="README.es.md">Español</a> · <a href="README.ja.md">日本語</a> · <a href="README.ko.md">한국어</a> · <a href="README.pt.md">Português</a>
</p>
</p>

---

**23 parsers de exchanges** | **8 métodos de base de coste** — FIFO / LIFO / HIFO / UK Share Pooling / +4 más | **Form 8949 + Schedule D** | **Detección de wash sales** | **Simulador de escenarios**

## Instalación

```bash
npm install @dtax/tax-engine
```

## Ejemplo rápido

```typescript
import {
parseCsv,
CostBasisCalculator,
generateForm8949,
} from "@dtax/tax-engine";

// 1. Parse any exchange CSV (auto-detects format)
const { lots, events } = parseCsv(csvString);

// 2. Calculate gains/losses
const calc = new CostBasisCalculator("FIFO");
calc.addLots(lots);
const results = events.map((e) => calc.calculate(e));

// 3. Generate IRS Form 8949
const report = generateForm8949(results);
```

## CLI

Calcula impuestos desde la línea de comandos sin escribir código:

```bash
npx @dtax/cli calculate trades.csv --method FIFO
npx @dtax/cli calculate trades.csv --method LIFO --year 2025 --json
npx @dtax/cli calculate coinbase.csv binance.csv --method HIFO
```

Instala globalmente para uso frecuente:

```bash
npm install -g @dtax/cli
dtax calculate trades.csv --method FIFO --form8949 report.csv
dtax calculate trades.csv --schedule-d --include-wash-sales
```

## Exchanges soportados (23 parsers)

Todos los parsers detectan automáticamente el formato CSV. No requiere configuración.

| Categoría | Exchanges |
| ----------- | ----------------------------------------------------------------------------------- |
| Principales | Coinbase, Binance, Binance US, Kraken, Gemini |
| Globales | KuCoin, OKX, Bybit, Gate.io, Bitget, MEXC, HTX (Huobi) |
| Otros | Crypto.com, Bitfinex, Poloniex |
| On-chain | Etherscan (ETH + ERC-20 + BSC/Polygon/Avalanche/Fantom), Solscan (SOL + SPL + DeFi) |
| Migración | Koinly, CoinTracker, Cryptact (importar desde competidores) |
| Genérico | Generic CSV (mapea tus propias columnas) |

## Características

- **8 métodos de base de coste** -- FIFO, LIFO, HIFO, Specific ID, UK Share Pooling, Germany FIFO, PMPA, Total Average (EE.UU. + internacional)
- **Form 8949** -- Exportación en CSV, PDF y TXF (TurboTax) con clasificación Box A-F
- **Schedule D** -- Agregación Part I/II, límite de pérdidas de $3,000, cálculo de arrastre
- **Detección de wash sales** -- Ventana de 30 días, rechazo parcial, código W en Form 8949
- **Simulador de escenarios** -- Previsualiza el impacto fiscal antes de vender (`simulateSale()`)
- **Comparación de métodos** -- Encuentra el método óptimo entre FIFO/LIFO/HIFO (`compareAllMethods()`)
- **Soporte DeFi + NFT** -- Depósitos/retiros de LP, staking, wraps, bridges, 12 tipos de transacciones DeFi
- **Reconciliación 1099-DA** -- Coincidencia en 3 fases contra datos reportados por brokers
- **Análisis de portafolio** -- Agregación de posiciones, P&L no realizado, oportunidades de tax-loss harvesting
- **Contabilidad aislada por wallet** -- Aislamiento estricto de base de costo por wallet
- **Detección de transferencias internas** -- Detección automática de transferencias entre tus propias wallets

## Comparación con alternativas

| Característica | dTax | Rotki | RP2 |
| ------------------------------- | :--------: | :-----: | :------: |
| Lenguaje | TypeScript | Python | Python |
| Instalable vía npm | Yes | No | No |
| Parsers de exchanges | 23 | 15 | 8 |
| Métodos de base de costo | 8 | 3 | 3 |
| Form 8949 PDF | Yes | No | No |
| Exportación TXF TurboTax | Yes | No | No |
| Generación de Schedule D | Yes | No | No |
| Detección de wash sales | Yes | Yes | No |
| Simulador de escenarios | Yes | No | No |
| Comparación de métodos | Yes | No | No |
| Tipos de tx DeFi/NFT | 12 | 8 | 4 |
| Reconciliación 1099-DA | Yes | No | No |
| Importación CSV de competidores | Yes | No | No |
| Herramienta CLI | Yes | Yes | Yes |
| Navegador/Node.js | Both | Desktop | CLI only |

## Paquetes

| Paquete | Descripción |
| --------------------------------------------- | --------------------------------------------- |
| [`@dtax/tax-engine`](packages/tax-engine) | Motor de cálculo principal, parsers, reportes |
| [`@dtax/cli`](packages/cli) | Interfaz de línea de comandos |
| [`@dtax/shared-types`](packages/shared-types) | Definiciones de tipos TypeScript |

## Aspectos destacados de la API

```typescript
// Cost basis calculation
import { calculateFIFO, calculateLIFO, calculateHIFO } from "@dtax/tax-engine";

// Reports
import {
generateForm8949,
form8949ToCsv,
generateForm8949Pdf,
} from "@dtax/tax-engine";
import { generateScheduleD } from "@dtax/tax-engine";
import { form8949ToTxf } from "@dtax/tax-engine"; // TurboTax

// Analysis
import { detectWashSales } from "@dtax/tax-engine";
import { simulateSale } from "@dtax/tax-engine"; // what-if
import { compareAllMethods } from "@dtax/tax-engine"; // optimizer
import { analyzeHoldings } from "@dtax/tax-engine"; // portfolio

// Parsers (auto-detect or use individually)
import { parseCsv, detectCsvFormat } from "@dtax/tax-engine";
```

## Contribuir

Las contribuciones son bienvenidas. Consulta [CONTRIBUTING.md](CONTRIBUTING.md) para las directrices.

```bash
# Prerequisites: Node.js >= 20, pnpm >= 9
git clone https://github.com/dTaxLab/dtax.git && cd dtax
pnpm install
pnpm test # 980+ tests across all packages
pnpm build # build all packages
```

## Licencia

Todos los paquetes en este repositorio están licenciados bajo [AGPL-3.0](LICENSE).

Esto significa que puedes usar dTax libremente en tus proyectos. Si modificas el código fuente y lo distribuyes (incluyendo como un servicio en red), debes publicar tus modificaciones bajo AGPL-3.0.

Para consultas sobre licencias comerciales: [getdtax.com](https://getdtax.com)

## Enlaces

- Sitio web: [getdtax.com](https://getdtax.com)
- Problemas: [GitHub Issues](https://github.com/dTaxLab/dtax/issues)
- Discusiones: [GitHub Discussions](https://github.com/dTaxLab/dtax/discussions)
Loading
Loading