Browse Source

fix: docs link (#91)

* fix: docs link

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* feat: add COLOR_SUFFIX=033[0m  # End all colors and special effects

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* feat: add the changelog

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* feat: add more openkf design

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* fix: add kubekf file

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* feat: add license

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* feat: add all file

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

---------

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
tags/v0.1.0
Xinwei Xiong GitHub 3 years ago
parent
commit
afd90148cd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 671 additions and 102 deletions
  1. +6
    -0
      .github/sync.yml
  2. +74
    -12
      .github/workflows/kubekf.yml
  3. +0
    -1
      .github/workflows/stale.yml
  4. +39
    -0
      .github/workflows/sync.yml
  5. +1
    -1
      .gitignore
  6. +62
    -0
      CHANGELOG/.chglog/CHANGELOG.tpl.md
  7. +66
    -0
      CHANGELOG/.chglog/config.yml
  8. +71
    -0
      CHANGELOG/CHANGELOG-0.1.md
  9. +23
    -0
      CHANGELOG/CHANGELOG.md
  10. +18
    -8
      CONTRIBUTING.md
  11. +0
    -0
      DEVELOPGUIDE.md
  12. +12
    -1
      Makefile
  13. +5
    -2
      README.md
  14. +74
    -53
      README_zh-CN.md
  15. +1
    -0
      assets/logo-gif/LICENSE
  16. +1
    -0
      assets/logo/LICENSE
  17. +6
    -6
      docs/CODEOWNERS
  18. +0
    -4
      docs/OWNERS
  19. +16
    -0
      docs/website/.gitignore
  20. +53
    -14
      docs/website/Makefile
  21. +123
    -0
      docs/website/README.md
  22. +14
    -0
      docs/website/theme.toml
  23. +6
    -0
      package-lock.json

+ 6
- 0
.github/sync.yml View File

@@ -0,0 +1,6 @@
# https://github.com/BetaHuhn/repo-file-sync-action
# Synchronization for the.github repository
openkf/openkf:
- source: ./
dest: ./
replace: true

+ 74
- 12
.github/workflows/kubekf.yml View File

@@ -16,7 +16,25 @@ name: OpenKF CI


on: on:
push: push:
branches:
- main
paths-ignore:
- "docs/**"
- "README.md"
- "README_zh-CN.md"
- "CONTRIBUTING.md"
pull_request: pull_request:
branches:
- main
paths-ignore:
- "README.md"
- "README_zh-CN.md"
- "CONTRIBUTING.md"
- "docs/**"

env:
GO_VERSION: "1.19"
GOLANGCI_VERSION: "v1.50.1"


jobs: jobs:
openkf: openkf:
@@ -74,15 +92,59 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1


# skip for now
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ env.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# skip for now
# - name: Build docker images for host arch and push images to registry
# run: |
# set -e
# make docker-push
lint:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLANGCI_VERSION }}

docker-image-tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- name: Run tests
run: make build
- name: Test docker image
run: |
docker build -t openkf:ci-build .

goreleaser-test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean --skip-publish --snapshot

+ 0
- 1
.github/workflows/stale.yml View File

@@ -25,7 +25,6 @@ on:


jobs: jobs:
stale: stale:

runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
issues: write issues: write


+ 39
- 0
.github/workflows/sync.yml View File

@@ -0,0 +1,39 @@
# Copyright © 2023 KubeCub open source community. All rights reserved.
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.

# https://github.com/BetaHuhn/repo-file-sync-action
name: Synchronize kubecub public code to other repositories
on:
push:
branches:
- main
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run GitHub File Sync
uses: BetaHuhn/repo-file-sync-action@latest
with:
GH_INSTALLATION_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}"
CONFIG_PATH: .github/sync.yml
ORIGINAL_MESSAGE: true
SKIP_PR: true
COMMIT_EACH_FILE: false
COMMIT_BODY: "🤖 kubbot to synchronize the warehouse"
GIT_EMAIL: "3293172751ysy@gmail.com"
GIT_USERNAME: "kubbot"
PR_BODY: 👌 kubecub provides automated community services
REVIEWERS: |
kubbot
cubxxw
PR_LABELS: |
file-sync
automerge
ASSIGNEES: |
kubbot

+ 1
- 1
.gitignore View File

@@ -46,7 +46,7 @@
### JetBrains ### ### JetBrains ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
.idea
.idea/


# User-specific stuff # User-specific stuff
.idea/**/workspace.xml .idea/**/workspace.xml


+ 62
- 0
CHANGELOG/.chglog/CHANGELOG.tpl.md View File

@@ -0,0 +1,62 @@
# Version logging for OpenKF

<!-- BEGIN MUNGE: GENERATED_TOC -->

<!-- END MUNGE: GENERATED_TOC -->

{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]

