> For the complete documentation index, see [llms.txt](https://kline-operation.gitbook.io/kline-operations/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kline-operation.gitbook.io/kline-operations/product-architecture.md).

# Product architecture

## Architecture overview

<figure><img src="https://1394161170-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDdMuk4GiSJIpFyqK1m98%2Fuploads%2FtoYxoNoowvrtMqdw6gZW%2FProduct%20architecture.png?alt=media&amp;token=e415f48b-57c0-4fc6-9cc8-76d121c54836" alt=""><figcaption></figcaption></figure>

KlineO is designed as a modular platform. Each core function is separated so the platform can scale across users, venues, AI agents, competitions, SDK/API access, and partner campaigns.

```
Frontend Layer
React / Vite / TypeScript / Tailwind

Backend API Layer
Node.js / Express / JWT Auth / Rate Limiting

Database and Auth Layer
Supabase PostgreSQL / Supabase Auth / User Data Isolation

Core Engine Layer
Risk Engine
Execution Router
Copy Trading Engine
DCA Bot Engine
Competition Engine
Leaderboard Engine
Creator Content Engine
AI Agent Layer

Integration Layer
Binance
Bybit
HyperLiquid
Future exchanges and perp DEXs
News, market data, sentiment, and partner services

Developer Layer
KlineO API
KlineO SDK
Webhooks
Partner dashboards
```

## Core platform modules

| Module                | Description                                                                                 |
| --------------------- | ------------------------------------------------------------------------------------------- |
| Trading Terminal      | Unified trading interface with charts, order flow, balances, and execution controls.        |
| AI-assisted Analysis  | Trade setup summaries, risk context, sentiment, and decision support.                       |
| Exchange Connectivity | Secure API-based connection to supported exchanges and venues.                              |
| Copy Trading          | Users can follow approved traders with custom allocation and risk settings.                 |
| DCA Bots              | Structured automation for repeat execution and allocation-based trading.                    |
| Battle Arena          | Trading competitions, campaigns, trader rankings, and reward workflows.                     |
| Creator Terminal      | Creator-led growth surface for campaigns, referrals, content, and community distribution.   |
| Leaderboard Engine    | Ranking layer for volume, PnL, risk-adjusted returns, creator actions, and campaign points. |
| SDK/API Layer         | Developer and partner layer for integrations, dashboards, webhooks, and campaign data.      |

## Design principles

KlineO is built around these principles:

* Users keep custody of funds on their own exchange accounts.
* KlineO should not require withdrawal permissions.
* Every trading workflow should pass through risk checks.
* Partner campaigns should be measurable.
* AI should support better structure, not replace user responsibility.
* Creator distribution should connect to visible campaign outcomes.
* Exchange integrations should create value for both venues and projects.
