Go to file
hailin 7ff701369b fix(tenant): use TenantContextModule.forRoot() for global tenant context
All services were providing TenantContextService directly without
making it global, causing DI resolution failures in child modules.
Now using TenantContextModule.forRoot() which exports TenantContextService
globally so all repositories can access it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 04:31:56 -08:00
.claude fix(tenant): use TenantContextModule.forRoot() for global tenant context 2026-01-26 04:31:56 -08:00
docs feat(agent): implement 3-layer architecture for better response quality 2026-01-23 07:51:19 -08:00
infrastructure feat(multimodal): add file upload and image support for chat 2026-01-10 05:34:41 -08:00
kong feat(kong): add analytics and audit routes for evolution-service 2026-01-25 08:22:30 -08:00
nginx feat(multimodal): add file upload and image support for chat 2026-01-10 05:34:41 -08:00
packages fix(tenant): use TenantContextModule.forRoot() for global tenant context 2026-01-26 04:31:56 -08:00
scripts feat(user): add user profile and contact management 2026-01-25 19:32:17 -08:00
.builder.Dockerfile fix(tenant): use TenantContextModule.forRoot() for global tenant context 2026-01-26 04:31:56 -08:00
.dockerignore Initial commit: iConsulting 香港移民咨询智能客服系统 2026-01-09 00:01:12 -08:00
.env.example feat(embedding): add OpenAI proxy support for IP-based URLs 2026-01-23 05:42:22 -08:00
.gitignore Initial commit: iConsulting 香港移民咨询智能客服系统 2026-01-09 00:01:12 -08:00
README.md docs: add link to Agent Evaluation Report in README 2026-01-23 04:56:27 -08:00
deploy.sh fix(deploy): force rebuild Docker images by default 2026-01-26 00:42:29 -08:00
docker-compose.yml feat(admin): add conversation management with device tracking display 2026-01-25 10:04:17 -08:00
iconsulting部署架构.jpg Initial commit: iConsulting 香港移民咨询智能客服系统 2026-01-09 00:01:12 -08:00
package.json Initial commit: iConsulting 香港移民咨询智能客服系统 2026-01-09 00:01:12 -08:00
pnpm-lock.yaml feat(multi-tenant): apply tenant middleware and refactor repositories 2026-01-25 18:30:31 -08:00
pnpm-workspace.yaml Initial commit: iConsulting 香港移民咨询智能客服系统 2026-01-09 00:01:12 -08:00
tsconfig.base.json Initial commit: iConsulting 香港移民咨询智能客服系统 2026-01-09 00:01:12 -08:00
turbo.json refactor(services): implement 4-layer Clean Architecture for all backend services 2026-01-24 22:18:22 -08:00
优才.jpg docs: add QMAS (优才计划) reference image 2026-01-22 23:47:03 -08:00
香港移民类别.jpg Initial commit: iConsulting 香港移民咨询智能客服系统 2026-01-09 00:01:12 -08:00

README.md

iConsulting - 香港移民在线咨询系统

基于 Claude Agent SDK 的智能在线客服系统,专注于提供香港移民咨询服务。

功能特性

  • 智能咨询: 基于 Claude Agent SDK 的自然语言对话
  • 付费评估: 移民资格评估服务,支持支付宝/微信/信用卡
  • 知识增强: RAG + Neo4j 知识图谱
  • 自我进化: 从对话中学习,根据管理员指令调整
  • 长期记忆: 基于时间线的知识图谱记录
  • 多端支持: PC Web / H5 响应式设计

支持的移民类别

  1. 优才计划 (QMAS) - 行业翘楚、精英人士
  2. 专才计划 (GEP) - 专业人才
  3. 留学IANG - 非本地毕业生
  4. 高才通 (TTPS) - 高端人才
  5. 投资移民 (CIES) - 投资者
  6. 科技人才 (TechTAS) - 科技领域人才

技术架构

├── 前端 (Clean Architecture)
│   ├── React 18 + TypeScript
│   ├── TailwindCSS + Radix UI
│   └── Zustand + React Query
│
├── 后端 (DDD + Hexagonal + 微服务)
│   ├── NestJS
│   ├── Claude Agent SDK
│   └── TypeORM
│
└── 基础设施
    ├── PostgreSQL + pgvector (RAG)
    ├── Neo4j (知识图谱)
    ├── Redis (缓存)
    └── Kafka (消息队列)

项目结构

iconsulting/
├── packages/
│   ├── shared/                 # 共享类型、常量、工具
│   ├── web-client/             # 用户端 Web 应用
│   ├── admin-client/           # 管理端 Web 应用
│   └── services/               # 后端微服务
│       ├── api-gateway/        # API 网关
│       ├── user-service/       # 用户服务
│       ├── conversation-service/ # 对话服务 (核心)
│       ├── knowledge-service/  # 知识服务
│       ├── payment-service/    # 支付服务
│       ├── admin-service/      # 管理服务
│       └── evolution-service/  # 进化服务
│
├── infrastructure/
│   └── docker/                 # Docker 配置
│
├── DEVELOPMENT_GUIDE.md        # 详细开发指导
└── README.md

快速开始

1. 安装依赖

# 安装 pnpm (如果没有)
npm install -g pnpm

# 安装项目依赖
pnpm install

2. 启动基础设施

# 启动 Docker 容器 (PostgreSQL, Neo4j, Redis, Kafka)
pnpm docker:dev

3. 配置环境变量

# 复制环境变量示例文件
cp .env.example .env

# 编辑 .env 文件,填入必要的配置
# 特别是 ANTHROPIC_API_KEY

4. 运行数据库迁移

pnpm db:migrate

5. 启动开发服务器

# 启动所有服务
pnpm dev

访问:

环境变量

关键配置项:

# Claude API
ANTHROPIC_API_KEY=sk-ant-xxx

# 数据库
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=iconsulting
POSTGRES_PASSWORD=your_password
POSTGRES_DB=iconsulting

# Neo4j
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_password

# 支付 (支付宝/微信)
ALIPAY_APP_ID=xxx
WECHAT_APP_ID=xxx

完整配置请参考 .env.example

文档

文档 说明
架构文档 系统整体架构、服务职责、数据流、部署配置
Agent 评估报告 Agent 能力评估、成熟度分析、升级路线图
开发指南 详细开发指导、代码示例、API 设计
MinIO 配置 对象存储配置说明

开发进度

已完成

  • 项目架构设计
  • 开发指导文档
  • Monorepo 配置
  • 共享类型定义
  • Docker 基础设施配置
  • 数据库 Schema
  • 对话服务 (Claude Agent SDK 集成)
  • 用户端前端基础框架

进行中

  • 用户服务
  • 知识服务 (RAG + Neo4j)
  • 支付服务
  • 管理服务 (自我进化)
  • 管理后台前端

贡献指南

  1. Fork 本仓库
  2. 创建特性分支 (git checkout -b feature/amazing-feature)
  3. 提交更改 (git commit -m 'Add some amazing feature')
  4. 推送到分支 (git push origin feature/amazing-feature)
  5. 创建 Pull Request

许可证

私有项目,保留所有权利。