Skip to content

Architecture

One workstation, several focused services. Use this map to choose where to make a change and which processes you need to run.

The Angular application sends /api requests to NestJS. NestJS calls the Rust API for market and LLM operations, and PostgREST for database-backed operations. The Rust API also has a direct PostgreSQL connection.

Service map · simplified request paths
Angular workstation
├─ Browser indicators ← WASM bindings ← shared Rust calculations
└─ /api → NestJS
├─ Rust API → exchanges / LLM providers
│ └─ PostgreSQL
└─ PostgREST → PostgreSQL
External AI client → MCP (stdio or HTTP)
├─ Rust API: live feeds, plans, models, vision
└─ NestJS: alerts and watchlists

This is a responsibility map, not an exhaustive endpoint diagram. Some MCP market tools use shared market clients directly; not every tool goes through the Rust HTTP API. Browser-side indicators do not require a server round trip for the calculation itself.

Area Product repository path Responsibility
Workstation frontend/apps/www/ Angular UI, charts, client-side interactions
Application API frontend/apps/api/ NestJS sessions, alerts, watchlists and application data
Rust HTTP API backend/crates/api/ Actix service, markets, LLM and live-feed endpoints
Shared indicators backend/crates/indicators/ Calculations shared by Rust and browser bindings
Browser bindings wasm/src/ and wasm/pkg/ Rust-to-WASM interface and the committed frontend package
MCP backend/crates/mcp/ Tool catalog, transport handlers and service clients
Database initialization docker/init.sql Initial schema for new Docker and desktop databases
Desktop shells desktop/electron/ and desktop/tauri/ Native windows, packaging and local sidecars

The backend, WASM, and Tauri are separate Cargo projects with separate lockfiles. Run a Cargo command from the project you intend to change, not from the repository root.

The app container packages the UI, NestJS, Rust API, MCP, PostgreSQL and PostgREST. The UI is exposed on localhost:8080 by default; HTTP MCP is mapped to 127.0.0.1:8181. The database uses a named volume.

Start here for a first evaluation: Get started.

PostgreSQL and PostgREST run in Docker; Angular, NestJS and Rust run as separate host processes. This makes service logs and rebuilds easier to work with. The supplied PostgREST configuration uses host networking: check Docker’s host-network support on your platform.

Start here to change code: Local development.

Electron and Tauri are alternative shells, not successive versions of one shell. Packaged applications stage local runtime components alongside the UI. Desktop development still uses the separate Docker data services.

Start here to build a shell: Desktop.

  1. UI behavior: start in frontend/apps/www/; identify its NestJS request before changing an API contract.
  2. Market or AI behavior: follow the NestJS call into the Rust API and its exchange or LLM implementation. Verify provider configuration separately.
  3. Indicator calculations: change the shared Rust implementation or WASM bindings, regenerate wasm/pkg/, then validate the browser consumer.
  4. AI-client tools: keep the MCP catalog, handler, schema and in-process dispatch synchronized. See the MCP development steps.

For the full source maps, read the frontend, backend and WASM guides.