Skip to content

Commit

Permalink
docs: update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ikxin committed Aug 28, 2024
1 parent 9db65ae commit 54aea04
Show file tree
Hide file tree
Showing 12 changed files with 274 additions and 85 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ENABLE_VLMCSD = false
PORT = 3000
DATABASE_URL = 'mysql://root:password@localhost:3306/database'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 一纸忘忧
Copyright (c) 2022 ~ Present 一纸忘忧 <https://github.com/ikxin>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
127 changes: 107 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<p align="center"><img width="400" src="./src/assets/images/readme-logo.svg" /></p>
<p align="center">
<img width="400" src="./src/assets/images/readme-logo.svg" />
</p>

<p align="center">
<a href="https://github.com/ikxin/kms-tools/releases"><img src="https://badgen.net/github/release/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/stargazers"><img src="https://badgen.net/github/stars/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/network/members"><img src="https://badgen.net/github/forks/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/commits"><img src="https://badgen.net/github/commits/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/issues"><img src="https://badgen.net/github/issues/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/watchers"><img src="https://badgen.net/github/watchers/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/blob/master/LICENSE"><img src="https://badgen.net/github/license/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/releases"><img src="https://badgen.net/github/release/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/stargazers"><img src="https://badgen.net/github/stars/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/network/members"><img src="https://badgen.net/github/forks/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/commits"><img src="https://badgen.net/github/commits/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/issues"><img src="https://badgen.net/github/issues/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/watchers"><img src="https://badgen.net/github/watchers/ikxin/kms-tools" /></a>
<a href="https://github.com/ikxin/kms-tools/blob/master/LICENSE"><img src="https://badgen.net/github/license/ikxin/kms-tools" /></a>
</p>

<p align="center" id="hide">
<a href="./README_EN.md">English</a>
<p align="center" class="hidden">
<a href="./README_EN.md">English</a>
</p>

