No description
Find a file
2026-10-20 12:39:38 -04:00
.githooks running prettier for cleanup 2025-06-13 13:38:02 -04:00
.vscode format 2025-06-22 17:55:51 -04:00
apps first refactor 2026-10-20 12:39:38 -04:00
database socket reruns 2025-07-04 17:04:47 -04:00
docs test 2026-03-21 13:06:46 -04:00
libs first refactor 2026-10-20 12:39:38 -04:00
monitoring linxus fs fixes 2025-06-09 22:55:51 -04:00
scripts first refactor 2026-10-20 12:39:38 -04:00
test linxus fs fixes 2025-06-09 22:55:51 -04:00
tools/coverage-cli work on new engine 2025-07-04 11:24:27 -04:00
.coveragerc.json fixed format issues 2025-06-26 16:12:27 -04:00
.dockerignore linxus fs fixes 2025-06-09 22:55:51 -04:00
.env test 2025-07-07 15:48:03 -04:00
.eslintignore eslint 2025-06-13 13:38:02 -04:00
.gitignore first refactor 2026-10-20 12:39:38 -04:00
.gitlab-ci.yml first refactor 2026-10-20 12:39:38 -04:00
.prettierignore prettier configs 2025-06-13 13:38:02 -04:00
.prettierrc running prettier for cleanup 2025-06-13 13:38:02 -04:00
bun.lock first refactor 2026-10-20 12:39:38 -04:00
bunfig.toml added cli-covarage tool and fixed more tests 2025-06-26 14:23:01 -04:00
Cargo.lock work on new engine 2025-07-04 11:24:27 -04:00
Cargo.toml work on new engine 2025-07-04 11:24:27 -04:00
CLAUDE.md huge refactor to remove depenencie hell and add typesafe container 2025-06-24 09:37:51 -04:00
docker-compose.dev.yml removed cache mode so noeviction gets set 2025-06-09 22:56:23 -04:00
docker-compose.yml test 2026-03-21 13:06:46 -04:00
eslint.config.js eslint for handlers 2025-06-23 22:34:58 -04:00
knip.json huge refactor to remove depenencie hell and add typesafe container 2025-06-24 09:37:51 -04:00
package.json first refactor 2026-10-20 12:39:38 -04:00
proxy-playwrite.ts fixed browser, made payload optional 2025-06-20 22:16:13 -04:00
README.md first refactor 2026-10-20 12:39:38 -04:00
test-e2e-backtest.sh fixed backtest i think 2025-07-03 20:41:42 -04:00
test-queue.ts huge refactor done 2025-06-24 11:59:35 -04:00
test-rust-strategies.js added trade-tracking and example rust strats 2025-07-03 22:55:23 -04:00
test-typescript-strategy.js added rust engine and adapter pattern 2025-07-03 22:28:31 -04:00
tetest.ts work on spider for te 2025-07-06 15:26:47 -04:00
tsconfig.app.json first refactor 2026-10-20 12:39:38 -04:00
tsconfig.check.json first refactor 2026-10-20 12:39:38 -04:00
tsconfig.contracts.json first refactor 2026-10-20 12:39:38 -04:00
tsconfig.json huge refactor to remove depenencie hell and add typesafe container 2025-06-24 09:37:51 -04:00
tsconfig.lib.json format 2025-06-22 17:55:51 -04:00
tsconfig.unused.json huge refactor to remove depenencie hell and add typesafe container 2025-06-24 09:37:51 -04:00
turbo.json first refactor 2026-10-20 12:39:38 -04:00

Stock Bot

Bun/TypeScript workspaces for market-data collection, processing, APIs, and a React dashboard, with a Rust native trading engine. apps/wcag-ada is an independent project and is not part of the root workspace checks.

Build and verify

Use Bun 1.2.17, Node.js 18 or newer, and a Rust toolchain with a native linker. CI uses Rust 1.88. Building and the tooling/contract checks do not require running databases or provider credentials.

bun install --frozen-lockfile
bun run build
bun run check

The root build selects every buildable leaf workspace, including all stock services and the native engine. bun run build --dry=json shows the actual Turbo task plan.

Command Scope
bun run build:libs Build shared libraries in dependency order
bun run build --clean Force every workspace build without cached results
bun run typecheck Check library, stock application, and tool source directly
bun run test:contracts Compile positive and negative service-contract assertions
bun run test:tooling Run workspace and service-consumer regression tests without infrastructure
bun run lint:check Lint stock applications, libraries, and tools with zero warnings allowed
bun run check Run build, type checking, contract tests, tooling tests, and lint; report every failed gate

check exits nonzero if any gate fails. Existing application type/lint errors are reported; they are not suppressed or baselined. The larger existing bun run test suite is separate: some tests need databases, Redis, browsers, or native-engine fixes.

Native builds generate apps/stock/engine/dist/engine.node and dist/index.d.ts. The public ESM/CommonJS loaders and declaration facade use those generated artifacts. Rebuild after changing Rust APIs. TensorFlow is an optional orchestrator peer dependency used by the ML strategy; install it when using that strategy.

Service contracts

@stock-bot/types contains independent domain, job, and handler types. @stock-bot/services composes service capabilities from the public APIs exported by the owning adapters. It uses type-only imports and does not initialize connections.

import type { IServiceContainer, ServiceTypes } from '@stock-bot/services';
import type { ExecutionContext } from '@stock-bot/types';

The DI and handler packages re-export IServiceContainer for existing consumers. Queue managers and individual queues are separate capabilities: obtain queues through container.queueManager, submit with queue.add, and await results with queue.waitForJob. Use getFullQueueName(service, handler) when addressing another service's queue.