learning_ai_invt_trdg/backend/package.json
Saravana Achu Mac 5e07ac040d feat: make backend Docker-ready and web Vercel-ready
- Switch @bytelyst/* deps from link: to private Gitea registry (^0.x)
- Add .npmrc pointing to gitea.bytelyst.com private npm registry
- Rewrite backend/Dockerfile: monorepo root context, pnpm workspace,
  correct EXPOSE 4018, CMD node dist/backend/src/bootstrap.js
- Move vercel.json to repo root with pnpm filter build commands
- Remove web/Dockerfile and web/nginx.conf (web is Vercel-only)
- Remove web service from docker-compose.yml (backend Docker only)
- Document GITEA_NPM_TOKEN requirement in .env.example
- Fix start script path: dist/backend/src/bootstrap.js (rootDir: "..")

PREREQUISITE: Set GITEA_NPM_TOKEN and run pnpm install to regenerate
pnpm-lock.yaml before first Docker build.

Vercel settings: Root Directory = repo root, add GITEA_NPM_TOKEN env var.
Docker build: GITEA_NPM_TOKEN=<token> docker compose build

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 19:05:35 -07:00

81 lines
5.0 KiB
JSON

{
"name": "@bytelyst/trading-backend",
"version": "0.1.0",
"type": "module",
"description": "ByteLyst Trading backend and execution control service",
"main": "index.js",
"scripts": {
"test": "npm run check:websocket-contract && npm run check:session-rule-normalization",
"dev": "node --import tsx src/bootstrap.ts",
"build": "tsc",
"typecheck": "tsc --noEmit",
"start": "node dist/backend/src/bootstrap.js",
"check:schema-contract": "node --import tsx verifySchemaContract.ts",
"check:rls-policies": "node --import tsx verifyRlsPolicies.ts",
"check:secret-hygiene": "node --import tsx verifySecretHygiene.ts",
"check:security-guards": "node --import tsx verifySecurityGuards.ts",
"check:tenant-isolation": "node --import tsx verifyTenantIsolation.ts",
"check:trade-executor-lifecycle": "node --import tsx testTradeExecutorLifecycle.ts",
"check:lifecycle-regressions": "node --import tsx testLifecycleRegressions.ts",
"check:order-sync-regressions": "node --import tsx testOrderStatusSyncRegressions.ts",
"check:supabase-order-persistence-regressions": "node --import tsx testSupabaseOrderPersistenceRegressions.ts",
"check:failure-injection": "node --import tsx testFailureInjection.ts",
"check:alpaca-subtag": "node --import tsx testAlpacaSubTag.ts",
"check:strict-capital-guard": "node --import tsx testStrictCapitalGuard.ts",
"check:reconciliation-parity-heartbeat": "node --import tsx testReconciliationParityHeartbeat.ts",
"check:reconciliation-watchdog-auto-resume": "node --import tsx testReconciliationWatchdogAutoResume.ts",
"check:reconciliation-exit-backfill-evidence-guard": "node --import tsx testReconciliationExitBackfillEvidenceGuard.ts",
"check:backtest-isolation": "node --import tsx testBacktestIsolation.ts",
"check:session-rule-normalization": "node --import tsx testSessionRuleNormalization.ts",
"check:websocket-contract": "node --import tsx src/scripts/verifyWebsocketContract.ts",
"coverage:run": "node --loader ts-node/esm runCoverageSuite.ts",
"coverage:full": "npm run coverage:integration",
"coverage:integration": "c8 --all --include=src/**/*.ts --exclude=src/index.ts --exclude=src/scripts/** --reporter=text-summary --reporter=json-summary --reporter=lcov node --loader ts-node/esm runCoverageSuite.ts",
"coverage": "c8 --all --include=src/domain/tradingEnums.ts --include=src/utils/symbolMapper.ts --include=src/connectors/factory.ts --check-coverage --lines 80 --functions 80 --branches 80 --statements 80 --reporter=text-summary --reporter=json-summary --reporter=lcov npx tsx runCriticalCoverageSuite.ts",
"reconcile:lifecycle-history": "node --loader ts-node/esm reconcileTradeHistoryLifecycle.ts",
"reconcile:exit-backfill-once": "node --loader ts-node/esm reconcileExitBackfillOnce.ts",
"reconcile:missing-order-coverage": "node --loader ts-node/esm reconcileMissingOrderCoverage.ts",
"reconcile:closed-order-fill-data": "node --loader ts-node/esm reconcileClosedOrderFillData.ts",
"reconcile:subtag-repair": "node --loader ts-node/esm reconcileSubTagRepair.ts",
"reconcile:attribution-repair": "node --loader ts-node/esm reconcileAttributionRepair.ts",
"reconcile:capital-ledger-state": "node --loader ts-node/esm reconcileCapitalLedgerState.ts",
"lint": "npm run check:schema-contract && npm run check:rls-policies && npm run check:secret-hygiene && npm run check:security-guards && npm run check:tenant-isolation",
"format": "npm run check:trade-executor-lifecycle && npm run check:lifecycle-regressions && npm run check:order-sync-regressions && npm run check:supabase-order-persistence-regressions && npm run check:failure-injection && npm run check:alpaca-subtag && npm run check:strict-capital-guard && npm run check:reconciliation-parity-heartbeat && npm run check:reconciliation-watchdog-auto-resume && npm run check:reconciliation-exit-backfill-evidence-guard && npm run check:backtest-isolation && npm run check:session-rule-normalization && npm run check:websocket-contract",
"check": "npm run build && npm run lint && npm run format",
"pre-deploy": "npm run check",
"cleanup-stale-orders": "node --import tsx src/scripts/cleanupStaleOrders.ts",
"revert-expired-orders": "node --import tsx src/scripts/revertExpiredOrders.ts"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@azure/cosmos": "^4.3.0",
"@azure/identity": "^4.10.0",
"@azure/keyvault-secrets": "^4.9.0",
"@bytelyst/auth": "^0.1.0",
"@bytelyst/config": "^0.1.0",
"@bytelyst/cosmos": "^0.1.0",
"@bytelyst/llm": "^0.1.0",
"@alpacahq/alpaca-trade-api": "^3.1.3",
"@supabase/supabase-js": "^2.90.1",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"ccxt": "^4.5.31",
"cors": "^2.8.5",
"dotenv": "^17.2.3",
"express": "^5.2.1",
"jose": "^6.1.2",
"prom-client": "^15.1.3",
"socket.io": "^4.8.3",
"winston": "^3.19.0"
},
"devDependencies": {
"@types/node": "^25.0.3",
"c8": "^10.1.3",
"ts-node": "^10.9.2",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
}
}