## 📖 介绍
Expand All @@ -35,11 +37,17 @@
- Cloudflare: [kmstools.pages.dev](https://kmstools.pages.dev)
- Vercel: [kmstools.vercel.app](https://kmstools.vercel.app)

## 🌈 功能预览

| KMS 激活脚本生成 | KMS 服务器检测 | KMS 服务器状态监控 |
| ------------------------------------- | ---------------------------------- | ------------------------------------ |
| ![](./src/assets/images/activate.png) | ![](./src/assets/images/check.png) | ![](./src/assets/images/monitor.png) |

## 👀 历史版本

| ![](./src/assets/images/v2.0.0.png) | ![](./src/assets/images/v1.2.0.png) |
| ----------------------------------- | ----------------------------------- |
| ![](./src/assets/images/v1.0.0.png) | ![](./src/assets/images/v0.1.5.png) |
| v1.2.0 | v1.0.0 | v0.1.5 |
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
| ![](./src/assets/images/v1.2.0.png) | ![](./src/assets/images/v1.0.0.png) | ![](./src/assets/images/v0.1.5.png) |

## ✨ 技术栈

Expand All @@ -56,24 +64,103 @@
- <img src="./src/assets/icons/logos/arco.svg" /> [Arco Design Vue](https://github.com/arco-design/arco-design-vue) - ByteDance 开发的企业级产品设计系统
- <img src="./src/assets/icons/logos/vue-router.svg" /> [Vue Router](https://github.com/vuejs/vue-router) - Vue.js 核心团队开发的路由组件
- <img src="./src/assets/icons/logos/pinia.svg" /> [Pinia](https://github.com/vuejs/pinia) - 类型安全、可扩展性以及模块化设计的状态管理库
- <img src="./src/assets/icons/logos/vueuse.svg" /> [VueUse](https://github.com/vueuse/vueuse) - 基于 Composition API 的实用函数集合
- <img src="./src/assets/icons/logos/unocss.svg" /> [UnoCSS](https://github.com/unocss/unocss) - 即时的按需加载原子 CSS 引擎
- <img src="./src/assets/icons/logos/vue-i18n.svg" /> [Vue I18n](https://github.com/intlify/vue-i18n-next) - I18n 国际化支持
- <img src="./src/assets/icons/logos/vueuse.svg" /> [VueUse](https://github.com/vueuse/vueuse) - 基于 Composition API 的实用函数集合
- <img src="./src/assets/icons/logos/vue-i18n.svg" /> [Vue I18n](https://github.com/intlify/vue-i18n-next) - I18n 国际化语言支持
- <img src="./src/assets/icons/logos/unjs.svg" /> [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import) - 自动按需导入 Composition API 的插件
- <img src="./src/assets/icons/logos/unjs.svg" /> [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) - 自动按需导入 Vue 组件的插件
- <img src="./src/assets/icons/logos/unjs.svg" /> [unplugin-vue-router](https://github.com/posva/unplugin-vue-router) - Vue Router 自动加载基于文件的路由系统
- <img src="./src/assets/icons/logos/markdown.svg" /> [unplugin-vue-markdown](https://github.com/unplugin/unplugin-vue-markdown) - Markdown 文档支持

## 📦 本地构建

不管是全栈版本还是纯前端版本,都需要依赖 Bun 来进行构建,使用以下脚本在本地安装 Bun 环境。

Linux & macOS:

```bash
curl -fsSL https://bun.sh/install | bash
```

Windows:

```bash
powershell -c "irm bun.sh/install.ps1 | iex"
```

接下来将项目克隆到本地,然后执行命令安装依赖

```bash
git clone https://github.com/ikxin/kms-tools.git
cd kms-tools && bun install
```

### 全栈版本

1. 创建 MySQL 数据库,使用以下 SQL 创建表的结构

```sql
CREATE TABLE `logs` (
`id` int AUTO_INCREMENT NOT NULL,
`host` text NOT NULL,
`delay` int NOT NULL DEFAULT 0,
`content` text,
`status` boolean NOT NULL DEFAULT false,
`created_at` timestamp NOT NULL,
CONSTRAINT `logs_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `server` (
`id` int AUTO_INCREMENT NOT NULL,
`host` text NOT NULL,
`port` int NOT NULL DEFAULT 1688,
`total` int NOT NULL DEFAULT 0,
`success` int NOT NULL DEFAULT 0,
`fail` int NOT NULL DEFAULT 0,
`delay` float NOT NULL DEFAULT 0,
`rate` float NOT NULL DEFAULT 0,
`updated_at` timestamp,
`created_at` timestamp,
CONSTRAINT `server_id` PRIMARY KEY(`id`)
);
```

2.`.env.example` 文件重命名为 `.env`,并修改其中的配置项

```ini
ENABLE_VLMCSD = false # 是否启用 Vlmcsd 服务
PORT = 3000 # 服务端口
DATABASE_URL = 'mysql://root:password@localhost:3306/database' # 数据库连接地址
```

3. 运行以下命令启动服务

```bash
bun run service
```

### 纯前端版本

1. 使用以下命令构建项目

```bash
bun run build
```

2. 运行以下命令启动服务

```bash
npx serve dist
```

## ⭐ 星星

<img src="https://starchart.cc/ikxin/kms-tools.svg" />
<img class="w-full" src="https://starchart.cc/ikxin/kms-tools.svg" />

## 🧑‍💻 作者

Code with ❤️ by [一纸忘忧](https://www.ikxin.com '一纸忘忧')
Code with ❤️ by [一纸忘忧](https://blog.ikxin.com '一纸忘忧')

## 📜 开源协议

[MIT License](./LICENSE 'MIT License')

Copyright (c) 2022~Present
[MIT License](./LICENSE 'MIT License') Copyright (c) 2022 ~ Present
Loading

0 comments on commit 54aea04

Please sign in to comment.