Monorepo Workspace Structure
Relevant source files
The following files were used as context for generating this wiki page:
The technical-analysis project is organized as a monorepo containing a dedicated backend service, a frontend web application, and shared utility packages. This structure facilitates the development of a terminal based on the Tinkoff API, allowing users to perform technical analysis and test trading algorithms.
The workspace integrates a NestJS-based server, a React-based client, and specialized logic for technical indicators. The root directory manages high-level orchestration through scripts that bridge the various sub-projects, ensuring a unified development environment for full-stack trading software.
Sources: readme.md:1-5, package.json:1-15
Workspace Architecture
The monorepo is divided into three primary functional areas: the server-side logic (backend), the user interface (frontend), and reusable libraries (packages).
High-Level Component Overview
| Component | Technology Stack | Purpose |
|---|---|---|
| Root | NPM/Yarn | Task orchestration and global linting configurations. |
| Backend | NestJS, TypeORM, GraphQL | Server-side API, data fetching from exchanges (Binance, Tinkoff), and strategy execution. |
| Frontend | React, Apollo Client, Ant Design | Web-based terminal for chart visualization and indicator configuration. |
| Packages | TypeScript | Shared logic, specifically for calculating technical indicators. |
Sources: package.json:1-15, backend/package.json:1-50, frontend/package.json:1-30, packages/technical-indicators/package.json:1-10
Dependency and Project Flow
The following diagram illustrates the structural relationship between the workspace modules and the external APIs they consume.
Note: The Frontend consumes the technical-indicators package as a dependency to perform client-side calculations or UI updates.
Sources: backend/package.json:34-40, frontend/package.json:6, readme.md:10-15
Module Breakdown
Root Configuration
The root package.json defines the entry point for workspace management. It provides scripts to start individual services without navigating into subdirectories and enforces consistent code quality via ESLint across all modules.
Key Scripts:
start:backend:dev: Executesnpm run start:devwithin thebackenddirectory.start:frontend:dev: Executesnpm run startwithin thefrontenddirectory.lint: Runs ESLint across the entire repository, including backend, frontend, and packages.
Sources: package.json:8-13
Backend Service
The backend is a NestJS application designed for high performance and scalability. It serves as the bridge between raw market data and the frontend.
- Data Sources: Integrates
@tinkoff/invest-openapi-js-sdkandnode-binance-api. - API Layer: Uses Apollo Server Express to provide a GraphQL interface.
- Persistence: Utilizes SQLite3 with TypeORM for local data storage and algorithm testing results.
Sources: backend/package.json:28-48, backend/README.md:1-10
Frontend Application
The frontend is a React application bootstrapped with Create React App. It focuses on financial data visualization.
- Visualization: Uses
klinechartsfor the main trading charts and@antv/g2plotfor auxiliary data like TipRanks info or sentiment charts. - State Management: Implements
@apollo/clientfor interacting with the backend GraphQL API andgraphql-codegenfor type-safe queries. - UI Framework: Built using
antd(Ant Design) andstyled-components.
Sources: frontend/package.json:5-24, frontend/src/pages/chart/index.tsx:1-50
Technical Indicators Package
Located in packages/technical-indicators, this is a standalone TypeScript library. It provides implementations for various indicators (e.g., ATR, Bollinger Bands, EMA, RSI) and supports real-time updates—essential for streaming WebSocket data.
Sources: packages/technical-indicators/package.json:1-5, packages/technical-indicators/readme.md:1-10
Development Workflow
The project requires a specific environment setup involving Node.js, Python (for specific indicator logic), and Poetry.
Note: The backend requires a valid TINKOFF_SECRET to communicate with the investment API.
Sources: readme.md:14-20, backend/package.json:11-12, package.json:8-9
Summary
The monorepo workspace for technical-analysis is structured to separate concerns while maintaining a shared development lifecycle. The Backend handles complex data aggregation from multiple exchanges, the Frontend provides an interactive terminal experience, and the Packages directory houses the mathematical core of the application. Orchestration at the root level simplifies the management of these diverse technology stacks (NestJS, React, and Python-based indicator scripts).