Files
im-system/README.md
T

64 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# im-system
即时通讯(IM)系统,monorepo 结构,前后端分离。
## 项目结构
```
im-system/
├── backend/ # 后端(Kotlin + Spring BootGradle 多模块)
│ ├── gateway/ # 网关(Spring Cloud Gateway,端口 8080
│ ├── im-service/ # 主服务(IM 业务,端口 8081,Kafka 生产者)
│ └── log-service/ # 日志服务(端口 8082,Kafka 消费者)
└── frontend/ # 前端(Vue 3 + TypeScript + Vitepnpm workspace
└── packages/
├── admin/ # 管理后台(Element Plus,端口 5173
└── app/ # 聊天 App(端口 1420,预留 Tauri 迁移)
```
## 技术栈
| 层 | 技术 | 版本 |
| --- | --- | --- |
| 后端语言 | Kotlin | 2.4.10 |
| 后端框架 | Spring Boot | 4.1.0 |
| 网关 | Spring Cloud Gateway | 2025.1.2Oakwood |
| 消息队列 | Kafka | 由 `KAFKA_BOOTSTRAP_SERVERS` 指定 |
| 构建 | Gradle | 9.6.1 |
| 前端框架 | Vue 3 + TypeScript | 3.5 / 7.0 |
| 前端构建 | Vite | 8.2.0 |
| 包管理 | pnpm | 11.20.0 |
## 服务通信
```
浏览器 ── /api/* ──> gateway(8080) ── /api/im/** → im-service(8081)
└────── /api/log/** → log-service(8082)
im-service ──Kafka topic `im-logs`──> log-service
```
## 快速开始
```bash
# 后端
cd backend
gradle wrapper --gradle-version 9.6.1 # 仅首次需要
./gradlew :gateway:bootRun # 三个服务分终端启动
# 前端
cd frontend
pnpm install
pnpm --filter @im-system/admin dev # http://localhost:5173
pnpm --filter @im-system/app dev # http://localhost:1420
```
## 文档
- [DEVELOPMENT.md](DEVELOPMENT.md) — 开发指南(环境、启动、配置、常见问题)
- [CONTRIBUTING.md](CONTRIBUTING.md) — 贡献指南(分支、提交、PR 规范)
## 许可
[MIT](LICENSE) © 2026 msksbr