{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

{{- if .RevertCommits -}}
### Reverts
{{ range .RevertCommits -}}
- {{ .Revert.Header }}
{{ end }}
{{ end -}}

{{- if .MergeCommits -}}
### Pull Requests
{{ range .MergeCommits -}}
- {{ .Header }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{- if .Versions }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}

+ 66
- 0
CHANGELOG/.chglog/config.yml View File

@@ -0,0 +1,66 @@
bin: git
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/OpenIMSDK/OpenKF
options:
tag_filter_pattern: '^v'
sort: "date"

commits:
filters:
Type:
- feat
- fix
- perf
- refactor
- docs
- test
- chore
- ci
- build

commit_groups:
group_by: Type
sort_by: Title
title_order:
- feat
- fix
- perf
- refactor
- docs
- test
- chore
- ci
- build

header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject

issues:
prefix:
- #

refs:
actions:
- Closes
- Fixes

merges:
pattern: "^Merge branch '(\\w+)'$"
pattern_maps:
- Source

reverts:
pattern: "^Revert \"([\\s\\S]*)\"$"
pattern_maps:
- Header

notes:
keywords:
- BREAKING CHANGE

+ 71
- 0
CHANGELOG/CHANGELOG-0.1.md View File

@@ -0,0 +1,71 @@
# Version logging for OpenKF

<!-- BEGIN MUNGE: GENERATED_TOC -->

<!-- END MUNGE: GENERATED_TOC -->

<a name="unreleased"></a>
## [Unreleased]

### Docs
- design openkf docs ([#68](https://github.com/OpenIMSDK/OpenKF/issues/68))
- fix markdown link ([#65](https://github.com/OpenIMSDK/OpenKF/issues/65))
- fix markdown link ([#64](https://github.com/OpenIMSDK/OpenKF/issues/64))
- fix markdown link ([#63](https://github.com/OpenIMSDK/OpenKF/issues/63))

### Feat
- add COLOR_SUFFIX=033[0m # End all colors and special effects
- Add register api with dao cmd. ([#73](https://github.com/OpenIMSDK/OpenKF/issues/73))
- add logo file of Xx design
- add logo file of Xx design
- add logo file of Xx design
- add roadmap file
- add proposal file
- modify issue-specification.md
- add issue specification
- issue20
- add actions file
- **main:** optimize deployment ([#36](https://github.com/OpenIMSDK/OpenKF/issues/36))
- **main:** optimize deployment ([#36](https://github.com/OpenIMSDK/OpenKF/issues/36))
- **main:** release script file ([#52](https://github.com/OpenIMSDK/OpenKF/issues/52))

### Fix
- docs link


<a name="v0.1.0"></a>
## v0.1.0 - 2023-07-05
### Docs
- update code owners file ([#50](https://github.com/OpenIMSDK/OpenKF/issues/50))
- update README.md ([#43](https://github.com/OpenIMSDK/OpenKF/issues/43))
- update readme and readme-zh ([#35](https://github.com/OpenIMSDK/OpenKF/issues/35))

### Feat
- Add hook interceptor & add cmd & some fix ([#24](https://github.com/OpenIMSDK/OpenKF/issues/24))
- Support auto-signature. ([#49](https://github.com/OpenIMSDK/OpenKF/issues/49))
- Add callback api. ([#45](https://github.com/OpenIMSDK/OpenKF/issues/45))
- add a component to support rate limt control ([#29](https://github.com/OpenIMSDK/OpenKF/issues/29))
- add prettier and eslint ([#18](https://github.com/OpenIMSDK/OpenKF/issues/18)) ([#30](https://github.com/OpenIMSDK/OpenKF/issues/30))
- add script license ([#17](https://github.com/OpenIMSDK/OpenKF/issues/17))
- Support send code with email. ([#15](https://github.com/OpenIMSDK/OpenKF/issues/15))
- init plugin project. ([#14](https://github.com/OpenIMSDK/OpenKF/issues/14))
- enhance automated review for codeowners ([#11](https://github.com/OpenIMSDK/OpenKF/issues/11))
- init server project ([#5](https://github.com/OpenIMSDK/OpenKF/issues/5))
- **main:** add swagger api make file ([#51](https://github.com/OpenIMSDK/OpenKF/issues/51))
- **main:** unit test makefile ([#56](https://github.com/OpenIMSDK/OpenKF/issues/56))
- **main:** initialize the OpenKF architecture

### Fix
- Fix doc links. ([#41](https://github.com/OpenIMSDK/OpenKF/issues/41))
- Fix golang ci piplines and docs. ([#39](https://github.com/OpenIMSDK/OpenKF/issues/39))
- cicd err tidy mod
- golang ci
- make fix ([#33](https://github.com/OpenIMSDK/OpenKF/issues/33))
- Fix CONTRIBUTING. ([#28](https://github.com/OpenIMSDK/OpenKF/issues/28))
- codeql token
- **main:** fix cicd actions
- **main:** optimize actions
- **main:** optimize actions


[Unreleased]: https://github.com/OpenIMSDK/OpenKF/compare/v0.1.0...HEAD

+ 23
- 0
CHANGELOG/CHANGELOG.md View File

@@ -0,0 +1,23 @@
# Changelog

All notable changes to this project will be documented in this file.

+ [https://github.com/OpenIMSDK/OpenKF/releases](https://github.com/OpenIMSDK/OpenKF/releases)

## command

```bash
git-chglog --tag-filter-pattern 'v2.0.*' -o CHANGELOG-2.0.md
```

## create next tag

```bash
git-chglog --next-tag 2.0.0 -o CHANGELOG.md
git commit -am "release 2.0.0"
git tag 2.0.0
```

## Release version logs

+ [OpenIM CHANGELOG-V0.1](CHANGELOG-0.1.md)

+ 18
- 8
CONTRIBUTING.md View File

@@ -8,13 +8,24 @@ This document provides guidelines and best practices to help you contribute effe


## 📇Topics ## 📇Topics


- [What we expect of you](#What-we-expect-of-you)
- [Code of Conduct](#Code-of-Conduct)
- [Getting Started](#Getting-Started)
- [Style and Specification](#Style-and-Specification)
- [Engage to help anything](#Engage-to-help-anything)
- [Release version](#Release-version)
- [Contact Us](#Contact-Us)
- [Contributing to OpenKF](#contributing-to-openkf)
- [📇Topics](#topics)
- [What we expect of you](#what-we-expect-of-you)
- [Code of Conduct](#code-of-conduct)
- [Code and doc contribution](#code-and-doc-contribution)
- [Where should I start?](#where-should-i-start)
- [Design documents](#design-documents)
- [Getting Started](#getting-started)
- [Style and Specification](#style-and-specification)
- [Reporting security issues](#reporting-security-issues)
- [Reporting general issues](#reporting-general-issues)
- [Commit Rules](#commit-rules)
- [PR Description](#pr-description)
- [CI actions](#ci-actions)
- [Docs Contribution](#docs-contribution)
- [Engage to help anything](#engage-to-help-anything)
- [Release version](#release-version)
- [Contact Us](#contact-us)






@@ -356,7 +367,6 @@ Try your best to keep every function has been tested, it keeps the function beha


+ [README.md](https://github.com/OpenIMSDK/OpenKF/blob/main/README.md): This file includes the basic information and instructions for getting started with OpenKF. + [README.md](https://github.com/OpenIMSDK/OpenKF/blob/main/README.md): This file includes the basic information and instructions for getting started with OpenKF.
+ [CONTRIBUTING.md](https://github.com/OpenIMSDK/OpenKF/blob/main/CONTRIBUTING.md): This file contains guidelines for contributing to OpenKF's codebase, such as how to submit issues, pull requests, and code reviews. + [CONTRIBUTING.md](https://github.com/OpenIMSDK/OpenKF/blob/main/CONTRIBUTING.md): This file contains guidelines for contributing to OpenKF's codebase, such as how to submit issues, pull requests, and code reviews.
+ [DEVELOPGUIDE.md](https://github.com/OpenIMSDK/OpenKF/blob/main/DEVELOPGUIDE.md): This file provides a more in-depth guide to developing OpenKF, including information on the project's architecture, coding conventions, and testing practices.
+ [Official Documentation](https://doc.rentsoft.cn/): This is the official documentation for OpenKF, which includes comprehensive information on all of its features, configuration options, and troubleshooting tips. + [Official Documentation](https://doc.rentsoft.cn/): This is the official documentation for OpenKF, which includes comprehensive information on all of its features, configuration options, and troubleshooting tips.


**Please obey the following rules to better format the docs, which would greatly improve the reading experience.** **Please obey the following rules to better format the docs, which would greatly improve the reading experience.**


+ 0
- 0
DEVELOPGUIDE.md View File


+ 12
- 1
Makefile View File

@@ -241,6 +241,7 @@ generate:
@cd $(SERVER_DIR) && $(GO) generate ./... @cd $(SERVER_DIR) && $(GO) generate ./...


## lint: Run go lint against code. ## lint: Run go lint against code.
# go1.19+
.PHONY: lint .PHONY: lint
lint: tools.verify.golangci-lint lint: tools.verify.golangci-lint
@echo "===========> Run golangci to lint source codes" @echo "===========> Run golangci to lint source codes"
@@ -422,6 +423,11 @@ install.kubeconform:
install.gsemver: install.gsemver:
@$(GO) install github.com/arnaud-deprez/gsemver@latest @$(GO) install github.com/arnaud-deprez/gsemver@latest


## install.hugo: Install hugo, used to generate website
.PHONY: install.hugo
install.hugo:
@$(GO) install github.com/gohugoio/hugo@latest

## install.git-chglog: Install git-chglog, used to generate changelog ## install.git-chglog: Install git-chglog, used to generate changelog
.PHONY: install.git-chglog .PHONY: install.git-chglog
install.git-chglog: install.git-chglog:
@@ -432,9 +438,14 @@ install.git-chglog:
install.github-release: install.github-release:
@$(GO) install github.com/github-release/github-release@latest @$(GO) install github.com/github-release/github-release@latest


## install.goreleaser: Install goreleaser, used to release go program
.PHONY: install.goreleaser
install.goreleaser:
@$(GO) install github.com/goreleaser/goreleaser@latest

## install.coscli: Install coscli, used to upload files to cos ## install.coscli: Install coscli, used to upload files to cos
# example: ./coscli cp/sync -r /root/workspaces/OpenIMSDK/OpenKF/ cos://OpenIMSDK-1306374445/code/ -e cos.ap-hongkong.myqcloud.com # example: ./coscli cp/sync -r /root/workspaces/OpenIMSDK/OpenKF/ cos://OpenIMSDK-1306374445/code/ -e cos.ap-hongkong.myqcloud.com
# https://cloud.tencent.com/document/product/436/71763
# https://cloud.tencent.com/document/product/436/71763
# OpenIMSDK/* # OpenIMSDK/*
# - code/ # - code/
# - docs/ # - docs/


+ 5
- 2
README.md View File

@@ -1,9 +1,12 @@
<p align="center"> <p align="center">
<img src="assets/logo-gif/openkf-logo-white.gif" width="60%" height="30%"/>
<a href="https://openkf.github.io/website" target="_blank">
<img src="assets/logo-gif/openkf-logo-white.gif" width="60%" height="30%"/>
</a>
</p> </p>
<h3 align="center" style="border-bottom: none"> <h3 align="center" style="border-bottom: none">
⭐️ OpenKF(Open Knowledge Flow) is an online intelligent customer service system. ⭐️ <br>
⭐️ OpenKF(Open Knowledge Flow) is an online intelligent customer service system. ⭐️ <br>
<h3> <h3>

<p align=center> <p align=center>
<a href="https://goreportcard.com/report/github.com/OpenIMSDK/OpenKF"><img src="https://goreportcard.com/badge/github.com/OpenIMSDK/OpenKF" alt="A+"></a> <a href="https://goreportcard.com/report/github.com/OpenIMSDK/OpenKF"><img src="https://goreportcard.com/badge/github.com/OpenIMSDK/OpenKF" alt="A+"></a>
<a href="https://github.com/OpenIMSDK/OpenKF/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/OpenIMSDK/OpenKF/good%20first%20issue?logo=%22github%22" alt="good first"></a> <a href="https://github.com/OpenIMSDK/OpenKF/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/OpenIMSDK/OpenKF/good%20first%20issue?logo=%22github%22" alt="good first"></a>


+ 74
- 53
README_zh-CN.md View File

@@ -1,82 +1,101 @@
<h1 align="center" style="border-bottom: none">
<b>
<a href="https://docker.nsddd.top">OpenKF</a><br>
</b>
</h1>
<h3 align="center" style="border-bottom: none">
⭐️ OpenKF(开放知识流)是一个在线客服系统。 ⭐️ <br>
<h3>


<p align=center>
<a href="https://goreportcard.com/report/github.com/OpenIMSDK/OpenKF"><img src="https://goreportcard.com/badge/github.com/OpenIMSDK/OpenKF" alt="A+"></a>
<a href="https://github.com/OpenIMSDK/OpenKF/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/OpenIMSDK/OpenKF/good%20first%20issue?logo=%22github%22" alt="good first"></a>
<a href="https://github.com/OpenIMSDK/OpenKF"><img src="https://img.shields.io/github/stars/OpenIMSDK/OpenKF.svg?style=flat&logo=github&colorB=deeppink&label=stars"></a>
<a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg"><img src="https://img.shields.io/badge/Slack-100%2B-blueviolet?logo=slack&amp;logoColor=white"></a>
<a href="https://github.com/OpenIMSDK/OpenKF/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green"></a>
<a href="https://golang.org/"><img src="https://img.shields.io/badge/Language-Go-blue.svg"></a>
</p>

</p>
<p align="center"> <img src="assets/logo-gif/openkf-logo-white.gif" width="60%" height="30%"/> </p> <h3 align="center" style="border-bottom: none"> ⭐️ OpenKF(Open Knowledge Flow)是一款在线智能客服系统。⭐️ <br> <h3> <p align=center> <a href="https://goreportcard.com/report/github.com/OpenIMSDK/OpenKF"><img src="https://goreportcard.com/badge/github.com/OpenIMSDK/OpenKF" alt="A+"></a> <a href="https://github.com/OpenIMSDK/OpenKF/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A"good+first+issue""><img src="https://img.shields.io/github/issues/OpenIMSDK/OpenKF/good first issue?logo="github"" alt="good first"></a> <a href="https://github.com/OpenIMSDK/OpenKF"><img src="https://img.shields.io/github/stars/OpenIMSDK/OpenKF.svg?style=flat&logo=github&colorB=deeppink&label=stars"></a> <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg"><img src="https://img.shields.io/badge/Slack-100%2B-blueviolet?logo=slack&amp;logoColor=white"></a> <a href="https://github.com/OpenIMSDK/OpenKF/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green"></a> <a href="https://golang.org/"><img src="https://img.shields.io/badge/Language-Go-blue.svg"></a> </p>


<p align="center">
<a href="./README.md"><b>English</b></a> •
<a href="./README_zh-CN.md"><b>中文</b></a>
</p> </p>


</p>
<p align="center"> <a href="./README.md"><b>English</b></a> • <a href="./README_zh-CN.md"><b>中文</b></a> </p>


----
</p> <br>


## 🧩 特性
## 🧩 强大的功能


1. [OpenKF](https://github.com/OpenIMSDK/OpenKF) 是基于 [OpenIM](https://github.com/OpenIMSDK) 的开源客服系统。
1. [OpenKF](https://github.com/OpenIMSDK/OpenKF) 是一款基于 [OpenIM](https://github.com/OpenIMSDK) 的开源客服系统。
2. 支持 LLM(本地知识库)客服。 2. 支持 LLM(本地知识库)客服。
3. 支持多渠道客服,并易于与第三方系统集成。
4. 易于部署和二次开发。
3. 支持多渠道客服,并能与第三方系统轻松集成。
4. 部署简单,便于二次开发。


## 🛫 快速开始 ## 🛫 快速开始


> **注意**:您可以通过以下方式快速开始使用 OpenKF。
> **注意**:您可以通过以下步骤快速开始使用 OpenKF。


### 📦 安装 ### 📦 安装


```bash
git clone https://https://github.com/OpenIMSDK/OpenKF
```
bashCopy Codegit clone https://github.com/OpenIMSDK/OpenKF openkf && export openkf=$(pwd)/openkf && cd $openkf && make
``` ```


### 🚀 运行 ### 🚀 运行


```bash
注意: 我们需要先启动后端
cd server
go run main.go
> **注意**:首先需要运行后端服务器


打开另一个命令行 输入以下命令
```
bashCopy Codemake build
```

> 打开另一个终端窗口,运行以下命令:

```
bashCopy Code# make dev
cd web cd web
npm run dev npm run dev
``` ```


### 📖 贡献者入门指南

熟练使用 Makefile 可以确保项目的质量。

```
bashCopy Code用法: make <TARGETS> ...

目标:
all 构建所有必要的目标。🏗️
build 默认情况下构建二进制文件。🛠️
go.build 构建指定平台的二进制文件。👨‍💻
build-multiarch 为多个平台构建二进制文件。🌍
tidy 整理 go.mod 📦
style 代码样式 -> fmt,vet,lint 🎨
fmt 运行 go fmt 格式化代码。✨
vet 运行 go vet 静态检查代码。🔍
generate 运行 go generate 自动生成代码和文档。✅
lint 运行 go lint 静态分析代码。🔎
test 运行单元测试 ✔️
cover 运行带覆盖率的单元测试。🧪
docker-build 使用管理器构建 Docker 镜像。🐳
docker-push 使用管理器推送 Docker 镜像。🔝
docker-buildx-push 使用管理器和 buildx 推送 Docker 镜像。🚢
copyright-verify 验证文件的版权声明。📄
copyright-add 为所有文件添加版权声明。📝
swagger 生成 Swagger 文档。📚
serve-swagger 提供 Swagger 规范和文档。🌐
clean 清除所有构建结果。🧹
help 显示此帮助信息。ℹ️
```

> **注意**:强烈建议在提交代码之前运行 `make all`。🚀

```
bashCopy Codemake all
```

## 🕋 架构图 ## 🕋 架构图


![架构图](assets/images/architecture.png)
![架构](https://chat.jinshutuan.com/assets/images/architecture.png)


**MVC 架构设计:**
**MVC 架构设计:**


![MVC](assets/images/mvc.png)
![MVC](https://chat.jinshutuan.com/assets/images/mvc.png)


## 🤖 文件目录说明 ## 🤖 文件目录说明


目录规范化设计结构:
目录结构规范化设计:


```bash
.
```
bashCopy Code.
├── assets ├── assets
│ └── images │ └── images
├── build ├── build
├── deploy ├── deploy
├── docs ├── docs
├── kf_plugins # 带有 LLM 的本地知识库
├── kf_plugins # 有 LLM 的本地知识库
│ ├── chat │ ├── chat
│ ├── config │ ├── config
│ ├── data │ ├── data
@@ -104,24 +123,26 @@ npm run dev


## 🗓️ 社区会议 ## 🗓️ 社区会议


我们希望任何人都能参与到我们的社区中来,我们提供礼品和奖励,并欢迎您在每个星期四的晚上加入我们
我们欢迎任何人参与我们的社区,我们会提供礼物和奖励,并欢迎您加入我们的每周四晚上的活动


我们在 [GitHub 讨论区](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) 中记录了每一次[双周会议](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting),我们的会议纪要写在 [Google 文档](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing) 中。
我们的会议在 [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) 🎯 的 `openkf` 频道中,您可以搜索 openkf 频道加入。

我们会将每次 [双周会议](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) 的记录保存在 [GitHub discussions](https://github.com/OpenIMSDK/OpenKF/discussions/categories/meeting) 中,会议纪要会写在 [Google Docs](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing) 中。


## 🤼‍ 贡献与开发 ## 🤼‍ 贡献与开发


OpenIMSDK 的目标是建立一个顶级的开源社区。我们有一套标准,可以在 [Community 仓库](https://github.com/OpenIMSDK/community) 中找到
OpenIMSDK 的目标是打造一个顶级的开源社区。我们有一套标准,在 [Community repository](https://github.com/OpenIMSDK/community) 中有详细说明


如果您想对此 OpenKF 仓库进行贡献,请阅读我们的 [贡献者文档](https://github.com/OpenIMSDK/OpenKF/blob/main/CONTRIBUTING.md)。
如果您想为 OpenKF 贡献代码,请阅读我们的 [贡献者文档](https://github.com/OpenIMSDK/OpenKF/blob/main/CONTRIBUTING.md)。


在开始之前,请确保您的更改是需要的。最好的方式是创建一个 [新的讨论](https://github.com/OpenIMSDK/OpenKF/discussions/new/choose) 或使用 [Slack 交流](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg),或者如果您发现问题,请先进行 [报告](https://github.com/OpenIMSDK/OpenKF/issues/new/choose)。
在开始之前,请确保您的更改是需要的。最好先创建一个 [新的讨论](https://github.com/OpenIMSDK/OpenKF/discussions/new/choose) 或通过 [Slack 进行沟通](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg),或者如果您发现问题,请先 [报告问题](https://github.com/OpenIMSDK/OpenKF/issues/new/choose)。


## 🚨 许可证 ## 🚨 许可证


OpenIMSDK 在 Apache 2.0 许可证下发布。完整的许可证文本请参阅 [LICENSE](https://github.com/OpenIMSDK/OpenKF/tree/main/LICENSE)。
OpenIMSDK 使用 Apache 2.0 许可证。完整的许可证文本请参见 [LICENSE](https://github.com/OpenIMSDK/OpenKF/tree/main/LICENSE)。

此存储库中显示的 OpenKF 标志(包括其变体和动画版本),存储在 [OpenKF](https://github.com/OpenIMSDK/openkf) 的 [assets/logo](https://chat.jinshutuan.com/assets/logo) 和 [assets/logo-gif](https://chat.jinshutuan.com/assets/logo-gif) 目录下,受版权法保护。


## 🔮 感谢我们的贡献者! ## 🔮 感谢我们的贡献者!


<a href="https://github.com/OpenIMSDK/OpenKF/graphs/contributors">
<img src="https://contrib.rocks/image?repo=OpenIMSDK/OpenKF" />
</a>
<a href="https://github.com/OpenIMSDK/OpenKF/graphs/contributors"> <img src="https://contrib.rocks/image?repo=OpenIMSDK/OpenKF" /> </a>

+ 1
- 0
assets/logo-gif/LICENSE View File

@@ -0,0 +1 @@
# The OpenKF logo files are licensed under a choice of either Apache-2.0 or CC-BY-4.0 (Creative Commons Attribution 4.0 International).

+ 1
- 0
assets/logo/LICENSE View File

@@ -0,0 +1 @@
# The OpenKF logo files are licensed under a choice of either Apache-2.0 or CC-BY-4.0 (Creative Commons Attribution 4.0 International).

+ 6
- 6
docs/CODEOWNERS View File

@@ -2,10 +2,10 @@
# Each line is a file pattern followed by one or more owners. # Each line is a file pattern followed by one or more owners.


# README files # README files
README.md @cubxxw @kubbot @AllianceTing @IRONICBo @MC-kanon @AllianceTing @charles-chenzz @Cathay-Chen @plutoyty
README.md @openimsdk/openim @cubxxw @kubbot @AllianceTing @IRONICBo @MC-kanon @AllianceTing @charles-chenzz @Cathay-Chen @plutoyty


# Contributing guidelines # Contributing guidelines
CONTRIBUTING.md @kubbot @cubxxw @IRONICBo @AllianceTing @plutoyty @fodedoumbouya
CONTRIBUTING.md @openimsdk/openim @kubbot @cubxxw @IRONICBo @AllianceTing @plutoyty @fodedoumbouya


# License files # License files
LICENSE @kubbot @cubxxw @IRONICBo @fodedoumbouya LICENSE @kubbot @cubxxw @IRONICBo @fodedoumbouya
@@ -20,10 +20,10 @@ assets/* @AllianceTing @IRONICBo @cubxxw @MC-kanon
deploy/* @IRONICBo @cubxxw @kubbot @MC-kanon @charles-chenzz deploy/* @IRONICBo @cubxxw @kubbot @MC-kanon @charles-chenzz


# Server directory # Server directory
server/* @AllianceTing @cubxxw @IRONICBo @liumingsongning @Cathay-Chen @charles-chenzz @hanzhixiao @plutoyty
server/* @openimsdk/openim @AllianceTing @cubxxw @IRONICBo @liumingsongning @Cathay-Chen @charles-chenzz @hanzhixiao @plutoyty


# Web directory # Web directory
web/* @AllianceTing @MC-kanon @IRONICBo @liumingsongning @plutoyty
web/* @openimsdk/openim @AllianceTing @MC-kanon @IRONICBo @liumingsongning @plutoyty


# These owners will be the default owners for everything in # These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence, # the repo. Unless a later match takes precedence,
@@ -35,12 +35,12 @@ web/* @AllianceTing @MC-kanon @IRONICBo @liumingsongning @plutoyty
# precedence. When someone opens a pull request that only # precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global # modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review. # owner(s) will be requested for a review.
*.js @cubxxw @kubbot @IRONICBo @MC-kanon @AllianceTing @liumingsongning
*.js @openimsdk/openim @cubxxw @kubbot @IRONICBo @MC-kanon @AllianceTing @liumingsongning


# You can also use email addresses if you prefer. They'll be # You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author # used to look up users just like we do for commit author
# emails. # emails.
*.go 3293172751nss@gmail.com @IRONICBo @AllianceTing @eurecalulu @hanzhixiao @liumingsongning @Cathay-Chen @charles-chenzz @plutoyty @fodedoumbouya
*.go @openimsdk/openim 3293172751nss@gmail.com @IRONICBo @AllianceTing @eurecalulu @hanzhixiao @liumingsongning @Cathay-Chen @charles-chenzz @plutoyty @fodedoumbouya
*.py 3293172751nss@gmail.com @IRONICBo @AllianceTing @eurecalulu @liumingsongning @plutoyty *.py 3293172751nss@gmail.com @IRONICBo @AllianceTing @eurecalulu @liumingsongning @plutoyty


# Teams can be specified as code owners as well. Teams should # Teams can be specified as code owners as well. Teams should


+ 0
- 4
docs/OWNERS View File

@@ -1,4 +0,0 @@
reviewers:
- cubxxw
approvers:
- cubxxw

+ 16
- 0
docs/website/.gitignore View File

@@ -0,0 +1,16 @@
### Hugo ###
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# Temporary lock file while building
/.hugo_build.lock

# End of https://www.toptal.com/developers/gitignore/api/hugo

+ 53
- 14
docs/website/Makefile View File

@@ -1,18 +1,32 @@
HUGO_VERSION = $(shell grep ^HUGO_VERSION netlify.toml | tail -n 1 | cut -d '=' -f 2 | tr -d " \"\n")
NODE_BIN = node_modules/.bin
NETLIFY_FUNC = $(NODE_BIN)/netlify-lambda

# The CONTAINER_ENGINE variable is used for specifying the container engine. By default 'docker' is used
# but this can be overridden when calling make, e.g.
# CONTAINER_ENGINE=podman make container-image
CONTAINER_ENGINE ?= docker
IMAGE_REGISTRY ?= gcr.io/k8s-staging-sig-docs
IMAGE_VERSION=$(shell scripts/hash-files.sh Dockerfile Makefile | cut -c 1-12)
CONTAINER_IMAGE = $(IMAGE_REGISTRY)/k8s-website-hugo:v$(HUGO_VERSION)-$(IMAGE_VERSION)
# Mount read-only to allow use with tools like Podman in SELinux mode
# Container targets don't need to write into /src
CONTAINER_RUN = "$(CONTAINER_ENGINE)" run --rm --interactive --tty --volume "$(CURDIR):/src:ro,Z"

CCRED=\033[0;31m
CCEND=\033[0m

# Docker buildx related settings for multi-arch images
DOCKER_BUILDX ?= docker buildx

REPO_ROOT:=${CURDIR}/.. REPO_ROOT:=${CURDIR}/..
# setup go for managing hugo # setup go for managing hugo
PATH:=$(shell cd $(REPO_ROOT) && . hack/build/setup-go.sh && echo "$${PATH}")
# go1.9+ can autodetect GOROOT, but if some other tool sets it ... # go1.9+ can autodetect GOROOT, but if some other tool sets it ...
GOROOT:= GOROOT:=
# enable modules # enable modules
GO111MODULE=on GO111MODULE=on
# disable CGO by default for static binaries # disable CGO by default for static binaries
CGO_ENABLED=0 CGO_ENABLED=0
export PATH GOROOT GO111MODULE CGO_ENABLED
# work around broken PATH export
SPACE:=$(subst ,, )
SHELL:=env PATH=$(subst $(SPACE),\$(SPACE),$(PATH)) $(SHELL)

# from https://github.com/kubernetes/website/blob/master/Makefile
DOCKER = docker DOCKER = docker
HUGO_VERSION = 0.60.0 HUGO_VERSION = 0.60.0
DOCKER_IMAGE = jojomi/hugo:$(HUGO_VERSION) DOCKER_IMAGE = jojomi/hugo:$(HUGO_VERSION)
@@ -23,15 +37,40 @@ HUGO_BIN:=$(REPO_ROOT)/bin/hugo
$(HUGO_BIN): $(HUGO_BIN):
go build -o $(HUGO_BIN) github.com/gohugoio/hugo go build -o $(HUGO_BIN) github.com/gohugoio/hugo


hugo: $(HUGO_BIN)
.PHONY: help
help: ## Show this help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

.PHONY: container-image
module-check: ## Check if all of the required submodules are correctly initialized.
@git submodule status --recursive | awk '/^[+-]/ {err = 1; printf "\033[31mWARNING\033[0m Submodule not initialized: \033[34m%s\033[0m\n",$$2} END { if (err != 0) print "You need to run \033[32mmake module-init\033[0m to initialize missing modules first"; exit err }' 1>&2

.PHONY: module-init
module-init: ## Initialize required submodules.
@echo "Initializing submodules..." 1>&2
@git submodule update --init --recursive --depth 1


serve: hugo
all: build ## Build site with production settings and put deliverables in ./public

.PHONY: build
build: module-check ## Build site with non-production settings and put deliverables in ./public
$(HUGO_BIN) --cleanDestinationDir --minify --environment development

.PHONY: build-preview
build-preview: module-check ## Build site with drafts and future posts enabled
$(HUGO_BIN) --cleanDestinationDir --buildDrafts --buildFuture --environment preview

.PHONY: functions-build
functions-build: ## Build functions
$(NETLIFY_FUNC) build functions-src

.PHONY: hugo
hugo: $(HUGO_BIN) ## Build site with production settings and put deliverables in ./public
$(HUGO_BIN) --cleanDestinationDir --minify --environment production

.PHONY: serve
serve: hugo ## Serve site at http://localhost:1313/
$(HUGO_BIN) server --bind="0.0.0.0" \ $(HUGO_BIN) server --bind="0.0.0.0" \
--ignoreCache \ --ignoreCache \
--buildFuture \ --buildFuture \
--disableFastRender --disableFastRender

build: hugo
$(HUGO_BIN)

.PHONY: build serve hugo

+ 123
- 0
docs/website/README.md View File

@@ -0,0 +1,123 @@
# OpenKF's docs

OpenKF's docs are built with [hugo](https://gohugo.io/), and can be browsed live at https://kind.sigs.k8s.io/

To browse them locally, install hugo and run `make serve` from this directory.

Read [tutorial](https://getdoks.org/docs/overview/introduction/), learning to use OpenKF document construction


## File Directory Description

| Directory | Description |
| ---------- | ------------------------------------------------------------ |
| archetypes | Directory for creating new content files with Hugo command. |
| assets | Directory for storing files that need to be processed by Hugo Pipes. |
| config | Directory for storing configuration directives in JSON, YAML, or TOML format. |
| content | Directory for storing all the content of your website. Each top-level folder is considered a content section. |
| data | Directory for storing configuration files that can be used by Hugo during website generation. |
| layouts | Directory for storing template files specifying how to render content views in the static website. |
| static | Directory for storing all static content such as images, CSS, JavaScript, etc. |
| resources | Directory for caching files to speed up the generation process. |


## Command

> **Note**💡:
> You can change the commands in the scripts section of `./package.json`.

### create

Create new content for your site:

```bash
npm run create [path] [flags]
```

See also the Hugo docs: [hugo new](https://gohugo.io/commands/hugo_new/).

### Docs based tree

Create a docs based tree — with a single command:

```bash
npm run create -- --kind docs [section]
```

For example, create a docs based tree named guides:

```bash
npm run create -- --kind docs guides
```

## lint

Check scripts, styles, and markdown for errors:

```bash
npm run lint
```

### scripts

Check scripts for errors:

```bash
npm run lint:scripts [-- --fix]
```

### styles

Check styles for errors:

```bash
npm run lint:styles [-- --fix]
```

### markdown

Check markdown for errors:

```bash
npm run lint:markdown [-- --fix]
```

## clean

Delete temporary directories:

```bash
npm run clean
```

## start

Start local development server:

```bash
npm run start
```

## build

Build production website:

```bash
npm run build
```

### functions

Build Lambda functions:

```bash
npm run build:functions
```

### preview

Build production website including draft and future content:

```bash
npm run build:preview
```

+ 14
- 0
docs/website/theme.toml View File

@@ -0,0 +1,14 @@
name = "Doks"
license = "MIT"
licenselink = "https://github.com/h-enk/doks/blob/master/LICENSE"
description = "Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
homepage = "https://github.com/h-enk/doks"
demosite = "https://doks.netlify.app"
tags = ["landing page", "documentation", "blog", "minimal", "modern", "customizable", "search", "dark mode", "bootstrap"]
features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts", "dark mode"]
[author]
name = "Henk Verlinde"
homepage = "https://henkverlinde.com"

+ 6
- 0
package-lock.json View File

@@ -0,0 +1,6 @@
{
"name": "openkf",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

Loading…
Cancel
Save