Files
Neon-Desk/package.json
francy51 24aa8e33d4 Consolidate metric definitions with Rust JSON as single source of truth
- Add core.computed.json with 32 ratio definitions (filing + market derived)
- Add Rust types for ComputedDefinition and ComputationSpec
- Create generate-taxonomy.ts to generate TypeScript from Rust JSON
- Generate lib/generated/ (gitignored) with surfaces, computed, kpis
- Update financial-metrics.ts to use generated definitions
- Add build-time generation via 'bun run generate'
- Add taxonomy architecture documentation

Two-phase ratio computation:
- Filing-derived: margins, returns, per-share, growth (Rust computes)
- Market-derived: valuation ratios (TypeScript computes with price data)

All 32 ratios defined in core.computed.json:
- Margins: gross, operating, ebitda, net, fcf
- Returns: roa, roe, roic, roce
- Financial health: debt_to_equity, net_debt_to_ebitda, cash_to_debt, current_ratio
- Per-share: revenue, fcf, book_value
- Growth: yoy metrics + 3y/5y cagr
- Valuation: market_cap, ev, p/e, p/fcf, p/b, ev/sales, ev/ebitda, ev/fcf
2026-03-15 15:22:51 -04:00

72 lines
2.8 KiB
JSON

{
"name": "fiscal-frontend",
"version": "2.0.0",
"private": true,
"packageManager": "bun@1.3.5",
"scripts": {
"dev": "bun run scripts/dev.ts",
"dev:next": "bun --bun next dev --turbopack",
"generate": "bun run scripts/generate-taxonomy.ts",
"build:sidecar": "cargo build --manifest-path rust/Cargo.toml --release --bin fiscal-xbrl",
"build": "bun run generate && bun --bun next build --turbopack",
"bootstrap:prod": "bun run scripts/bootstrap-production.ts",
"check:sidecar": "cargo check --manifest-path rust/Cargo.toml",
"validate:taxonomy-packs": "bun run scripts/validate-taxonomy-packs.ts",
"start": "bun --bun next start",
"lint": "bun run generate && bun x tsc --noEmit",
"e2e:prepare": "bun run scripts/e2e-prepare.ts",
"e2e:webserver": "bun run scripts/e2e-webserver.ts",
"workflow:setup": "workflow-postgres-setup",
"backfill:filing-metrics": "bun run scripts/backfill-filing-metrics.ts",
"backfill:filing-statements": "bun run scripts/backfill-filing-statements.ts",
"backfill:search-index": "bun run scripts/backfill-search-index.ts",
"backfill:taxonomy-snapshots": "bun run scripts/backfill-taxonomy-snapshots.ts",
"compare:fiscal-ai": "bun run scripts/compare-fiscal-ai-statements.ts",
"repair:financial-ingestion-schema": "bun run scripts/repair-financial-ingestion-schema.ts",
"report:taxonomy-health": "bun run scripts/report-taxonomy-health.ts",
"db:generate": "bun x drizzle-kit generate",
"db:migrate": "bun x drizzle-kit migrate",
"test:e2e": "bun run scripts/e2e-run.ts",
"test:e2e:headed": "bun run scripts/e2e-run.ts --headed",
"test:e2e:install": "playwright install chromium",
"test:e2e:ui": "bun run scripts/e2e-run.ts --ui",
"test:e2e:workflow": "RUN_TASK_WORKFLOW_E2E=1 bun test lib/server/api/task-workflow-hybrid.e2e.test.ts"
},
"dependencies": {
"@elysiajs/eden": "^1.4.8",
"@libsql/client": "^0.17.0",
"@tailwindcss/postcss": "^4.2.1",
"@tanstack/react-query": "^5.90.21",
"@workflow/world-postgres": "^4.1.0-beta.42",
"ai": "^6.0.116",
"better-auth": "^1.5.4",
"cheerio": "^1.2.0",
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"drizzle-orm": "^0.41.0",
"elysia": "latest",
"html-to-image": "^1.11.13",
"lucide-react": "^0.575.0",
"next": "^16.1.6",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"recharts": "^3.8.0",
"sonner": "^2.0.7",
"sqlite-vec": "^0.1.7-alpha.2",
"workflow": "^4.1.0-beta.63",
"zhipu-ai-provider": "^0.2.2"
},
"devDependencies": {
"@playwright/test": "^1.58.2",
"@types/node": "^25.3.5",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"autoprefixer": "^10.4.27",
"bun-types": "^1.3.10",
"drizzle-kit": "^0.31.9",
"postcss": "^8.5.8",
"tailwindcss": "^4.2.1",
"typescript": "^5.9.3"
}
}