跳转至

附录 A · 技术栈总览

本表是 TTD 技术栈的完整清单,按层组织。


技术栈全景图

%%{init: {'theme':'base','themeVariables':{'primaryColor':'#e8f0fe','primaryTextColor':'#202124','primaryBorderColor':'#1a73e8','lineColor':'#5f6368','secondaryColor':'#e0f2f1','tertiaryColor':'#f8f9fa'}}}%%
flowchart TB
    subgraph Frontend["前端 · Web Frontend"]
        direction LR
        NEXT["Next.js 16"]
        REACT["React 19"]
        TS["TypeScript 5"]
        SHADCN["shadcn/ui"]
        ECHARTS["ECharts 6"]
        G6["@antv/g6"]
        BETTERAUTH["Better Auth 1.6"]
        ZUSTAND["Zustand 5"]
    end

    subgraph Backend["后端 · AI Agent Runtime"]
        direction LR
        FASTAPI["FastAPI 0.115"]
        PYTHON["Python 3.12"]
        LANGGRAPH["LangGraph"]
        LANGCHAIN["LangChain"]
        PYDANTIC["Pydantic v2"]
        SQLALCHEMY["SQLAlchemy 2.0"]
    end

    subgraph DataPlane["数据面 · Data Plane"]
        direction LR
        PG["PostgreSQL 18"]
        PGVECTOR["pgvector"]
        AGE["Apache AGE"]
        MOONCAKE["pg_mooncake"]
        REDSHIFT["Redshift"]
        MINIO_S3["MinIO · S3"]
        AUTOMQ_KAFKA["AutoMQ"]
    end

    subgraph AI["AI / LLM"]
        direction LR
        LLM_MODELS["LLM 推理<br/>deepseek-v4 · qwen"]
        EMBEDDING["Embedding<br/>text-embedding-v4"]
        DASHSCOPE["DashScope API"]
    end

    subgraph DevOps["CI/CD · DevOps · 部署"]
        direction LR
        GH_ACTIONS["GitHub Actions"]
        DOCKER["Docker Swarm"]
        HAPROXY["HAProxy 2.9"]
        UV["uv · Python"]
        BUN["bun · npm"]
        TASK["Taskfile"]
        MKDOCS["MkDocs Material"]
    end

    Frontend -->|"SSE + JWT"| Backend
    Backend -->|"RAG 检索 · 检查点"| DataPlane
    Backend -->|"LLM + Embedding"| AI
    DevOps -.->|"部署 · 构建"| Backend

    classDef bpGroup    fill:#f8f9fa,stroke:#dadce0,stroke-width:1px,color:#3c4043
    classDef bpProcess  fill:#e8f0fe,stroke:#1a73e8,stroke-width:2px,color:#202124
    classDef bpData     fill:#e0f2f1,stroke:#0d7377,stroke-width:2px,color:#202124
    classDef bpExternal fill:#f8f9fa,stroke:#dadce0,stroke-width:2px,color:#5f6368

    class NEXT,REACT,TS,SHADCN,ECHARTS,G6,BETTERAUTH,ZUSTAND bpProcess
    class FASTAPI,PYTHON,LANGGRAPH,LANGCHAIN,PYDANTIC,SQLALCHEMY bpProcess
    class PG,PGVECTOR,AGE,MOONCAKE,REDSHIFT,MINIO_S3,AUTOMQ_KAFKA bpData
    class LLM_MODELS,EMBEDDING,DASHSCOPE bpExternal
    class GH_ACTIONS,DOCKER,HAPROXY,UV,BUN,TASK,MKDOCS bpProcess

前端

技术 版本 用途
Next.js 16.2 App Router, SSR, RSC, Turbopack dev
React 19.2 组件渲染
TypeScript 5 类型安全
Zustand 5 全局状态
TanStack Query 5 服务端状态
SWR 数据获取
shadcn/ui + Radix UI 组件库(62 组件)
Tailwind CSS 4 原子 CSS
framer-motion 动画
ECharts 6 数据可视化
echarts-for-react ECharts React 封装
Recharts 图表
@antv/g6 图谱可视化
force-graph / d3 关系图
better-auth 1.6 认证(jwt + admin + nextCookies)
@hey-api/openapi-ts OpenAPI 客户端生成
react-hook-form + zod 表单与校验
react-markdown Markdown 渲染
sql-formatter SQL 格式化
Biome linter + formatter

后端

技术 版本 用途
Python 3.12+ 运行时
FastAPI 0.115+ ASGI Web 框架
Uvicorn latest ASGI 服务器
LangGraph ≥ 0.4.0 Agent 编排(详见 第 4 章
langgraph-checkpoint-postgres 会话持久化
LangChain latest 多模型集成
langchain-openai / langchain-anthropic 模型提供商
Pydantic v2 数据校验 + Settings
psycopg 3 异步 PG 驱动(raw pool)
SQLAlchemy 2.0 ORM(Admin 资源管理)
Alembic 数据库迁移
redshift-connector Redshift 驱动
pgvector 向量检索
Apache AGE 属性图
apache-age-python + antlr4 AGE Python 客户端
pandas / numpy / scikit-learn 数据处理 + ML
prophet / statsmodels 预测 + 统计
scipy 科学计算
llama-index-core 文档处理
pypdf / python-docx / python-pptx / openpyxl 文档解析
ragas + deepeval 评估
langfuse LLM 追踪
kafka-python AutoMQ 事件
structlog 结构化日志
prometheus-client 指标
sqlparse + sqlglot SQL 解析与转译
networkx ≥ 3.3 图算法(Steiner 树)
jinja2 Prompt 模板
slowapi 限流
PyJWT + cryptography JWT + JWKS 验签
ruff + ty linter + 类型检查
pytest 测试

数据与基础设施

技术 版本 用途
PostgreSQL (Aurora) 15+ PG Supernode(R+V+G+D + 会话 + 检查点)
pgvector 向量检索(Engine V)
Apache AGE 属性图(Engine G)
:simple-amazonaws: Redshift Serverless 生产数据面
pg_mooncake 开发数据面(列存)
MinIO 本地 S3
AutoMQ (Kafka) 事件总线(可选)
HAProxy 2.9+ 一致性哈希路由
Docker Swarm Agent Runtime Pool 部署

LLM

模型 Provider 用途
deepseek-v4-flash DashScope (OpenAI-compatible) Supervisor / QU / Planner / Follow-up
deepseek-v4-pro DashScope SQL 生成 / 修复
qwen3.7-max DashScope Insights / Viz / 解释 / 知识问答
text-embedding-v4 DashScope Embedding(部署 schema 1024 维;builtin 默认 1536,待统一,见 ADR-7第 5 章

模型版本权威

以上是 backend/app/models/registry.py 的当前代码默认值。支持 Admin DB 覆盖与 Fallback 链。


CI/CD 与工具

技术 用途
GitHub Actions 自动化管道(metadata-validation + docs)
uv Python workspace 包管理
bun / npm 前端包管理
Task (Taskfile) 统一任务编排(详见 第 13 章
pre-commit 提交前钩子
:simple-mkdocs: MkDocs Material 文档站点
Mermaid + MathJax 图表与公式渲染

相关文档