优化
22
website/.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# Dependencies
|
||||
/node_modules
|
||||
|
||||
# Production
|
||||
/build
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
.vercel
|
||||
2
website/.npmrc
Normal file
@@ -0,0 +1,2 @@
|
||||
# https://npmmirror.com/
|
||||
registry = https://registry.npmmirror.com
|
||||
3
website/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Tailchat Document
|
||||
|
||||
[https://tailchat.msgbyte.com/](https://tailchat.msgbyte.com/)
|
||||
3
website/babel.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
||||
16
website/blog/2023-02-25-ready-for-global.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: Tailchat is ready for global
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [blog]
|
||||
---
|
||||
|
||||
After some days work, and efforts of the past two years. `Tailchat` is ready for face to global service.
|
||||
|
||||
In feature, we will face more and more challenge from global business. `Tailchat` is a open source project, and we think the future of `Tailchat` has more possibility.
|
||||
|
||||
I draw a draft for `Tailchat` future, some are ready and some are not ready. But I'm confident I can keep going.
|
||||
|
||||

|
||||
31
website/blog/2023-03-01-the-era-of-noIM.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: It's time to officially step into the era of noIM
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
keywords:
|
||||
- tailchat
|
||||
- noIM
|
||||
tags: [blog]
|
||||
---
|
||||
|
||||
From far to now, there have been many rounds of changes in communication methods, from email to IRC, to today's communication tools such as Slack or Discord that include audio and video communication, and chats such as Telegram and Signal that focus on message privacy and security. Now, I think it's time to step into a new stage, the noIM (Not Only IM) stage.
|
||||
|
||||
As people's needs for information communication methods continue to evolve, we need to collaborate on more and more platforms. We can exchange information on Slack, communicate design drafts on Figma, exchange documents on Notion, conduct video conferences on Zoom, and so on. With the growing power of the Web, most of the online tools can be operated on the web.
|
||||
|
||||
This brings possibility to the concept of noIM.
|
||||
|
||||
noIM means that an instant messaging application is not only for sending and receiving messages – of course, messaging tools will always be the core of instant messaging application iterations – but also means that it should undertake a multi-person collaborative circulation tool and responsibility. Because IM is the natural way, it represents the most basic way of communication and collaboration on the Internet. We can seamlessly connect various tools based on IM. Imagine that, we can do things in the same tool that we needed to switch between multiple tools before, and these tools can interact to a certain extent through the central IM.
|
||||
|
||||

|
||||
|
||||
Excellent chat systems such as Slack and Discord also provide an open platform, allowing third-party applications to interact with chat applications, but I don't think that's enough. Current integration methods simply send links, in the new era, we need a more native integration method. Many things should be shared and connected–such as account system, permission system, group relationship, etc.
|
||||
|
||||
A basic noIM system should have an open design to allow it to be combined with other tools in a native way, or to implement all possible collaboration methods by itself - such as G Suite, in this way, the flow between applications can be very smooth, but I think a better way is to connect third-party application users to have the right to choose their favorite tools, so it is inevitable to design a sufficiently open design.
|
||||
|
||||
So I designed a product like Tailchat. In addition to having an open platform with existing popular projects, Tailchat also provides a set of plugin mechanisms to help achieve deeper integration. Through Tailchat's plugin mechanism, any product can directly obtain all existing contexts of Tailchat, such as user system, permission system, etc. More importantly, Tailchat is an open source and open platform, which means Tailchat has better privacy, can develop plugins very well, and it's easy to make tools unique to users. This is the same as the ecology that VSCode wants to create, but unlike VSCode, Tailchat, as an IM, can naturally bring more interactions, which is a natural advantage of chat software. This is also why I believe that noIM can shine in the future.
|
||||
|
||||
Github: [https://github.com/msgbyte/tailchat](https://github.com/msgbyte/tailchat)
|
||||
|
||||
Office Website: [https://tailchat.msgbyte.com/](https://tailchat.msgbyte.com/)
|
||||
|
||||
Try in online: [https://nightly.paw.msgbyte.com/](https://nightly.paw.msgbyte.com/)
|
||||
14
website/blog/2023-03-14-v1.6.7.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Release Note v1.6.7
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.6.7
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Enhanced personal brand customization, allowing to customize the name and background image of the server login entry (pictures have no file upload limit)
|
||||
- Optimized the memory usage of the background management platform, and the memory usage is only about 1/4 of the original
|
||||
- The background management platform adds converseID filtering
|
||||
- Fixed some bugs
|
||||
12
website/blog/2023-03-27-deploy-in-synology.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Tailchat Synology deployment record
|
||||
authors: reacher
|
||||
image: /img/logo.svg
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [blog]
|
||||
---
|
||||
|
||||
:::info
|
||||
Its blog is a chinese only blog from users, please switch to chinese language to read it.
|
||||
:::
|
||||
14
website/blog/2023-04-02-v1.6.8.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Release Note v1.6.8
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.6.8
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Optimize the performance of the emoji panel and reconstruct the rendering method of a single emoticon.
|
||||
- Modified the style of url in the message, adding a dotted underline for emphasis
|
||||
- Added a send button, when there is content in the message input box, the + sign will be turned into a send button, optimizing the experience of sending messages on the mobile terminal
|
||||
- Fix some copywriting errors, fix the avatar path parsing error, and fix the error of nesting page when entering a path without a protocol header on the web panel
|
||||
18
website/blog/2023-04-24-v1.7.0.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: Release Note v1.7.0
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.7.0
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Added wxpusher plugin for message notification
|
||||
- Added more markdown syntax support (such as tables)
|
||||
- Added markdown text editor
|
||||
- Optimized the display of message notifications and removed the rich text tags
|
||||
- Added support for http protocol addresses in the plugin documentation
|
||||
- The plug-in center has added plug-in entrances for open platforms and third-party integration
|
||||
- A push push has added a request id record for troubleshooting
|
||||
- Optimize the switching display of the content panel in the mobile environment, use transform instead of width
|
||||
147
website/blog/2023-04-28-fast-create-robot-with-laf.md
Normal file
@@ -0,0 +1,147 @@
|
||||
---
|
||||
title: "Tailchat x Laf: Develop a chatbot in 10 minutes"
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: tailchat-laf-robot
|
||||
keywords:
|
||||
- tailchat
|
||||
- laf
|
||||
tags: [Guide]
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
[Tailchat](https://github.com/msgbyte/tailchat) is an open source **noIM(not only IM)** application, in addition to the general instant messaging function, it also includes a complete open platform and plugin ecosystem. This time we will use the open platform of `Tailchat`.
|
||||
|
||||
[Laf](https://github.com/labring/laf) is an open source **serverless** cloud development that provides out-of-the-box application resources such as cloud functions, cloud databases, and cloud storage. This time we will use the cloud function provided by him.
|
||||
|
||||
Because both platforms are so convenient, it only takes us 10 minutes to develop a complete conversational bot.
|
||||
|
||||
## TLDR
|
||||
|
||||
### Create an open platform application
|
||||
|
||||
No nonsense, let's get right to work.
|
||||
|
||||
First of all, we need to create an open platform application in `Tailchat`'s open platform.
|
||||
|
||||
Before creating, we need to install the relevant plugins, because the capabilities of Tailchat are encapsulated in different plugins, and some capabilities will not be visible if the plugins are not installed.
|
||||
|
||||
We need to install the open platform plugin (com.msgbyte.openapi) and third-party integration (com.msgbyte.integration) plugin
|
||||
|
||||

|
||||
|
||||
Then we can see our open platform plugin on the settings page in the lower left corner
|
||||
|
||||
Quickly create an application:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
After creating, click **Enter** to enter the application details page.
|
||||
|
||||

|
||||
|
||||
At this point we can get two things, one is **appid** used to identify the unique id of the app, and the other is **appsecret** used to interact with services. It can be simply understood as the account name and password of the open platform application.
|
||||
|
||||
Click on the little eyes to display the complete secret key without desensitization. These two fields we will use next.
|
||||
|
||||
### Create laf cloud function
|
||||
|
||||
Next, let's create a cloud function for the background service of the robot.
|
||||
|
||||
First log in/register an account in [laf](https://laf.dev/) and create an application.
|
||||
|
||||
Each account provides a free experimental application for a quick trial in `laf`, we can create a free one directly
|
||||
|
||||

|
||||
|
||||
After the application is started, we can directly write code on the web page.
|
||||
|
||||
Click the plus sign in the upper left corner to create a cloud function
|
||||
|
||||

|
||||
|
||||
Install the `tailchat-client-sdk` package officially provided by **Tailchat** in the dependencies in the lower left corner for rapid development
|
||||
|
||||

|
||||
|
||||
After clicking Save, the application will automatically restart, and your application is equivalent to installing this package. At this point, we can directly import it. If there is a typescript support in the package, the web editor will also have a type hint.
|
||||
|
||||
The click function quickly writes the following:
|
||||
|
||||
```ts
|
||||
import { TailchatClient, stripMentionTag } from 'tailchat-client-sdk';
|
||||
|
||||
const host = '<your tailchat instance backend host>';
|
||||
const appId = '<appId>';
|
||||
const appSecret = '<appSecret>';
|
||||
|
||||
const client = new TailchatClient(host, appId, appSecret)
|
||||
|
||||
export async function main(ctx: FunctionContext) {
|
||||
console.log('receive', ctx.body);
|
||||
|
||||
const type = ctx.body.type;
|
||||
if (type === 'message') {
|
||||
const payload = ctx.body.payload;
|
||||
try {
|
||||
const message = await client. replyMessage({
|
||||
messageId: payload. messageId,
|
||||
author: payload. messageAuthor,
|
||||
content: payload. messageSnippet
|
||||
}, {
|
||||
groupId: payload.groupId,
|
||||
converseId: payload.converseId,
|
||||
content: `Your message: ${stripMentionTag(payload. messageSnippet)}`,
|
||||
})
|
||||
|
||||
console.log('send message success:', message)
|
||||
} catch (err) {
|
||||
console.log('send message failed:', err)
|
||||
}
|
||||
}
|
||||
|
||||
return { data: 'hi, laf' }
|
||||
}
|
||||
```
|
||||
|
||||
Fill in the corresponding contents of `host` / `appId` / `appSecret` at the top of the code, where `host` is the address of the `Tailchat` backend you deployed yourself. If you are using the official `nightly` environment, you can directly fill in `https://tailchat-nightly.moonrailgun.com`
|
||||
|
||||
The logic of the code is very simple, it is to receive the message pushed from `Tailchat`, and reply the received content as it is.
|
||||
|
||||
After editing the code, click the publish button in the upper right corner to publish the code online, and you can also see that `laf` provides a url that can be accessed from the external network. This url needs to be recorded and we will use it later.
|
||||
|
||||

|
||||
|
||||
At this point, our robot service is complete.
|
||||
|
||||
### Robot configuration
|
||||
|
||||
At this point we are back in `Tailchat`. We still have a few steps left.
|
||||
|
||||
Re-open the app details and switch to the Robots tab. Turn on the robot function and fill the `url` we got in `laf` into the callback address
|
||||
|
||||

|
||||
|
||||
Then add our robot to the group, open the details in the upper left corner of the group
|
||||
|
||||

|
||||
|
||||
Find the integration function on the left, enter the appid to find the application, and click the Add robot to the group button.
|
||||
|
||||

|
||||
|
||||
At this time, after we @robot in the channel and input content, we can see that the robot has responded accordingly
|
||||
|
||||

|
||||
|
||||
Since then, a simple conversational robot has been completed.
|
||||
|
||||
If you want other functions, you can directly modify the source code of the robot. Through bots we can connect Tailchat with various services.
|
||||
|
||||
## Related Links
|
||||
|
||||
- [Tailchat](https://tailchat.msgbyte.com/)
|
||||
- [Laf](https://laf.dev/)
|
||||
20
website/blog/2023-05-24-v1.7.4.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Release Note v1.7.4
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.7.4
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- The new version of admin has been released, you can experience it first through [Deployment Documentation](/docs/deployment/admin)
|
||||
- Add a group welcome plugin, which supports variables and rich text
|
||||
- Chat box supports multi-line text
|
||||
- wxpusher adds sender nickname prompt
|
||||
- Add cache automatic update mechanism when user popover is opened
|
||||
- cli adds smtp verification function to verify smtp uri
|
||||
- Fix the bug that the group setting update operation does not take effect
|
||||
- Fix the problem that inputting the Enter key to send a picture will add a newline character to the input box at the same time
|
||||
- Fix the bug that modifying the configuration and modifying the title icon will not be refreshed
|
||||
- Fix some known issues
|
||||
15
website/blog/2023-05-28-v1.7.5.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Release Note v1.7.5
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.7.5
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Repair the permission logic detection, and fix the bug that the permission does not take effect after the identity group is set
|
||||
- Admin platform adds avatar address preprocessing
|
||||
- Admin platform adds reference types
|
||||
- Admin platform adds custom header and footer
|
||||
- Adjust the invitation strategy to lead to the login page instead of the registration page when not logged in
|
||||
20
website/blog/2023-06-07-v1.7.6.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Release Note v1.7.6
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.7.6
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Added ban/unban user feature
|
||||
- Added friend nickname feature
|
||||
- The friend nickname will be applied in the `group member list`/`converse message`/`mention`/`converse title`, etc.
|
||||
- Added the number of messages in the `admin-next`
|
||||
- Added cache management in the `admin-next`, and now the cache can be cleared through the `admin-next`, which is very friendly to users who do not know redis
|
||||
- Added display of `disableGuestLogin` and `disableUserRegister` in `admin-next` configuration
|
||||
- Added statistics on the number of new users per day on the `admin-next` home page
|
||||
- Mail model add creation time and update time
|
||||
- and adjusted some fields
|
||||
- Optimized the display of message content and id field in the `admin-next`
|
||||
57
website/blog/2023-06-19-benchmark-report.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: The Tailchat benchmark report is freshly released, just takes 1.2 seconds to fully accept broadcast messages in 10k user
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: benchmark-report
|
||||
keywords:
|
||||
- tailchat
|
||||
- benchmark
|
||||
tags: [Report]
|
||||
---
|
||||
|
||||
As an IM application, `Tailchat` naturally needs to be able to handle high concurrent multiplayer online capabilities.
|
||||
|
||||
In order to measure `Tailchat`'s ability to handle a large number of users and give our customers enough confidence, we decided to take the time to test the actual performance in the actual production environment.
|
||||
|
||||
Because in order to meet the scale requirements of users with different levels and needs, the underlying design of `Tailchat` is based on a distributed architecture, which means that we can carry business requirements of different scales through horizontal expansion.
|
||||
|
||||
However, the disadvantage of distributed is that more resources are spent on data communication and forwarding, and it is not as fast as the traditional centralized architecture in small-scale operations.
|
||||
|
||||
This seems to be a contradiction that can't have both fish and bear's paw, but in order to obtain the advantages of both, `Tailchat` has made some special optimizations on single-instance deployment, namely the shortest path principle. This means that if there is and only itself can consume in the mutual calls between microservices, the forwarding stage will be skipped and the request will be sent directly to itself.
|
||||
|
||||
This makes the capability of a single machine better than a cluster if the performance is sufficient. And when a single machine cannot support enough business needs, switch to cluster deployment and use multiple instances together to carry high-demand business scale.
|
||||
|
||||

|
||||
|
||||
## Benchmark test method
|
||||
|
||||
In order to measure the performance of Tailchat in multiplayer online situations, we chose the ability to send and receive messages as the measurement standard.
|
||||
|
||||
That is: **When several people in a group are online at the same time, the time it takes for a complete link from the start of sending a message to the forwarding of all online users to receive the message**
|
||||
|
||||
> Because for the IM project, the traditional 90th/99th percentile data is meaningless, and the most basic ability performance is that all users can receive broadcast messages without loss. Therefore, the requirement for Tailchat is to only look at the 100th percentile data of the time-consuming message dissemination
|
||||
|
||||
At the same time, test the **growth performance** of **resident** cpu and memory when multiple people are online
|
||||
|
||||
> This test is supported by the cluster service provided by [sealos](https://sealos.io/). sealos is really convenient!
|
||||
|
||||
The pressure measurement method is mainly divided into three steps:
|
||||
|
||||
1. Register users in batches, and record the token (Token) returned by the system after registration to a local file
|
||||
1. Load the token stored in the previous step, log in according to the token and establish a persistent connection. After all users have logged in, record the growth of resident resources.
|
||||
1. After all users have logged in, select a user to connect and send a message to the designated channel of the designated group, and record the start time at the same time. When all connections have received this message, record the end time. At this time, record the end time and calculate the intermediate time consumption. This method counts several sets of data to eliminate errors.
|
||||
|
||||
|
||||
## Benchmark test overview
|
||||
|
||||
This pressure test tested the performance of 100 users, 500 users, 1000 users, 2000 users, 5000 users, and 10000 users who are online at the same time and in the same group.
|
||||
|
||||
In order to squeeze the performance of `Tailchat` as much as possible, I chose to use the minimum configuration cap to test as many services as possible. In the case of 3 instances, the maximum support reached 800 users, and there was a problem. After expanding to 5 instances, it successfully supported 1,000 users, but when the number of simultaneous online users rose to about 1,300, a bottleneck appeared again. At this time, I guess that it may be caused by the ulimit that comes with the linux system. After all, no relevant directional optimization has been done before this. At this point, I think the cluster test may come to an end temporarily, and I transferred to the window platform.
|
||||
|
||||
Sure enough, it lived up to my expectations. There are no relevant restrictions on the windows platform, and the number of online users of `Tailchat` has successfully broken through the limit of 2k, 5k, or even 10k. At this point, I think our stress testing work has met our initial expectations. After all, the same industry has reached the upper limit of the same industry. Of course, I think its upper limit is far more than this, because there is still a lot of room for optimization.
|
||||
|
||||
In the highest 10,000-user use case, we tested the elapsed time from message sending to all users receiving the message 5 times. In the end we found that the answer given by `Tailchat` is 1.2 seconds, that is, a message will be sent to all users within 1.2 seconds. I think this data is quite ideal. After all, groups with 10,000 people online at the same time often have more than 100,000 people. Of course, in the follow-up, the situation of a large number of users will be further optimized, and this data will only be a starting point rather than an end point.
|
||||
|
||||
## Full Report
|
||||
|
||||
The specific benchmark test report can be found in: [Benchmark report](/docs/benchmark/report)
|
||||
23
website/blog/2023-06-21-v1.8.0.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: Release Note v1.8.0
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.0
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- The new version of admin has been officially launched to replace the old version of the admin system
|
||||
- If you still want to use the old version of the admin system, you can use `admin-old.yml`, and the image will not continue to build the old version of the admin in subsequent versions. If you need the old version of the admin but the new version of the admin does not support it, please as soon as possible Open an issue to let us know
|
||||
- Optimized the font of the chat page and beautified the font performance on the windows platform
|
||||
- Fixed a bug that the user name of the @ function could not be displayed normally when the user name contained spaces
|
||||
- Fixed a bug where casual users could verify email
|
||||
- Added preprocessing of admin file path
|
||||
- Added a group independent page, now you can extract the group page separately
|
||||
- Admin added batch delete
|
||||
- Admin adds user field display logic
|
||||
- Cli has added the `smtp test` command, you can now quickly send a test email through the cli tool to verify the entire link
|
||||
- Cli adds various stress testing commands to test the number of users online
|
||||
- The health interface adds more context, including instance id, process information
|
||||
- Released the stress test report, you can see the content of the stress test report here: [The Tailchat benchmark report is freshly released, just takes 1.2 seconds to fully accept broadcast messages in 10k user](./2023-06-19-benchmark-report.md)
|
||||
21
website/blog/2023-07-03-v1.8.1.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: Release Note v1.8.1
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.1
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Add a third-party login plugin (com.msgbyte.iam), currently supports `github` login, deployment document see [iam - Third party login](https://tailchat.msgbyte.com/docs/advanced-usage/plugins/com.msgbyte.iam)
|
||||
- The inbox supports content in markdown format
|
||||
- Added the ability to send system messages. Currently, it supports single person sending and everyone sending markdown format notifications. You can see the feature entry in the admin system.
|
||||
- Everyone is sent according to the number of registered users on the server. If there are too many users, it is not guaranteed to be received in real time.
|
||||
- Added the ability to modify the nickname when registering to strengthen the user's awareness of modifying the nickname
|
||||
- Added the `com.msgbyte.env.electron` plugin to prepare for the desktop
|
||||
- Beautify the dashboard chart color
|
||||
- Beautify the github star prompt and add emoji
|
||||
- Fix some known issues
|
||||
|
||||
In addition, the desktop version will release the first beta version in the nearly future
|
||||
119
website/blog/2023-07-04-share-1kstar.md
Normal file
@@ -0,0 +1,119 @@
|
||||
---
|
||||
title: Share how I have operated open source projects and reached 1k star in the past few years
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: share-1kstar
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Share]
|
||||
---
|
||||
|
||||
I developed an IM project [Tailchat](https://tailchat.msgbyte.com/), and finally reached the 1k star milestone in the early morning of June 28, 2023. I am very excited. Of course, for many well-known open source projects, this only need takes a few days, but it is still very important for me. Therefore, I really want to share how I operate an open source project as an open source enthusiast.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
First of all, I must admit that I am a very typical and pure programmer. I have no background, no resources, and I am not good at communication. It can be said that I am a relatively socially phobic person. For people like me, the difficulty is not how to develop an app, but how to promote my app after the development is completed or reaches a certain stage, so that everyone can understand my philosophy.
|
||||
|
||||
Once, I naively thought that open source was just sharing the source code so that everyone could see my code. However, I gradually realized that open source is more like a business. It not only needs to develop its own products, but also needs to find ways to sell the products.
|
||||
|
||||
## A good official website is very important
|
||||
|
||||
The official website is the facade of an application, and for many libraries, the README is their official website. However, for relatively large and complex projects, a simple README may not provide enough information, and an independent official website page becomes very important.
|
||||
|
||||
An excellent official website can increase users' trust in the project. Usually, my basic trust in open source projects comes from the following aspects: whether there is a README or official website, whether there are enough stars, and how much usage/download.
|
||||
|
||||
For example, Tailchat's official website https://tailchat.msgbyte.com/ has become quite good after a few iterations. The first screen occupies almost the entire page, and shows previews of desktop and mobile, which means that my project supports both desktop and mobile. Then succinctly list the characteristics that I think are important, and these are also the key points that I want my product to distinguish from other similar projects.
|
||||
|
||||
The official website is the embodiment of product thinking. Convey your ideas to users through the official website, so that users can understand your design philosophy and why you want to make such a product.
|
||||
|
||||
On the other hand, the official website also provides guidance for users during use. Unless your product does not require users to do anything, just open it and use it (such as various small games), a complete document will help users far beyond your imagination.
|
||||
|
||||
Don't think that you can stop doing these things just because the source code is open source. The code itself is the document. Recalling our own development experience, when using a library, we would not choose to view the source code unless we had to. This is true for libraries, let alone a complete project?
|
||||
|
||||
For open source projects, a complete and multi-platform compatible deployment method is the most basic bottom line.
|
||||
|
||||
## Focus on differentiation
|
||||
|
||||
For open source projects, the easiest way to introduce your products to others is the open source alternative of xxxx, where xxxx is generally a commercial application that you are familiar with. This can give users a very basic idea of your product very quickly. You can also quickly establish a basic concept through everyone's consensus.
|
||||
|
||||
For example, if you want to build an online shopping mall, then you can say that you have created a substitute for Amazon. For example, if you want to make a forum, you can say that you want to make a substitute for discuz.
|
||||
|
||||
However, while saying that your project is a substitute for xxxx, you need to always be clear about the differences between yourself and the other party, instead of constantly copying the functions of other projects. For example, when I introduce and promote my project with others, I will say that I am an IM, an open source alternative to discord/slack. But at the same time I will also emphasize that it is not just an IM. I will talk with the other party about why we need a plug-in system and what the plug-in system can bring us, why I spend 2 years on the underlying architecture and polishing the system to complete this architecture, and why I think my product is excellent. for other projects.
|
||||
|
||||
This is a very difficult thing to do. Because most users don't care about your differences. For most users, only the most basic functions are used, and users are more concerned about whether they can meet their needs. A very sad thing is that no matter what you do, you will have many peers competing with you. The reason why users decide whether to use your product is not because of how powerful your functions are, but whether your functions can meet the needs—— Of course, if you have enough functions, so many that all imaginable needs can be met. But that is what companies do. If you are an individual open source developer, you must learn to focus and focus on differentiation.
|
||||
|
||||
## Emphasis on the international market
|
||||
|
||||
Multilingualism is a very necessary thing. Share your own product in locate is good but not enough. Especially in the open source field, you as a developer don't have to care about language boundaries. Because you are not in control of the differences in laws and regulations and privacy policies in various places. As a developer, you only need to make your product well.
|
||||
|
||||
Therefore, it is very important to support multiple languages. Supporting at least English can greatly expand your audience. If you are not confident about your English level, please make good use of translation software.
|
||||
|
||||
In addition, you can go to overseas platforms to promote your application, not just limited to domestic platforms. Such as Reddit, Hackernews, medium, etc. Don't limit yourself to your own country
|
||||
|
||||
## Give users a sense of trust through perfect documentation and automated testing
|
||||
|
||||
Although a thick instruction manual will not bring any real value to the product itself, it will at least make users who pay attention to this product feel at ease.
|
||||
|
||||
Security is a very metaphysical thing. As a developer, you can say that your project is very easy to use and does not require any documentation at all. But even if you don't read these documents, the existence of these documents will give users a kind of trust, at least it can show that you have paid enough attention to your project.
|
||||
|
||||
There are similar automated test scripts, the former is for ordinary users, and the latter is for developers.
|
||||
|
||||
As developers, we all know the importance of CICD. CICD is an important way to ensure the code quality of a project, and it also means the bottom line of a project. If one doesn't have any CICD workflows or are all failed workflows. Then I would be very, very distrustful of it.
|
||||
|
||||
Open source projects naturally lack trust compared to commercial projects, because the latter are used for profit and can be used to support the operation of enterprises, which means that at least there will be no problems. And open source projects often originate from interests, which naturally give people a feeling of unreliability. Especially when the number of stars in the early stage is relatively low.
|
||||
|
||||
How to break this sense of distrust is also an important factor for open source maintainers to make their projects work.
|
||||
|
||||
## String your content together to reduce exploration costs
|
||||
|
||||
A very bad example is to put relevant content everywhere, making it very difficult for users to see all the content.
|
||||
|
||||
It is very important to have important content indexed in one place. Such as your social media, your documentation, your function manual, your demo environment, your various technical blogs....
|
||||
|
||||
Reduce the user's exploration cost, because if the cost is too high, the user is likely to choose to give up. That's why most sites have keywords in the footer
|
||||
|
||||
If you only have a README file, add all the links to the documentation so the user can clear what's there and what it's for.
|
||||
|
||||
Also, not just your various content, but your project itself should keep this in mind. For example, it is easy to dissuade people from registering with a mobile phone number, and a proper public content experience can better allow users to experience the charm of the product and retain it for a long time. This is what I do in Tailchat. Users can log in with a temporary account, and only need to fill in a nickname to experience the full functionality. When the user decides to keep your account for a long time, you can go through the registration process to claim the temporary account. If you want to let users join your community, you can even directly replace the entry with an invitation link.
|
||||
|
||||
Similarly, if your project contains multiple sub-projects. Monorepo will be a better choice than multiple warehouses. I once wrote a blog about this from a technical point of view, [talking about the benefits of merging multiple projects into one project](http://moonrailgun.com/posts/2674f04a/).
|
||||
|
||||
From the perspective of open source operations, multiple project repositories not only make it more difficult for users to see the whole picture, but also undermine the confidence of open source contributors, because everyone expects contributors to large projects to have their own profile pictures, even if they just change the document typo.
|
||||
|
||||
## Pay attention to the operation of the community and the ecology
|
||||
|
||||
The operation of the community is a very important part of an open source project. Only continuous feedback from the community can pull up a positive cycle of open source projects. The simplest community is to set up a reddit channel or discord group. When I was operating in the early days, I thought that since I am doing IM, why should I go to other IM platforms to operate my community? However, this is wrong, because as a developer, you should accommodate users instead of letting users accommodate you. If users prefer to use reddit, then you should choose to use reddit. If users use discord more, then you should build your own community on discord. Keeping the community active is the first element.
|
||||
|
||||
I really like Notion's ambassador culture and community culture. Establishing a good community-driven ecology is an essential quality for a successful open source project. Although my project is far from reaching this stage, I have studied many successful open source projects without exception. Simply put, open source is a carnival for idealists, and a good open source project is a carnival for a group of idealists. It is a very difficult thing to let users recognize your project and promote it spontaneously, but it is necessary to do it. It is much easier for a group of people to advance than one person.
|
||||
|
||||
On the other hand, we need to pay attention to the value of developers. What is developer value? It is what your project can bring to developers. When promoting Tailchat, I often make an analogy with vscode. vscode is a plug-in text editor. Its ontology is an expansion center + monaco editor, and its value lies in a good developer ecology. Allow different developers to realize their own ideas through vscode's plug-in system and integrate different language support. I don’t know if anyone still remembers that github had its own editor atom before github was acquired by Microsoft. I also like to use it very much, atom has been deprecated since Microsoft acquired github. I believe that Microsoft also sees the great potential of the plug-in system. And Tailchat also uses the plug-in system as the underlying capability at the beginning of the design. One of my favorite sayings is: "A Product That Gets Developer Love Gets Everything". This is also the power of ecology. When the ecology is up, it will be difficult for your product to be replaced by other similar applications.
|
||||
|
||||
## Revisit your early adopters at the right time
|
||||
|
||||
It is very important to maintain seed users in the early stage. Revisit your early users in a timely manner to make your users feel that they are valued and motivated by this product. This will greatly increase the possibility of your users turning into community contributors.
|
||||
|
||||
Many technical people think that only code contribution is contribution. In fact, there are only a small number of people who understand the code, not to mention that there are even fewer people who need to match the technology stack of your project. If many people can make suggestions, I think it is very good for an open source project to do an international translation. up. The most important thing is that these things will be what you move forward. People want to keep moving forward either by money or interest, and the community is a gas station that continuously recharges your interest.
|
||||
|
||||
The early entrepreneurs I came into contact with would like to make appointments with their users to chat about the development of their projects and users' opinions. If you don't feel like you can do that, it's okay to greet with a text. Believe me, the rewards will be greater than imagined.
|
||||
|
||||
## Actively blog and write technical articles
|
||||
|
||||
I am very disgusted to promote my project by constantly and repeatedly sending the introduction of my project in various technical communities like an advertising robot. Although it seems to be a bit of a scholar's aloofness, I still feel that this kind of behavior greatly affects the experience of other people. Some people may say that it is better to be disgust than no one knows, but this is a selfish act of sacrificing other people's experience to achieve one's own.
|
||||
|
||||
My choice as a technical person is to write more blogs and technical documents. Promote your own projects in technical articles. I hope this should be a win-win behavior: as a reader, you gain knowledge, and as a writer, I gain exposure.
|
||||
|
||||
At the same time, writing articles is also a sorting out of your own ideas, which is similar to writing technical documents. I used to be very disgusted with writing technical documents, because things that can be written directly by writing code still need to write technical documents to restrain myself. Generally speaking, the time for writing technical documents is about the same as the time for writing codes, because to write a correct technical document, it is often necessary to determine the possibility of the solution. Basically, to determine the feasibility of the solution, most of the code is almost written. But now I understand the necessity of writing technical documents, more to organize my thoughts. Writing code is easy, writing code that people can understand is difficult, and writing code that people can understand and maintain later is the most difficult. I used to rely on my own experience to achieve easy maintenance in the later stage, and the technical documentation is to add a layer of CICD to constrain behavior on the basis of my reliance on experience. The same is true for writing technical articles. While writing code, you must organize things to form a methodology. This is also a kind of improvement of one's own ability.
|
||||
|
||||
## Summarize
|
||||
|
||||
Open source is bumpy in the end, and there is a high probability that there will be no actual benefits in the end. That's why I say open source is a carnival for idealists.
|
||||
|
||||
Open source projects often do not pursue profit and pay a lot. In addition to writing code, they also need to devote energy to publicity and operation. It is a thankless task for most people.
|
||||
|
||||
Of course, what I'm talking about here are real open source projects that require long-term efforts. If it is only for high star, there are actually many ways to use it for job hunting or other purposes. Many projects have only a few lines of code, but there are still many hot projects such as tens of thousands of stars on github.
|
||||
|
||||
On the contrary, my topic is undoubtedly the Red Sea in the Red Sea. On the C side, there were giants that occupied the market early more than ten years ago, and there are also many powerful competitors competing on the B side. Also in open source, there are countless similar products competing with each other. The reason why I still choose IM as my open source project direction, and I have worked hard for several years so far. I also believe that my design concept will stand out among a bunch of similar competitors with serious homogeneity. Of course, it is undeniable that there will be a possibility of failure. Maybe this is an idealist, and I am willing to devote my heart and soul to my ideal.
|
||||
|
||||
I believe that the world is often changed by idealists. Given the choice, I prefer to work with a group of idealists. I believe that you who see the end must also be a person who loves open source, encourage each other, and go on together.
|
||||
19
website/blog/2023-07-05-v1.8.2.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
title: Release Note v1.8.2
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.2
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
:::info
|
||||
The desktop version v0.0.1 has been released, currently only supports windows
|
||||
|
||||
You can get the content on the [download page](https://tailchat.msgbyte.com/downloads)
|
||||
:::
|
||||
|
||||
- Fixed a serious bug that caused the failure of fetch data due to the admin authentication problem
|
||||
- Fixed admin chart color matching problem
|
||||
- Fixed the error that the content could not be obtained correctly when the mobile terminal obtained the custom name of the server
|
||||
24
website/blog/2023-07-10-v1.8.3.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: Release Note v1.8.3
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.3
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Added the offline icon plugin as the default builtin plugin, now tailchat can be used normally in the whole intranet environment
|
||||
- Added a discovery plugin (com.msgbyte.discover), users can join groups through the discovery page
|
||||
- The group card of the exploration plugin currently only allows manual addition of records in the Admin platform
|
||||
- 
|
||||
- Added the group description function, which can only be displayed in the group card on the exploration page at present
|
||||
- The number of group members is displayed in the group summary
|
||||
- 
|
||||
- Admin home page statistics time range changed from 7 days to 14 days
|
||||
- Added `com.msgbyte.linkmeta` plugin as official builtin plugin
|
||||
- 
|
||||
- Fixed the problem that the logo position would shift when the sidebar scroll bar appeared
|
||||
- Fixed the problem that the result returned by the AI assistant plugin was too long and could not see all the content
|
||||
- 
|
||||
- Optimized cache management for some requests
|
||||
54
website/blog/2023-07-14-v1.8.4.md
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
title: Release Note v1.8.4
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.4
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature update
|
||||
|
||||
#### Added group invitation code usage statistics and usage limit control
|
||||
|
||||
You can make secondary edits when creating, or manage invitation codes in the group panel for editing
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
For non-founder roles to edit, you need to give editing permissions to edit
|
||||
|
||||

|
||||
|
||||
In addition, you can now see the usage of the invitation code in the group invitation code settings (the previous usage will not be counted)
|
||||
|
||||

|
||||
|
||||
#### Added group background picture function
|
||||
|
||||
Now you can add a background image to the group as a dimension, you can see this setting item in the `group details -> configuration`
|
||||
|
||||

|
||||
|
||||
Currently visible on the invite to join page
|
||||
|
||||

|
||||
|
||||
### Other Updates
|
||||
|
||||
- Added environment variable `DISABLE_PLUGIN_STORE` to disable user's plugin center page
|
||||
- Added the environment variable `DISABLE_ADD_FRIEND` to disable the user's add friend page
|
||||
- Fix the bug that the github login cannot be registered normally if there is no email address
|
||||
- Add invitation code generation verification to prevent two bugs with the same invitation code in a very small probability, and add a unique index at the database level
|
||||
- Fix the color adaptation of server card light color theme
|
||||
- Fix the bug that the input box will also be cleaned up when the sending problem occurs due to network exceptions and other situations that cannot be sent
|
||||
- Optimize the user experience of the `com.msgbyte.discover` plugin, for the group that has already joined, it will jump directly instead of popping up the prompt of failure to join the group
|
||||
- **Desktop version** adds reload and other menus
|
||||
- **Desktop version** optimizes the file download operation, and the folder will be opened automatically after the file is downloaded
|
||||
- Optimized the message of github subscription and added a hyperlink to the project
|
||||
- Removed the builtin `com.msgbyte.linkmeta` plugin on the official website based on performance considerations
|
||||
46
website/blog/2023-07-19-v1.8.5.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Release Note v1.8.5
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.5
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature update
|
||||
|
||||
#### Global Announcements
|
||||
|
||||
Global announcements can now be enabled in the `System` -> `Announcement` tab in the admin management platform
|
||||
|
||||

|
||||
|
||||
After clicking submit, all users will immediately display a global announcement on the page, as follows:
|
||||
|
||||

|
||||
|
||||
Users can click the close button on the far right to close this notification.
|
||||
|
||||
In addition, if the content of the announcement is more complicated, you can also choose to add an announcement link. When the link is not empty, a **Learn More** button will be displayed on the announcement.
|
||||
|
||||

|
||||
|
||||
#### Admin cache management optimization
|
||||
|
||||
Subdivided Admin's cache management because we realized that it would be very brute force for administrator to update the client's configuration only by modifying environment variables, but only by clearing all caches.
|
||||
|
||||
Therefore, we subdivided the cache management and extracted the function of cleaning the client cache separately
|
||||
|
||||

|
||||
|
||||
|
||||
### Other Updates
|
||||
|
||||
- Add call `config.setClientConfig` to send notifications to all users
|
||||
- Fixed a security issue that may cause xss attacks when using html panels
|
||||
- Optimized the storage method of the html panel to reduce the data packet pressure generated by the first loading
|
||||
- Fixed the situation where the user may not be able to obtain the nickname when the iam plugin uses github to log in because there is no name field
|
||||
- Fixed the problem that the list of plugins may be displayed repeatedly due to certain circumstances
|
||||
- Fixed the problem that the uploaded gif image may not be played due to the compression algorithm
|
||||
- Optimized the rendering performance of the member list in the case of large data
|
||||
23
website/blog/2023-07-24-v1.8.6.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: Release Note v1.8.6
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.6
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Added a flashing prompt on the desktop after receiving a message
|
||||
- Added a new version update prompt function on the desktop
|
||||
- Desktop version reduced icon size from 1600x1600 to 512x512
|
||||
- Fixed an issue with internationalization translations in the panel
|
||||
- `tailchat-client-sdk` adds `TailchatWsClient` for robot interaction in long connection scenarios, which is more flexible than `TailchatHTTPClient`
|
||||
- The original `TailchatClient` was renamed to `TailchatHTTPClient`
|
||||
- Added `tushan` icon in about panel
|
||||
- Added some missing offline icons
|
||||
- Optimized page load time and allowed to manually click the button to refresh resources
|
||||
- Optimized the character text position and style of `com.msgbyte.genshin` to fit the icon more closely
|
||||
- Optimized the memory usage of the default configuration and reduced the number of instances. For users who have deployed before, it is recommended to use the `docker-compose down` command to clean up the previous container before using `docker-compose up -d` to start
|
||||
- Removed the old version of the admin system to reduce the image size
|
||||
- Removed w2a source code
|
||||
58
website/blog/2023-07-30-v1.8.7.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: Release Note v1.8.7
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.7
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature Update
|
||||
|
||||
#### Self-hostable real-time audio and video solutions
|
||||
|
||||
The second real-time audio and video solution officially provided by `Tailchat`, give users the choice of service! Created for users with self-host needs, the operation logic has been optimized to make it easier to use.
|
||||
|
||||
For normal users, you need to install the `com.msgbyte.livekit` plugin
|
||||
|
||||

|
||||
|
||||
|
||||
Refresh the page and reload the plug-in, you can see the voice channel function when creating the group panel
|
||||
|
||||

|
||||
|
||||
You can do some preparatory work before joining the group, such as turning on the camera to adjust the position, adjusting the media source of the camera microphone, etc.
|
||||
|
||||

|
||||
|
||||
Join when you're ready Join channel meetings to chat with others online.
|
||||
|
||||

|
||||
|
||||
During the meeting, you can share images, switch your media devices, and chat with other participants in real time.
|
||||
|
||||
> Note that the chat feature in the meeting will not be save persistently, but for the flexible Tailchat, there is a trick to pin a regular chat channel and chat in that channel, so that no matter the participant It is still possible to expect the content to be persistently save
|
||||
> 
|
||||
|
||||
Group members outside the room can see who's in the meeting, so if someone's chatting, join them right away!
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
In addition, please feel free to switch to other panels during the meeting, and the connection will not be interrupted. You can quickly return to the current session at any time through the button in the lower left corner.
|
||||
|
||||

|
||||
|
||||
|
||||
> Take a look in [Livekit Plugin Deployment Guide](/docs/meeting/livekit) for media server deployment solutions
|
||||
|
||||
### Other Updates
|
||||
|
||||
- Increase the compatibility of aliyunoss with other third-party object storage services compatible with the aws s3 protocol
|
||||
- Add `type` and `emailVerified` fields to admin user list
|
||||
- admin fixed the problem of wrong statistics of group members and panels
|
||||
- Fix type error caused by `tailchat-client-sdk` dependency issue
|
||||
- The plugin development function `regCustomPanel` adds a `useIsShow` field for showing or hiding icons.
|
||||
42
website/blog/2023-08-06-v1.8.8.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Release Note v1.8.8
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.8
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature Update
|
||||
|
||||
#### Add analysis feature
|
||||
|
||||
The analysis feature can help you quickly understand the usage of your server and see the active status at a glance
|
||||
|
||||

|
||||
|
||||
#### Add local messages to avoid network errors that send the same message repeatedly
|
||||
|
||||

|
||||
|
||||
In a low-speed network, when the message is sent, it will be displayed on the screen immediately to the message list, which is displayed semi-transparently. When the sending is successful, it will be corrected to the normal display according to the returned content.
|
||||
|
||||
#### Optimize the prompt for unprocessed friend requests
|
||||
|
||||
When there is an unprocessed friend request, it will be prompted in the sidebar and navigation bar at this time to ensure that users will not miss information
|
||||
|
||||

|
||||
|
||||
### Other Updates
|
||||
|
||||
- Added plugin to allow automatic joining of groups after registration
|
||||
- You only need to configure the corresponding environment variables to take effect, see the document for details: [com.msgbyte.autojoinGroup](/docs/advanced-usage/plugins/com.msgbyte.autojoinGroup)
|
||||
- Added the function of grouping group members by status
|
||||
- admin adds the function of creating groups
|
||||
- admin adds the function of adding group members
|
||||
- admin supports searching groups and users by ID
|
||||
- Add i18n support for antd and WebFastifyForm
|
||||
- Fixed an issue where the AI assistant would bypass the recall prompt when summarizing messages
|
||||
- Fix the bug that the badge will pop up when hovering in the sidebar
|
||||
- Fix the bug that local messages can be manipulated when sending messages
|
||||
42
website/blog/2023-08-13-v1.8.9.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Release Note v1.8.9
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.9
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature update
|
||||
|
||||
#### Add group drag sorting
|
||||
|
||||
[#120](https://github.com/msgbyte/tailchat/issues/120) Users will be able to flexibly organize the order of groups according to their preferences and priorities, optimizing the actual use experience
|
||||
|
||||

|
||||
|
||||
#### Add the operation of directly creating a multi-person session in the sidebar
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Other Updates
|
||||
|
||||
- Add iam proxy support for github
|
||||
- Now you can modify the remote request address through environment variables `IAM_GITHUB_URI_AUTHORIZE` `IAM_GITHUB_URI_ACCESS_TOKEN` `IAM_GITHUB_URI_USERINFO`
|
||||
- Adjust the multiplayer session strategy, the two-player session will reuse the previous logic, and the multiplayer session will be created repeatedly instead of reusing the previous session
|
||||
- This is prepared to adapt to the discussion of different topics that may appear in the same group of people
|
||||
- Fix the bug that an error will occur when adding multiple users to a group role
|
||||
- Fix the bug that errors may occur when rendering a two-player session
|
||||
- Fixed the problem that dragging the user's avatar in the chat list would cause abnormal interaction [#135](https://github.com/msgbyte/tailchat/issues/135)
|
||||
- Fix the problem that the operation is repeatedly pushed and the duplicate user will be displayed
|
||||
- Fix the bug that the badge component will change the height of the container
|
||||
- Fix message confirmation does not trigger update issue
|
||||
- Fixed the problem that the plug-in root routing path was incorrect
|
||||
- Fix the bug that the boot code will break when the environment variable DISABLE_CREATE_GROUP is turned on
|
||||
- Fixed the bug of abnormal size when multiple avatars were rendered at the same time
|
||||
- Increase the optimization of offline icon sorting to reduce meaningless updates
|
||||
- Optimize the experience of sending messages under low-speed network
|
||||
- Optimize DM message support sorting by recent message
|
||||
38
website/blog/2023-08-21-v1.8.10.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: Release Note v1.8.10
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.10
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature update
|
||||
|
||||
#### Added the ability to create converse from groups
|
||||
|
||||

|
||||
|
||||
In the user avatar pop-up layer in the group conversation, a button to quickly start the conversation is added, which can conveniently send private messages to the users in the group.
|
||||
|
||||
If the group manager does not want group members to initiate private messages, they can actively close it in the group settings.
|
||||
|
||||

|
||||
|
||||
### Other Updates
|
||||
|
||||
- Add refresh operation to admin message list
|
||||
- Fix the risk of unauthorized message sending [#143](https://github.com/msgbyte/tailchat/issues/143)
|
||||
- Added all session permissions for plugin bots (not open platform bots)
|
||||
- Fixed the problem that the receiving message taskbar could not flash on the desktop
|
||||
- Fixed an issue where the logo flickered when hovering over the group list with a scroll bar
|
||||
- Fix the problem that the danger button color is wrong in light mode
|
||||
- Fix the problem that the cache key of userSetting is incorrect
|
||||
- Fixed the problem that you can still use the input box on the right in the chat box after being banned
|
||||
- For some high-frequency requests (parts with front-end cache before), a persistent cache is added to reduce the impact of front-end cache invalidation caused by frequent page refreshes on back-end services
|
||||
- Optimize the display strategy of user avatars in the admin background, and remove problems caused by null/undefined
|
||||
- Optimize the size of the feature bar icon on the homepage of the official website, the current volume is about 1/3 of the original
|
||||
- Increase the database index and optimize the request time consumption of the `fetchConverseMessage` operation in the case of a large amount of data
|
||||
- Optimize the update group configuration interaction under low-speed network
|
||||
- Optimize the entry file size of the `sentry` plugin to reduce the time spent on first loading
|
||||
31
website/blog/2023-08-28-v1.8.11.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: Release Note v1.8.11
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.11
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature update
|
||||
|
||||
#### Open platform application management enhancement
|
||||
|
||||
- Added the viewing and modification of application name, description and avatar
|
||||
- Added the feature of returning to the application list
|
||||
- Added delete app feature
|
||||
|
||||

|
||||
|
||||
### Other Updates
|
||||
|
||||
- `admin` add file delete action, also delete `minio` files and allow fuzzy matching by `objectName`
|
||||
- `OAuth` adds display support for custom open platform avatars
|
||||
- The optimization algorithm complements the missing offline icons in the static analysis
|
||||
- Fixed the bug that the add friend button was still displayed when the `DISABLE_ADD_FRIEND` function was turned on
|
||||
- Fixed the problem that the button to jump to the tab without adding friends is incorrect
|
||||
- Fixed the problem that the icon flickered after modifying the user settings
|
||||
- Fix the bug that in some cases the user settings cache is lost, resulting in the loss of the past configuration of the user's modified data
|
||||
- The open platform fixes the error caused by the avatar parsing problem
|
||||
- Optimized group drag and drop sorting logic, added Y-axis lock
|
||||
33
website/blog/2023-09-04-v1.8.12.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: Release Note v1.8.12
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.8.12
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature update
|
||||
|
||||
#### Markdown editor adds the function of uploading images
|
||||
|
||||

|
||||
|
||||
You can now paste images via the clipboard or upload image files by clicking the image icon on the toolbar.
|
||||
|
||||
#### Add online status in user popup window
|
||||
|
||||

|
||||
|
||||
Now, you can check the user's online status in the pop-up box
|
||||
|
||||
### Other updates
|
||||
|
||||
- MarkdownRender supports native html syntax
|
||||
- admin: user search supports nickname fuzzy search
|
||||
- Add private message list to allow deletion of conversations
|
||||
- Fixed the issue where uploaded svg cannot be rendered directly in preview due to lack of type header
|
||||
- Fixed the issue of losing extension after compressing images
|
||||
- Optimize small size image display
|
||||
- Markdown editor adds dark mode adaptation
|
||||
39
website/blog/2023-09-15-v1.9.0.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Release Note v1.9.0
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.9.0
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature updates
|
||||
|
||||
#### Add panel-level permission control management
|
||||
|
||||

|
||||
|
||||
A panel field has been added to the permission registration. When this field is set and matched to a certain panel type, the permission will be displayed in the advanced permission control.
|
||||
|
||||
Permission design is based on whitelist form. This means that he will inherit the group's permissions.
|
||||
|
||||
Example one:
|
||||
- This role in the group **has** the [Send Message] permission
|
||||
- This role **does not** have the [Send Message] permission in the panel
|
||||
- Finally, this character has the [Send Message] permission in all text panels
|
||||
|
||||
Example two:
|
||||
- This role in the group **does not** have the [Send Message] permission
|
||||
- This role **has** the [Send Message] permission in the panel
|
||||
- In the end, this role only has the [Send Message] permission in the panels with permissions set above, and does not have the permission to send messages in other panels.
|
||||
|
||||
> Q: Why does tailchat use the union of panel permissions and group permissions instead of permission override?
|
||||
>
|
||||
> A: Because compared to many fixed-design applications, Tailchat needs to consider the design of the plug-in. The plug-in can register customized permissions, and these permissions are uncontrolled. Only by allowing users to develop the habit of whitelisting permission management during their operations and actual use will the permissions not be out of control when new plug-ins are added. In addition, the behavior of overwriting is more unpredictable because it will overwrite each other.
|
||||
>
|
||||
> An example is, if we want users to have no permissions in a certain panel, but have permissions in other panels, then the most convenient way is to set the group scope to have permissions, but the panels have no permissions. The lack of permissions on the panel will override the permission design of the group. But there is a difference here. We don’t know whether the user expects to have permissions by default or not by default. But currently he has permissions except for a certain panel. The difference between the two is that when a new panel is added, whether he expects to have permissions or not. permission denied. Tailchat wants to eliminate the mental coverage and understanding costs that the difference between the two situations brings to users, so it chose the most conservative way to design the permission system.
|
||||
|
||||
### Other updates
|
||||
|
||||
- Fixed a possible xss attack because we allowed iframes to pass in srcdom, which could inject inline style code.
|
||||
29
website/blog/2023-09-19-view-panel-permission.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
title: Group view panel permission problem
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: view-panel-permission
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: []
|
||||
---
|
||||
|
||||
Because of new version of group permission, all group user which create group before cannot view panel because of lost view panel permission.
|
||||
|
||||
To batch update all group permission, you may need this script below.
|
||||
|
||||
Go into mongodb bash, you can use script in bash like its operation: `docker exec -it <your-mongodb-container-name> mongo`
|
||||
|
||||
|
||||
|
||||
### switch to tailchat db
|
||||
|
||||
```
|
||||
use tailchat
|
||||
```
|
||||
|
||||
### update all group and append `core.viewPanel` permission to all group
|
||||
|
||||
```
|
||||
db.groups.updateMany({}, { $addToSet: { fallbackPermissions: "core.viewPanel" } })
|
||||
```
|
||||
34
website/blog/2023-09-25-v1.9.1.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: Release Note v1.9.1
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.9.1
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature updates
|
||||
|
||||
#### Add panel view permissions
|
||||
|
||||
In order to better control the poanel display, panel view permissions have been added in this update. You can control the user display method in the group level or panel level permission control.
|
||||
|
||||

|
||||
|
||||
You can control the display and hiding properties of the panel through a combination of permissions.
|
||||
|
||||
It should be noted that the group-level permissions and panel-level permissions are merged rather than overwritten. This means that if the group permissions are turned on, the user will have relevant permissions regardless of whether the panel permissions are turned on or not.
|
||||
|
||||
|
||||
:::info
|
||||
After this update, the default group permissions will be lost. This is because new permissions have been added and the previous groups were not granted this permission. For specific repair methods, you can read this blog to learn more: [Group view panel permission problem](/blog/view-panel-permission)
|
||||
:::
|
||||
|
||||
### Other updates
|
||||
|
||||
- Added clipboard processing tools
|
||||
- Added url processing tool by default
|
||||
- admin: Added all file size statistics
|
||||
- Fixed linkmeta plugin support for bilibili video links
|
||||
- Fixed the problem that the linkmeta plugin does not match the bbcode address
|
||||
45
website/blog/2023-10-16-v1.9.2.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Release Note v1.9.2
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.9.2
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature updates
|
||||
|
||||
#### Added support for sharing screen on desktop version
|
||||
|
||||

|
||||
|
||||
Now, you can click on screen sharing on the electron and select the window you want to share.
|
||||
|
||||
#### Add desktop version and native browser rendering
|
||||
|
||||
Supports opening web pages that cannot be opened due to restrictions in the web version
|
||||
|
||||
|
||||
For example, the following is a web page that cannot be nested due to website policies and will not be embedded due to web security restrictions.
|
||||
|
||||

|
||||
|
||||
But you can turn on native rendering of web pages and use built-in native browser rendering instead of embedding web pages.
|
||||
|
||||

|
||||
|
||||
In this way, you can break through the security restrictions of the other party's website and embed it into any page freely, just like using a browser
|
||||
|
||||

|
||||
|
||||
> If the switch does not take effect immediately, you can press the shortcut key `cmd + r` to reload `tailchat`
|
||||
|
||||
### Other updates
|
||||
|
||||
- Increase file access count record
|
||||
- Add message search interface
|
||||
- **admin**: Support deleting private messages
|
||||
- fix problem which ai assistant will be transparent in popover in light mode
|
||||
- fixed the bug where # would appear when typing without rich text plugin being loaded
|
||||
- Fixed a bug that would cause the database to record files repeatedly when uploading the same file
|
||||
28
website/blog/2023-11-06-v1.9.4.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: Release Note v1.9.4
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.9.4
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature updates
|
||||
|
||||
#### Add message search function
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Searching for chat information in a session is now supported. Because of the search is directly request to database, there will be a timeout for performance reasons. That is, if the database does not return search results within 5 seconds, it will be considered a timeout.
|
||||
|
||||
### Other updates
|
||||
|
||||
- HTTP requests add static caching to object storage and public files
|
||||
- Add the environment variable `REQUEST_TIMEOUT` to customize the rpc request timeout, the default is **10 * 1000**, in milliseconds
|
||||
- AI assistant adds more tips
|
||||
- Add telemetry information collection (can be turned off through environment variables)
|
||||
- Fix issue with iam plugin not fitting light theme in login view
|
||||
- Add defer tag to tianji script
|
||||
52
website/blog/2023-11-21-v1.9.5.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Release Note v1.9.5
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.9.5
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature updates
|
||||
|
||||
#### livekit plugin adds member panel
|
||||
|
||||

|
||||
|
||||
You can view the list of all participants and microphone status in the member panel
|
||||
|
||||
#### The livekit plugin adds the function of initiating audio and video sessions in multi-person sessions.
|
||||
|
||||

|
||||
|
||||
Now you can make audio and video calls directly from a private message conversation
|
||||
|
||||
#### The livekit plugin adds automatic invitation function for multi-person sessions
|
||||
|
||||
When the other party sends a message from the private message session, the invitation function will be automatically initiated. If the recipient is online, a prompt pop-up window and ring tone will pop up to invite the user to join the conversation (provided that the recipient has installed the livekit plugin)
|
||||
|
||||

|
||||
|
||||
#### The group member list allows right-click to quickly modify the identity group
|
||||
|
||||

|
||||
|
||||
Now allows quick assignment of membership groups through the right-click menu in the group member list, which is very useful for scenarios that require frequent assignment of identities.
|
||||
|
||||
#### Add friend list search function
|
||||
|
||||

|
||||
|
||||
In order to further optimize the management of multiple friends, a friend list search box has been added to quickly filter friends based on their nicknames and help users find friends.
|
||||
|
||||
### Other updates
|
||||
|
||||
- Add notification pop-up window night mode support
|
||||
- Add environment variable MINIO_SSL for manual control of minio ssl, suitable for using external s3 storage
|
||||
- Added a reload button to the settings page to facilitate reloading tailchat in non-webpage mode
|
||||
- Added a background color option to the web page panel to deal with style issues caused by transparent backgrounds on some web pages
|
||||
- Fixed the bug of transparent background color of message input box
|
||||
- Fixed the issue of token expiration not taking effect due to the timing issue of clearing cache when banning a user.
|
||||
- Fixed issue with incorrect inbox groupId when replying in a private conversation
|
||||
- (desktop): v0.1.0 improves server list management
|
||||
27
website/blog/2023-12-11-v1.10.0.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Release Note v1.10.0
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.10.0
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
### Feature updates
|
||||
|
||||
#### webrtc meeting optimization
|
||||
|
||||
- Added access to app camera and microphone permissions, now the mobile can use audio and video services normally
|
||||
- Added builtin conversation view to optimize the experience of making calls on mobile phones
|
||||
|
||||
### Other updates
|
||||
|
||||
- Added basic information editing permissions and fix the bug of incorrect group field display
|
||||
- Added secondary confirm for topic deletion operation
|
||||
- Fixed a bug where the topic read may not work properly
|
||||
- Fixed a bug where the group drop-down menu may expand upwards
|
||||
- Fixed a bug where disabling plugins would not disable routing
|
||||
- cli smtp test command adds shutdown logic and adds time in test email
|
||||
- Hide member list function in livekit plugin
|
||||
- Add virtual users to avoid unused user information requests
|
||||
17
website/blog/2024-03-17-v1.10.1.md
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: Release Note v1.10.1
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.10.1
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- add bot tag in group/dm user popover
|
||||
- add robot rule to disable invite page fetch by search engine
|
||||
- allow @ mention in DM conversation
|
||||
- fix mention list will not hide member discriminator problem
|
||||
- fix bbcode auto transform logic
|
||||
- fix drag drop feature display area
|
||||
- add friendly tip for add non-message feature bot
|
||||
15
website/blog/2024-04-07-v1.11.0.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Release Note v1.11.0
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.11.0
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Added a quick jump command panel that can be opened anywhere with `ctrl+k`
|
||||
- Or opened via the search button in the navigation bar
|
||||
- Fixed an issue where sending an invalid userId in certain cases would cause the entire user information query request to fail
|
||||
- Fixed inappropriate error messages when adding oneself as a friend
|
||||
- Optimized mention functionality to address performance issues caused by excessively long lists in groups with a large number of members
|
||||
14
website/blog/2024-04-15-v1.11.1.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Release Note v1.11.1
|
||||
authors: moonrailgun
|
||||
image: /img/logo.svg
|
||||
slug: release-1.11.1
|
||||
keywords:
|
||||
- tailchat
|
||||
tags: [Release Note]
|
||||
---
|
||||
|
||||
- Add right-click menu to messages item.
|
||||
- Add a setting to disable the right-click menu.
|
||||
- Optimized the logic for copying selected text from the right-click menu on messages item.
|
||||
- Fixed the issue where the command panel items could not be clicked with the mouse.
|
||||
11
website/blog/authors.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
moonrailgun:
|
||||
name: moonrailgun
|
||||
title: Founder of Tailchat
|
||||
url: https://github.com/moonrailgun
|
||||
image_url: https://avatars.githubusercontent.com/u/6964737?v=4
|
||||
email: moonrailgun@gmail.com
|
||||
|
||||
reacher:
|
||||
name: Reacher
|
||||
title: Tailchat Normal User
|
||||
image_url: /img/avatar/reacher.png
|
||||
4
website/docs/advanced-usage/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Advanced Usage",
|
||||
"position": 30
|
||||
}
|
||||
45
website/docs/advanced-usage/custom-builtin-plugin.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
title: Custom Builtin Plugin
|
||||
---
|
||||
|
||||
In Tailchat's plugin center, you can see that the system has builtin some plugins for users to install by default, and these plugins cannot be uninstalled. For self-deployed enterprise users, it is particularly important to have all members install the enterprise or other preset plugins by default.
|
||||
|
||||
Next we will learn how to customize the builtin plugin list
|
||||
|
||||
*Because plugins are loaded very early, Tailchat is designed to compile the list of builtin plugins into the source code to ensure that the page loads as quickly as possible. Therefore you need to compile the image manually*
|
||||
|
||||
First you need to clone the source code:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/msgbyte/tailchat.git
|
||||
```
|
||||
|
||||
Modify the builtin plugin list:
|
||||
|
||||
```bash
|
||||
cd tailchat
|
||||
vim client/web/src/plugin/builtin.ts
|
||||
```
|
||||
|
||||
Add your configuration file (generally found in the `manifest.json` file in the plugin directory) to the exported variable `builtinPlugins` array according to the existing plugin list format.
|
||||
|
||||
:::info
|
||||
The list of existing plugins can be seen here [Plugin List](/docs/plugin-list/fe)
|
||||
:::
|
||||
|
||||
When the editing is completed, save it and make sure the current directory is in the root directory of tailchat. At this point you should be able to see the `Dockerfile` file directly in your directory.
|
||||
|
||||
Execute the command to compile your own image
|
||||
|
||||
```bash
|
||||
docker build -t tailchat .
|
||||
```
|
||||
|
||||
Where `.` represents the current directory, `-t tailchat` represents the compiled tag is `tailchat`, which can be read directly by the `docker-compose.yml` file
|
||||
|
||||
After the compilation is completed, just start it according to the normal operation: `docker compose up -d`
|
||||
|
||||
:::info
|
||||
If you compile the image yourself, it is recommended to configure it above **2C4G**
|
||||
:::
|
||||
49
website/docs/advanced-usage/external-storage.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: External Storage
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
As the usage scale progresses, the user's storage cost for the Tailchat file system will gradually increase, so the privatized deployment of the object storage service `minio` may have high disk storage costs. In order to reduce costs Tailchat provides a solution to use external third-party object storage services
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- The external storage service needs to support `aws s3` storage protocol
|
||||
- `Tailchat` version in `1.8.7+`
|
||||
|
||||
## Config
|
||||
|
||||
You need to configure the environment variables as follows:
|
||||
- `MINIO_URL`: s3 service address, `<hostname>:<port>`, for example: `example.com:443`, not need protocol part like `https://`
|
||||
- `MINIO_SSL`: Whether the s3 service enables SSL verification is required for some providers. Default is `false`
|
||||
- `MINIO_USER`: s3 service username
|
||||
- `MINIO_PASS`: s3 service password
|
||||
- `MINIO_BUCKET_NAME`: s3 service bucket name
|
||||
- `MINIO_PATH_STYLE`: path mode, optional values: `VirtualHosted` or `Path`
|
||||
- S3 protocol has two style, `VirtualHosted` use in `<bucketname>.example.com`, and `Path` use in `example.com/<bucketname>`
|
||||
- `STATIC_URL`: The uploaded static path address, which is transferred by the server by default. If you want to directly connect to external storage, you need to change it to an externally accessible address
|
||||
|
||||
> For `aliyunoss`, we can refer to this document for content-related help: https://www.alibabacloud.com/help/en/oss/developer-reference/use-amazon-s3-sdks-to-access-oss
|
||||
|
||||
### Example
|
||||
|
||||
**R2**:
|
||||
```bash
|
||||
MINIO_URL=<account-id>.r2.cloudflarestorage.com:443
|
||||
MINIO_PATH_STYLE=Path
|
||||
```
|
||||
|
||||
## Data migration
|
||||
|
||||
If you are migrating from a privately deployed `minio` service to a public cloud, then you need to migrate the old data.
|
||||
|
||||
Migration files: `files/**`
|
||||
|
||||
You can get the trusted content of the storage volume through `docker volume inspect tailchat_storage`, where `Mountpoint` represents the path, package and upload the `<Mountpoint>/tailchat/files` directory to the corresponding
|
||||
|
||||
### Database migration script (optional)
|
||||
|
||||
> This is not a necessary operation, because even if you do not migrate, you will follow the original path to transfer to the server
|
||||
|
||||
TODO: Welcome to co-construction
|
||||
55
website/docs/advanced-usage/github-integration.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
title: Github integration
|
||||
---
|
||||
|
||||
:::caution
|
||||
This section is still WIP
|
||||
:::
|
||||
|
||||

|
||||
|
||||
## Common user use
|
||||
|
||||
### Install the application in the project
|
||||
|
||||
Link: https://github.com/apps/tailchat
|
||||
|
||||
Install into the project repository.
|
||||
|
||||
### Configure in the project
|
||||
|
||||
Create `.tailchat/topic.json` file in the root directory:
|
||||
```json
|
||||
{
|
||||
"groupId": "<your-notify-group-id>",
|
||||
"panelId": "<your-topic-panel-id>"
|
||||
}
|
||||
```
|
||||
|
||||
## Self-host configuration
|
||||
|
||||
An application needs to be registered in github before the application starts:
|
||||
|
||||

|
||||
|
||||
The following environment variables need to be configured during deployment:
|
||||
- `APP_ID`: from the github app settings
|
||||
- `WEBHOOK_SECRET`: from the github app settings
|
||||
- `PRIVATE_KEY`: from the github application settings
|
||||
- `TAILCHAT_APP_ID`: the id of the Tailchat open platform
|
||||
- `TAILCHAT_APP_SECRET`: The secret key of Tailchat open platform
|
||||
- `TAILCHAT_API_URL`: Tailchat backend address
|
||||
|
||||
In order to obtain `TAILCHAT_APP_ID` and `TAILCHAT_APP_SECRET`, you need to create an open platform application in the Tailchat open platform
|
||||
|
||||
At the same time, enable the robot permission and set the message callback link: `https://<your_app_url>/message/webhook`
|
||||
|
||||
### Deploy open platform applications
|
||||
|
||||
> Source code: [https://github.com/msgbyte/tailchat/tree/master/apps/github-app](https://github.com/msgbyte/tailchat/tree/master/apps/github-app)
|
||||
|
||||
After pulling the source code and deploying it to an accessible online, there are two ways:
|
||||
|
||||
- Standalone application: execute `node lib/index.js` after `npm run build` to run the application
|
||||
- Vercel: just push to Vercel directly
|
||||
4
website/docs/advanced-usage/openapp/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Open App",
|
||||
"position": 20
|
||||
}
|
||||
34
website/docs/advanced-usage/openapp/about.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: About Open App
|
||||
---
|
||||
|
||||
Open platform is a common and traditional way of interacting between applications. For some simple requirements, we can implement data transfer between applications through an open platform.
|
||||
|
||||
In Tailchat. At present, it mainly provides two forms of open platform application capabilities: `OAuth` and `Bot`
|
||||
|
||||
## Features
|
||||
|
||||
### OAuth
|
||||
|
||||
`OAuth` enables external applications to log in through `Tailchat` accounts, just like `Google`, `Github` login methods, which can facilitate users to create a unified user platform based on `Tailchat`
|
||||
|
||||
:::info
|
||||
The difference from the `com.msgbyte.iam` plugin: `iam` plugin provides a way to log in to `Tailchat` with an external account, such as using a `Github` account to log in to `Tailchat`, while the OAuth capability of the open platform is based on `Tailchat` account to log in to other platforms.
|
||||
:::
|
||||
|
||||
[Learn more](./oauth)
|
||||
|
||||
### Bot
|
||||
|
||||
`Bot` endows chatbots with interactive application capabilities, which means that Tailchat can not only passively receive external messages, but also actively forward internal chat requests to external applications for processing.
|
||||
|
||||
[Learn more](./bot)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before using the relevant capabilities of the open platform, please ensure that the corresponding plug-in is installed, and ensure that the administrator has deployed the relevant capabilities of the open platform.
|
||||
|
||||
As a user, you need to install the `com.msgbyte.integration` plugin to add the application to your group
|
||||
|
||||
As a developer of open platform applications, you need to additionally install `com.msgbyte.openapi` to display the interfaces required by open platform applications
|
||||
230
website/docs/advanced-usage/openapp/bot.md
Normal file
@@ -0,0 +1,230 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: Bot
|
||||
---
|
||||
|
||||
Open platform bot are interactive robot solutions
|
||||
|
||||
Main process below:
|
||||
|
||||
- Create openapp
|
||||
- Get appid and appsecret
|
||||
- Enter the bot page and enable the bot ability
|
||||
- Fill in the callback address with the public http service address that can be accessed
|
||||
- Go back to the group page, enter the appid in the group details integration function, find the app you just created, and add it to the group
|
||||
- In the group @bot and enter text, tailchat will send an http request with message content to the address shown in the callback address
|
||||
- Receive the request sent by tailchat in the bot service, and send a response to the corresponding panel of the corresponding group through the bot
|
||||
|
||||
Of course, [create in Tailchat before you start anything](./create)
|
||||
|
||||
Let's take a look at the actual development process of the bot:
|
||||
|
||||
## Development with SDK (Node.js)
|
||||
|
||||
Tailchat provides sdk as a rapid development tool, `tailchat-client-sdk`, you can install it with the following command
|
||||
|
||||
```bash
|
||||
npm install tailchat-client-sdk
|
||||
```
|
||||
|
||||
Taking `koa` as an example, we first create a simple `koa` service as follows:
|
||||
|
||||
Create a node project:
|
||||
|
||||
```bash
|
||||
mkdir tailchat-bot && cd tailchat-bot
|
||||
npm init -y
|
||||
npm install koa koa-router tailchat-client-sdk
|
||||
```
|
||||
|
||||
Create `server.js` file:
|
||||
|
||||
```js
|
||||
const Koa = require('koa');
|
||||
const Router = require('koa-router');
|
||||
const app = new Koa();
|
||||
const router = new Router();
|
||||
|
||||
// Define route
|
||||
router.get('/', async (ctx) => {
|
||||
ctx.body = 'Hello, World!';
|
||||
});
|
||||
|
||||
router.post('/bot/callback', async (ctx) => {
|
||||
ctx.body = 'Bot Callback Page';
|
||||
});
|
||||
|
||||
// Register middleware
|
||||
app.use(router.routes());
|
||||
app.use(router.allowedMethods());
|
||||
|
||||
// Start server
|
||||
app.listen(3000, () => {
|
||||
console.log('Server is running on http://localhost:3000');
|
||||
});
|
||||
```
|
||||
|
||||
At this point we have established two basic routes, `/` and `/bot/callback`, and listened to `3000` port, note that `/bot/callback` listens to **POST** requests
|
||||
|
||||
At this point we execute `node server.js` to see that our application will be started.
|
||||
|
||||
Now we need to add some logic, for example, if we want to implement a repeating bot, then modify the implementation of `/bot/callback` route as follows:
|
||||
|
||||
```js
|
||||
import { TailchatHTTPClient, stripMentionTag } from 'tailchat-client-sdk';
|
||||
|
||||
const host = '<your tailchat instance backend host>';
|
||||
const appId = '<appId>';
|
||||
const appSecret = '<appSecret>';
|
||||
|
||||
const client = new TailchatHTTPClient(host, appId, appSecret)
|
||||
|
||||
// ...
|
||||
|
||||
router.post('/bot/callback', async (ctx) => {
|
||||
const type = ctx.body.type;
|
||||
|
||||
if (type === 'message') {
|
||||
const payload = ctx.body.payload;
|
||||
try {
|
||||
const message = await client.replyMessage({
|
||||
messageId: payload.messageId,
|
||||
author: payload.messageAuthor,
|
||||
content: payload.messageSnippet
|
||||
}, {
|
||||
groupId: payload.groupId,
|
||||
converseId: payload.converseId,
|
||||
content: `Your message: ${stripMentionTag(payload.messageSnippet)}`,
|
||||
})
|
||||
|
||||
console.log('send message success:', message)
|
||||
} catch (err) {
|
||||
console.log('send message failed:', err)
|
||||
}
|
||||
}
|
||||
|
||||
ctx.body = 'Bot Callback Page';
|
||||
});
|
||||
```
|
||||
|
||||
Please fill in `host`, `appId` and `appSecret` into the `appId` and `appSecret` obtained during creation, and `host` into the address of the `Tailchat` server, the official address of `nightly` is `https //tailchat-nightly.moonrailgun.com`
|
||||
|
||||
The content of the reply is not important, just make sure not to actively return an error message, Tailchat does not care about the returned content
|
||||
|
||||
**Please note that if you want to share your code, please keep your `appSecret`, which is equivalent to your account password**
|
||||
|
||||
The logic is very simple. Get the message content, author, id, group id, and converse id from the request. Send content as a reply
|
||||
|
||||
Deploy the application online to see the effect.
|
||||
|
||||
:::info
|
||||
Before testing, please make sure you have enabled the bot ability and filled in the correct callback address
|
||||
:::
|
||||
|
||||
## Develop in other languages
|
||||
|
||||
Since it is a network application, it is of course not limited to `nodejs`. The following are the formats of some network requests that need to be used, mainly sending requests to the Tailchat server as an open platform bot.
|
||||
|
||||
The official `nightly` api address is `https://tailchat-nightly.moonrailgun.com`, please replace it with your own backend address for self-deployment
|
||||
|
||||
### Login
|
||||
|
||||
Before all requests, you need to log in to obtain the jwt token to indicate your identity, and you need to send the following content:
|
||||
|
||||
```
|
||||
POST /api/openapi/bot/login
|
||||
|
||||
Header
|
||||
Content-Type: application/json
|
||||
|
||||
Body
|
||||
{
|
||||
appId: <your app id>,
|
||||
token: <md5(appId+appSecret)>,
|
||||
}
|
||||
|
||||
Response
|
||||
{
|
||||
data: {
|
||||
jwt: "..........",
|
||||
userId: ".........."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The `token` of the request body is a fixed value, which needs to be encrypted with the `md5` algorithm after splicing `appId` and `appSecret`. Finally get `jwt`, `jwt` must be on the request header in all subsequent requests
|
||||
|
||||
```
|
||||
Header
|
||||
X-Token: <your-jwt>
|
||||
```
|
||||
|
||||
### Call
|
||||
|
||||
Robots can call the interface like ordinary users, such as:
|
||||
|
||||
```
|
||||
POST /api/xxx
|
||||
|
||||
Header
|
||||
Content-Type: application/json
|
||||
X-Token: <your-jwt>
|
||||
|
||||
Body
|
||||
{
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
You can treat the bot as an ordinary user. The bot can do everything that ordinary users can do, and the bot will also be subject to the permission restrictions that ordinary users need to be subject to.
|
||||
|
||||
The difference is that regular users interact with visualizations, while bots interact with APIs.
|
||||
|
||||
#### Send Message
|
||||
|
||||
```
|
||||
POST /api/chat/message/sendMessage
|
||||
|
||||
Header
|
||||
Content-Type: application/json
|
||||
X-Token: <your-jwt>
|
||||
|
||||
Body
|
||||
{
|
||||
"converseId": "",
|
||||
"groupId": "",
|
||||
"content": "",
|
||||
"plain": "",
|
||||
"meta": {},
|
||||
}
|
||||
```
|
||||
|
||||
#### Reply message
|
||||
|
||||
```
|
||||
POST /api/chat/message/sendMessage
|
||||
|
||||
Header
|
||||
Content-Type: application/json
|
||||
X-Token: <your-jwt>
|
||||
|
||||
Body
|
||||
{
|
||||
"converseId": "<converId/panelId>",
|
||||
"groupId": "<groupId, optional in DM>",
|
||||
"content": "<your message content>",
|
||||
"plain": "<your plained message, optional>",
|
||||
"meta": {
|
||||
mentions: ["<replyMessageAuthorId>"],
|
||||
reply: {
|
||||
_id: "<replyMessageId>",
|
||||
author: "<replyMessageAuthor>",
|
||||
content: "<replyMessageContent>",
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
## Additional Documentation
|
||||
|
||||
- [Tailchat x Laf: Develop a chatbot in 10 minutes](/blog/tailchat-laf-robot)
|
||||
14
website/docs/advanced-usage/openapp/create.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
title: Create Open Application
|
||||
---
|
||||
|
||||
After installing the `com.msgbyte.openapi` plug-in, you can see an additional open API function on the settings page in the lower left corner
|
||||
|
||||

|
||||
|
||||
Now, fill in the application name and application description
|
||||
|
||||

|
||||
|
||||
After success, you can see your open platform application in your application list
|
||||
94
website/docs/advanced-usage/openapp/oauth.md
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
title: OAuth
|
||||
---
|
||||
|
||||
The `Tailchat` open platform supports the `OAuth` login protocol, and you can easily integrate the `Tailchat` account system into your system. Just like our common `Github Login`, `Google Login`, `Apple Login`
|
||||
|
||||
Now, you can use `Tailchat` to implement a unified account management system for your multiple platforms.
|
||||
|
||||
## Create a new open platform application in Tailchat
|
||||
|
||||
You need to create an open platform application and enable **OAuth** service.
|
||||
|
||||
Fill in the address that is allowed to be redirected in **callback address**.
|
||||
|
||||

|
||||
|
||||
## Create a stand-alone application that initiates and accepts callbacks
|
||||
|
||||
First of all, we need to have a general understanding of the basic process of **OAuth** before we officially start
|
||||
|
||||

|
||||
|
||||
Simply put, it is divided into three steps:
|
||||
|
||||
- The first step: access authorization, you need to pass client_id: client id, redirect_uri: redirect uri, response_type is code, scope is the scope of authorization, fill in `openid profile` by default, and state is other custom parameters
|
||||
- Step 2: After the authorization is passed, it will be redirected to redirect_uri, and the code will be used as its parameter
|
||||
- Step 3: After getting the code, you can exchange it for an access token, and then you can directly access resources through the token
|
||||
|
||||
You can refer to [https://github.com/msgbyte/tailchat/blob/master/server/test/demo/openapi-client-simple/index.ts](https://github.com/msgbyte/tailchat/blob /master/server/test/demo/openapi-client-simple/index.ts) to implement your own OAuth application
|
||||
|
||||
### Main process
|
||||
|
||||
Here is a brief overview of the process:
|
||||
|
||||
First construct a request address, like:
|
||||
```
|
||||
<API>/open/auth?client_id=<clientId>&redirect_uri=<redirect_uri>&scope=openid profile&response_type=code&state=123456789
|
||||
```
|
||||
|
||||
in:
|
||||
- `API` is your tailchat backend address, if you use the default deployment scheme, it is your access address.
|
||||
- `clientId` is the address of the open platform you applied for in the first step.
|
||||
- `redirect_uri` is your callback address, you need to make sure it has been added to the whitelist of allowed callback addresses
|
||||
- `scope` is the scope of application authorization, currently fill in `openid profile` fixedly
|
||||
- `response_type` is the response type, just fill in `code`
|
||||
- `state` and other custom parameters will be called with redirection and `code` parameters.
|
||||
|
||||
After the user visits this address, it will jump to the Tailchat platform for login authorization. If the authorization is passed, it will be redirected to the address specified by `redirect_uri`. At this time, the receiving address can get `code` and `state` in the query string.
|
||||
|
||||
In the next step, we need to exchange `code` for `token` by sending a POST request. Next, we need to use `token` to obtain user information
|
||||
|
||||
```
|
||||
POST <API>/open/token
|
||||
{
|
||||
"client_id": clientId,
|
||||
"client_secret": clientSecret,
|
||||
"redirect_uri": redirect_uri,
|
||||
"code": code,
|
||||
"grant_type": 'authorization_code',
|
||||
}
|
||||
```
|
||||
|
||||
return value:
|
||||
```
|
||||
{
|
||||
access_token,
|
||||
expires_in,
|
||||
id_token,
|
||||
scope,
|
||||
token_type
|
||||
}
|
||||
```
|
||||
|
||||
At this point we got the `access_token`, which we can use to request user information:
|
||||
|
||||
```
|
||||
POST <API>/open/me
|
||||
{
|
||||
"access_token": access_token,
|
||||
}
|
||||
```
|
||||
|
||||
return value:
|
||||
```
|
||||
{
|
||||
sub,
|
||||
nickname,
|
||||
discriminator,
|
||||
avatar,
|
||||
}
|
||||
```
|
||||
|
||||
Among them, `sub` can be understood as the user's id, which is the unique identifier of the user
|
||||
49
website/docs/advanced-usage/openapp/ws.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
title: Websocket Bot
|
||||
---
|
||||
|
||||
In addition to traditional HTTP callback bots, we also support bots based on the websocket long connection protocol.
|
||||
|
||||
The long-connection robot can listen to all messages like a normal user, and does not need to be invoke by `@`.
|
||||
|
||||
Of course, the disadvantage is that it is not convenient for some platforms that only support http requests, such as `serverless` and other platforms that do not support `websocket`. And currently only the `nodejs` version is implemented.
|
||||
|
||||
Here is an example in here:
|
||||
|
||||
```ts
|
||||
import { TailchatWsClient } from 'tailchat-client-sdk';
|
||||
|
||||
const HOST = process.env.HOST;
|
||||
const APPID = process.env.APPID;
|
||||
const APPSECRET = process.env.APPSECRET;
|
||||
|
||||
if (!HOST || !APPID || !APPSECRET) {
|
||||
console.log('require env: HOST, APPID, APPSECRET');
|
||||
process. exit(1);
|
||||
}
|
||||
|
||||
const client = new TailchatWsClient(HOST, APPID, APPSECRET);
|
||||
|
||||
client.connect().then(async() => {
|
||||
console.log('Login Success!');
|
||||
|
||||
client.onMessage((message) => {
|
||||
console.log('Receive message', message);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
Among them, `HOST`, `APPID`, `APPSECRET` represent the server address, the id and secret key of the open platform respectively.
|
||||
|
||||
**Please do not upload your secret key on the public platform, the secret key is equivalent to the password**
|
||||
|
||||
This operation creates an event listener after connecting to the server, and when any message is received, the content of the message will be printed out.
|
||||
|
||||
Similarly, if we need to subscribe the update event of the message, we can use the subscribe message update operation
|
||||
|
||||
```ts
|
||||
client.onMessageUpdate((message) => {
|
||||
console.log('Receive message', message);
|
||||
});
|
||||
```
|
||||
4
website/docs/advanced-usage/plugins/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Plugin Document",
|
||||
"position": 10
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
title: auto join group
|
||||
---
|
||||
|
||||
`com.msgbyte.autojoinGroup`
|
||||
|
||||
Just need config environment: `AUTOJOIN_GROUP_ID=xxxxx` and restart server
|
||||
|
||||
You should create group from admin or web app manually. and then you can get a groupId.
|
||||
|
||||
In web app, you can get groupId from url, for example: `/main/group/<groupId>/<panelId>`
|
||||
|
||||
> If you wanna join more than one group after user register, you can split with `,`
|
||||
>
|
||||
> For example: AUTOJOIN_GROUP_ID=xxxxx,xxxx
|
||||
40
website/docs/advanced-usage/plugins/com.msgbyte.iam.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: iam - Third party login
|
||||
---
|
||||
|
||||
`com.msgbyte.iam`
|
||||
|
||||
The `IAM` plugin provides third-party login functionality
|
||||
|
||||
Currently supported:
|
||||
- github
|
||||
|
||||
## Configuration Method
|
||||
|
||||
### Github
|
||||
|
||||
Create an OAuth application in `Github`. Get `Client ID` and `Client secrets`
|
||||
|
||||
Configure the authorization callback address `Authorization callback URL` of the `Github` application to `{API_URL}/api/plugin:com.msgbyte.iam/github/redirect`. Note that `API_URL` is the value in the environment variable, and the two should be consistent.
|
||||
|
||||
Configure Tailchat environment variables:
|
||||
|
||||
- IAM_GITHUB_ID
|
||||
- IAM_GITHUB_SECRET
|
||||
|
||||
Respectively, `Client ID` and `Client secrets` obtained before
|
||||
|
||||
> You also can use env to overwrite uri, for example use proxy:
|
||||
>
|
||||
> - IAM_GITHUB_URI_AUTHORIZE=https://github.com/login/oauth/authorize
|
||||
> - IAM_GITHUB_URI_ACCESS_TOKEN=https://github.com/login/oauth/access_token
|
||||
> - IAM_GITHUB_URI_USERINFO=https://api.github.com/user
|
||||
|
||||
## Security Protection
|
||||
|
||||
In order to prevent tokens from being obtained by malicious applications, it is recommended to add front-end domain name verification.
|
||||
|
||||
Just configure `IAM_FE_URL` in the environment variable, and the value is the front-end domain name. Such as: `IAM_FE_URL=http://localhost:11011`
|
||||
|
||||
> for `window.opener.postMessage(<data>, "IAM_FE_URL")`
|
||||
35
website/docs/advanced-usage/plugins/com.msgbyte.livekit.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
title: livekit - Video Conference
|
||||
---
|
||||
|
||||
`com.msgbyte.livekit`
|
||||
|
||||
## User documentation
|
||||
|
||||
This plugin provides `Tailchat` video conferencing function, after installing the plugin you can create a voice channel.
|
||||
|
||||
After installation, you can see a new panel type named voice channel on the create panel modal
|
||||
|
||||

|
||||
|
||||
The voice channel entry is probably like this:
|
||||
|
||||

|
||||
|
||||
You can prepare multimedia options and switch media devices before joining.
|
||||
|
||||
Of course, you can switch devices at any time after joined. like below:
|
||||
|
||||

|
||||
|
||||
You can freely video call, share your screen, and chat with your friends.
|
||||
|
||||
|
||||
Finally, please switch pages freely, this will not let you exit the channel, you can click the icon in the lower left corner to quickly return to the active channel at any time.
|
||||
|
||||

|
||||
|
||||
## Deployment documentation
|
||||
|
||||
See tutorial [livekit](../../meeting/livekit.md)
|
||||
10
website/docs/advanced-usage/plugins/com.msgbyte.wxpusher.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
title: wxpusher
|
||||
---
|
||||
|
||||
`com.msgbyte.wxpusher`
|
||||
|
||||
:::caution
|
||||
This plugin just make for chinese mainland user which use wechat. please switch language to `zh-Hans` to continue.
|
||||
:::
|
||||
34
website/docs/advanced-usage/richtext.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Rich text syntax
|
||||
---
|
||||
|
||||
## For normal users
|
||||
|
||||
Tailchat has a built-in `com.msgbyte.bbcode` plugin for rich text message support (and it is installed by default).
|
||||
|
||||
The following is a list of syntaxes currently supported by the `bbcode` plugin:
|
||||
|
||||
| Keyword | Description | Usage Example | Preview |
|
||||
| ------ | ----- | ------ | ----- |
|
||||
| b | bold text | `[b]foo[/b]` | <b>foo</b> |
|
||||
| i | text italic | `[i]foo[/i]` | <i>foo</i> |
|
||||
| u | underline text | `[u]foo[/u]` | <ins>foo</ins> |
|
||||
| s | strikethrough text | `[s]foo[/s]` | <del>foo</del> |
|
||||
| url | hyperlink | <div style={{width: 400}}>`[url]https://tailchat.msgbyte.com[/url]` / `[url=https://tailchat.msgbyte.com ]Official website[/url]`</div> | <a>https://tailchat.msgbyte.com</a> / <a href="https://tailchat.msgbyte.com">official website</a> |
|
||||
| img | image | `[img]https://tailchat.msgbyte.com/img/logo.svg[/img]` | <div style={{width: 60}}><img src="https:/ /tailchat.msgbyte.com/img/logo.svg" /></div> |
|
||||
| at | mention user | `[at=<hereisuserid>]moonrailgun[/at]` | - |
|
||||
| emoji | expression | `[emoji]smile[/emoji]` | - |
|
||||
| markdown / md | markdown syntax support | `[markdown]## Heading[/markdown]` / `[md]## Heading[/md]` | - |
|
||||
|
||||
## For plugin developers
|
||||
|
||||
If your plugin needs to use unified rich text support, please implement this in your rendering function:
|
||||
|
||||
```jsx
|
||||
import { getMessageRender } from '@capital/common';
|
||||
|
||||
const Component = (text: string) => {
|
||||
return <div>{getMessageRender(text)}</div>
|
||||
}
|
||||
```
|
||||
12
website/docs/architecture.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: System Architecture
|
||||
---
|
||||
|
||||
## Backend Architecture
|
||||
|
||||

|
||||
|
||||
## Plugin mechanism architecture
|
||||
|
||||

|
||||
4
website/docs/benchmark/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Benchmark",
|
||||
"position": 50
|
||||
}
|
||||
112
website/docs/benchmark/cli.md
Normal file
@@ -0,0 +1,112 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Cli Test Method
|
||||
---
|
||||
|
||||
First of all, you need to make sure that `tailchat-cli` has been installed, and the version is above `1.5.8`. For the installation method, see: [tailchat-cli](../cli/tailchat-cli.md)
|
||||
|
||||
You can see the following commands supported by benchmark in the Help command of Tailchat:
|
||||
|
||||
```
|
||||
tailchat benchmark
|
||||
|
||||
Tailchat Benchmark Test
|
||||
|
||||
Commands:
|
||||
tailchat benchmark message Stress testing through Tailchat network
|
||||
requests (suitable for pure business
|
||||
testing)
|
||||
tailchat benchmark connections <url> Test Tailchat Connections
|
||||
tailchat benchmark register <url> Create Tailchat temporary account and
|
||||
output token
|
||||
|
||||
Options:
|
||||
--version Show version number [boolean]
|
||||
-h, --help Show help [boolean]
|
||||
```
|
||||
|
||||
Among them, we mainly use the `connections` command and the `register` command
|
||||
|
||||
## Register test users in batches
|
||||
|
||||
First of all, we need to register test users in batches, here we need to use the `register` command
|
||||
|
||||
```
|
||||
tailchat benchmark register <url>
|
||||
|
||||
Create Tailchat temporary account and output token
|
||||
|
||||
Options:
|
||||
--version Show version number [boolean]
|
||||
--file Account Token Path [string] [required] [default: "./accounts"]
|
||||
--count Register Count [number] [required] [default: 100]
|
||||
--invite Invite Code [string]
|
||||
-h, --help Show help [boolean]
|
||||
--url
|
||||
```
|
||||
|
||||
If we need to register accounts locally in batches
|
||||
|
||||
```bash
|
||||
tailchat benchmark register http://127.0.0.1:11000
|
||||
```
|
||||
|
||||
This command will register 100 temporary users under `http://127.0.0.1:11000` service. Note that the '/' is not required at the end.
|
||||
|
||||
After the command is executed, the token used for login will be saved to a local file, the default is `./accounts` file.
|
||||
|
||||
We can use `--count` to specify the number of registrations, and `--invite` to let it automatically join a test group after registration
|
||||
|
||||
like:
|
||||
```bash
|
||||
tailchat benchmark register http://127.0.0.1:11000 --count 10000 --invite <invite-code>
|
||||
```
|
||||
|
||||
> Note: In order to ensure the quality of service, the register operation is sent in a serial manner, that is, the subsequent register operation will start after the previous register operation is completed. Therefore, if the number of settings is too large, it may take a long time.
|
||||
|
||||
Among them, `<invite-code>` requires the user to create a group and create an invitation link. The format of an invite link is: `http://localhost:11011/invite/<invite-code>`
|
||||
|
||||
After completion, we can get the corresponding number of test users to join the group.
|
||||
|
||||
## User batch login
|
||||
|
||||
We want to test the performance of the server when multiple people are allowed online, we need to use the `connections` command to log in and establish a connection.
|
||||
|
||||
The `connections` command will automatically read the token file after batch registration in the previous operation as the user who needs to log in
|
||||
|
||||
```
|
||||
tailchat benchmark connections <url>
|
||||
|
||||
Test Tailchat Connections
|
||||
|
||||
Options:
|
||||
--version Show version number [boolean]
|
||||
--file Account Token Path
|
||||
[string] [required] [default: "./accounts"]
|
||||
--groupId Group Id which send Message [string]
|
||||
--converseId Converse Id which send Message [string]
|
||||
-h, --help Show help [boolean]
|
||||
--url [required]
|
||||
```
|
||||
|
||||
If we want to log in directly to the local service:
|
||||
|
||||
```bash
|
||||
tailchat benchmark connections http://127.0.0.1:11000
|
||||
```
|
||||
|
||||
At this point, we can use the resource detection tool on the server to check the memory usage and CPU usage of the server after all test users are online.
|
||||
|
||||
### Message push/receive time detection
|
||||
|
||||
In order to test the performance of the Tailchat chat server in an actual session, we can measure the time it takes for a message to be sent from the client to the server and for the server to broadcast the message to all users.
|
||||
|
||||
Here we need to specify the target to send the message, as follows:
|
||||
|
||||
```bash
|
||||
tailchat benchmark connections http://127.0.0.1:11000 --groupId <groupId> --converseId <converseId>
|
||||
```
|
||||
|
||||
The format of the address bar in a group session is: `http://localhost:11011/main/group/<groupId>/<converseId>`
|
||||
|
||||
When all sessions are accepted, the time spent during the period will be printed
|
||||
237
website/docs/benchmark/report.md
Normal file
@@ -0,0 +1,237 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
title: Benchmark Report
|
||||
---
|
||||
|
||||
## Cluster benchmark test
|
||||
|
||||
:::info
|
||||
|
||||
Test version: v1.7.6
|
||||
|
||||
Basic information of the test cluster:
|
||||
- mongo: **0.2**cpu **256**Mi memory single instance
|
||||
- redis: **0.1**cpu **64**Mi memory single instance
|
||||
- minio: **0.1**cpu **128**Mi memory single instance
|
||||
- tailchat: **0.2**cpu **512**Mi memory 3 instances
|
||||
|
||||
> The test service is a complete service, that means, a complete service loaded with services and plugins, without any directional optimization for data to look good (better performance can be obtained by controlling the services that reduce loading and turning off some unnecessary capabilities )
|
||||
>
|
||||
> Among them, the cpu model is: `Intel(R) Xeon(R) CPU @ 2.20GHz`
|
||||
>
|
||||
> The server network uses `Singapore Google Cloud`, and the test machine uses `Telecom Shanghai`. Actually, there is a certain network loss. The cluster service is provided by sealos for this pressure test.
|
||||
:::
|
||||
|
||||
### Test method
|
||||
|
||||
The test mode consists of an actual observer + several virtual users started by cli. See the test method: [cli](./cli.md)
|
||||
|
||||
The main commands are as follows:
|
||||
|
||||
```
|
||||
tailchat benchmark register https://<xxxxxx>.cloud.sealos.io --invite <inviteCode>
|
||||
tailchat benchmark connections https://<xxxxxx>.cloud.sealos.io
|
||||
tailchat benchmark connections https://<xxxxxx>.cloud.sealos.io --groupId <groupId> --converseId <converseId> --messageNum 5
|
||||
```
|
||||
|
||||
> The following descriptions about cpu/memory are the average value of multiple instances
|
||||
|
||||
### 100 user online test
|
||||
|
||||
#### Online Status
|
||||
|
||||
When only one actual user is logged in, the system occupancy is:
|
||||
- cpu: 0.90%
|
||||
- Memory: 176.3 Mi
|
||||
|
||||
After logging in 100 online users, the system occupancy is:
|
||||
- cpu: 14.80 % -> 8.89% -> 1.33% (because the actual observer gets all 100 user online information at one time)
|
||||
- Memory: 179.37 Mi
|
||||
|
||||
#### Message sending status
|
||||
|
||||
Test the sending and receiving of all messages 5 times
|
||||
|
||||
```
|
||||
✔ 100 clients have been created.
|
||||
Start send message test: 1
|
||||
ℹ Start message receive test, message: 0c55e168904f02a3
|
||||
✔ All client received, usage: 420ms
|
||||
Start send message test: 2
|
||||
ℹ Start message receive test, message: 6f000fb91dc85fe1
|
||||
✔ All client received, usage: 89ms
|
||||
Start send message test: 3
|
||||
ℹ Start message receive test, message: 79cce2beee015c5f
|
||||
✔ All client received, usage: 89ms
|
||||
Start send message test: 4
|
||||
ℹ Start message receive test, message: 8df7c58fdadb30aa
|
||||
✔ All client received, usage: 96ms
|
||||
Start send message test: 5
|
||||
ℹ Start message receive test, message: 97c782b36312022c
|
||||
✔ All client received, usage: 98ms
|
||||
```
|
||||
|
||||
### 500 user online test
|
||||
|
||||
#### Online Status
|
||||
|
||||
When no user is logged in, the system occupancy is:
|
||||
- cpu: 0.92%
|
||||
- Memory: 208.5533 Mi
|
||||
|
||||
After logging in 500 online users, the system occupancy is:
|
||||
- cpu: 3.30%
|
||||
- Memory: 241.1933 Mi
|
||||
|
||||
#### Message sending status
|
||||
|
||||
Test the sending and receiving of all messages 5 times
|
||||
|
||||
```
|
||||
✔ 500 clients have been created.
|
||||
Start send message test: 1
|
||||
ℹ Start message receive test, message: ef39144e96ce3ab8
|
||||
✔ All client received, usage: 497ms
|
||||
Start send message test: 2
|
||||
ℹ Start message receive test, message: 5a86b397aab8ff92
|
||||
✔ All client received, usage: 406ms
|
||||
Start send message test: 3
|
||||
ℹ Start message receive test, message: 69066c6d4a4402b0
|
||||
✔ All client received, usage: 403ms
|
||||
Start send message test: 4
|
||||
ℹ Start message receive test, message: 3b066befc54b4835
|
||||
✔ All client received, usage: 424ms
|
||||
Start send message test: 5
|
||||
ℹ Start message receive test, message: 3a6ef9cc7e8e6eac
|
||||
✔ All client received, usage: 752ms
|
||||
```
|
||||
|
||||
### 1k user online test
|
||||
|
||||
#### Online Status
|
||||
|
||||
When no user is logged in, the system occupancy is:
|
||||
- cpu: 0.88%
|
||||
- Memory: 202.978 Mi
|
||||
|
||||
> When I establish more than 800 connections, a large number of `transport close` errors will be triggered and the connection cannot be established
|
||||
>
|
||||
> In order to be able to carry 1000 people at the same time, I choose to expand the capacity horizontally and expand the number of instances to 5 instances
|
||||
|
||||
After logging in 1000 online users, the system occupancy is:
|
||||
- cpu: 3.27%
|
||||
- Memory: 210.876 Mi
|
||||
|
||||
#### Message sending status
|
||||
|
||||
Test the sending and receiving of all messages 5 times
|
||||
|
||||
```
|
||||
✔ 1000 clients have been created.
|
||||
Start send message test: 1
|
||||
ℹ Start message receive test, message: e65050aa6d4237bb
|
||||
✔ All client received, usage: 2194ms
|
||||
Start send message test: 2
|
||||
ℹ Start message receive test, message: a7b02d30e25f02d0
|
||||
✔ All client received, usage: 954ms
|
||||
Start send message test: 3
|
||||
ℹ Start message receive test, message: 75aa655a94cb308f
|
||||
✔ All client received, usage: 988ms
|
||||
Start send message test: 4
|
||||
ℹ Start message receive test, message: 106b8830443002d9
|
||||
✔ All client received, usage: 733ms
|
||||
Start send message test: 5
|
||||
ℹ Start message receive test, message: 0593646f9c7da288
|
||||
✔ All client received, usage: 738ms
|
||||
```
|
||||
|
||||
## Standalone benchmark test
|
||||
|
||||
:::info
|
||||
Test version: v1.7.6
|
||||
|
||||
Basic information of the test environment:
|
||||
|
||||
- NAS deployment dependency (DS220plus): Intel Celeron J4025, 2GB DDR4
|
||||
-mongo
|
||||
- redis
|
||||
-minio
|
||||
- PC, cpu: i7-8700K, 32G memory
|
||||
- tailchat
|
||||
:::
|
||||
|
||||
### 2k user online test
|
||||
|
||||
#### Message sending status
|
||||
|
||||
Test the sending and receiving of all messages 5 times
|
||||
|
||||
```
|
||||
✔ 2000 clients have been created.
|
||||
Start send message test: 1
|
||||
ℹ Start message receive test, message: 8f4edd63886d80eb
|
||||
✔ All client received, usage: 244ms
|
||||
Start send message test: 2
|
||||
ℹ Start message receive test, message: 20e0bc3e2ea1365c
|
||||
✔ All client received, usage: 246ms
|
||||
Start send message test: 3
|
||||
ℹ Start message receive test, message: 7bed6a2cb12238a5
|
||||
✔ All client received, usage: 248ms
|
||||
Start send message test: 4
|
||||
ℹ Start message receive test, message: 6f49353efa2467fc
|
||||
✔ All client received, usage: 245ms
|
||||
Start send message test: 5
|
||||
ℹ Start message receive test, message: 850bed7ed8fa860c
|
||||
✔ All client received, usage: 248ms
|
||||
```
|
||||
|
||||
### 5k user online test
|
||||
|
||||
#### Message sending status
|
||||
|
||||
Test the sending and receiving of all messages 5 times
|
||||
|
||||
```
|
||||
✔ 5000 clients have been created.
|
||||
Start send message test: 1
|
||||
ℹ Start message receive test, message: 85e2624234b8c66a
|
||||
✔ All client received, usage: 933ms
|
||||
Start send message test: 2
|
||||
ℹ Start message receive test, message: ae025dd881ef5ae7
|
||||
✔ All client received, usage: 714ms
|
||||
Start send message test: 3
|
||||
ℹ Start message receive test, message: 55a6c359fe74c90f
|
||||
✔ All client received, usage: 691ms
|
||||
Start send message test: 4
|
||||
ℹ Start message receive test, message: 9eaefcc761c77c8c
|
||||
✔ All client received, usage: 644ms
|
||||
Start send message test: 5
|
||||
ℹ Start message receive test, message: 856a49a1528ad5e1
|
||||
✔ All client received, usage: 787ms
|
||||
```
|
||||
|
||||
|
||||
### 10k user online test
|
||||
|
||||
#### Message sending status
|
||||
|
||||
Test the sending and receiving of all messages 5 times
|
||||
|
||||
```
|
||||
✔ 10000 clients has been create.
|
||||
Start send message test: 1
|
||||
ℹ Start message receive test, message: 06b6bf829b66cca9
|
||||
✔ All client received, usage: 1219ms
|
||||
Start send message test: 2
|
||||
ℹ Start message receive test, message: 3a544d3c0e6d8a14
|
||||
✔ All client received, usage: 1189ms
|
||||
Start send message test: 3
|
||||
ℹ Start message receive test, message: b1d0ea01481b6717
|
||||
✔ All client received, usage: 1089ms
|
||||
Start send message test: 4
|
||||
ℹ Start message receive test, message: af3512e57ce2ad0e
|
||||
✔ All client received, usage: 1142ms
|
||||
Start send message test: 5
|
||||
ℹ Start message receive test, message: d09db4b9a348b32a
|
||||
✔ All client received, usage: 1232ms
|
||||
```
|
||||
4
website/docs/cli/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Cli",
|
||||
"position": 40
|
||||
}
|
||||
34
website/docs/cli/tailchat-cli.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: tailchat-cli
|
||||
---
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install -g tailchat-cli@latest # Install and update with the same command
|
||||
```
|
||||
|
||||
or directly use
|
||||
|
||||
```bash
|
||||
npx tailchat-cli <command>
|
||||
```
|
||||
|
||||
After the installation is successful, enter `tailchat` and return as follows:
|
||||
|
||||
```bash
|
||||
tailchat <command>
|
||||
|
||||
Commands:
|
||||
tailchat create [template] Create Tailchat repo code
|
||||
tailchat connect Connect to Tailchat network
|
||||
tailchat bench Benchmark
|
||||
tailchat declaration <source> Tailchat plugin type declaration
|
||||
tailchat docker Tailchat image management
|
||||
tailchat usage [pid] View Tailchat process usage
|
||||
|
||||
Options:
|
||||
--version Show version number [boolean]
|
||||
-h, --help Show help [boolean]
|
||||
```
|
||||
4
website/docs/contribution/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Contribution",
|
||||
"position": 90
|
||||
}
|
||||
28
website/docs/contribution/community.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
sidebar_position: 99
|
||||
title: Ecology & Community
|
||||
---
|
||||
|
||||
`Tailchat` is a very open platform and welcomes contributions in any form from everyone. Here are some third-party resources related to `Tailchat`
|
||||
|
||||
Feel free submit `pr/issue` to submit your contribution to `Tailchat`, so that we can include it in the following list:
|
||||
|
||||
## Exchange community
|
||||
|
||||
[Join TailchatNightly Channel](https://nightly.paw.msgbyte.com/invite/8Jfm1dWb)
|
||||
|
||||
## Project/Code
|
||||
|
||||
- [Tailchat-Assistant](https://git.povario.com/powermaker450/Tailchat-Assistant): Tailchat Assistant is your very own AI-powered chat bot, ready to implement into your guild!
|
||||
|
||||
|
||||
## Video
|
||||
|
||||
- [【好玩儿的Docker项目】激情畅聊!十分钟搭建一个插件化易拓展的开源即时聊天(IM)应用——Tailchat](https://www.bilibili.com/video/BV1aG411u7M8/)
|
||||
- [简单搭建插件化易拓展的开源即时聊天(IM)应用——Tailchat](https://www.bilibili.com/video/BV1UN4y117M8/)
|
||||
|
||||
## Article
|
||||
|
||||
- [【好玩儿的Docker项目】激情畅聊!十分钟搭建一个插件化易拓展的开源即时聊天(IM)应用——Tailchat](https://blog.laoda.de/archives/docker-compose-install-tailchat)
|
||||
- [Tailchat Synology deployment record](/blog/2023/03/27/deploy-in-synology)
|
||||
- [微信公众号: 重磅推荐:一个开源的即时通讯应用 Tailchat(from GitHub黑板报)](https://mp.weixin.qq.com/s/uImzeb_EQdQcm9LGGwGYuw)
|
||||
4
website/docs/contribution/dev/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Development Documentation",
|
||||
"position": 2
|
||||
}
|
||||
76
website/docs/contribution/dev/role.md
Normal file
@@ -0,0 +1,76 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Identity Groups and Permissions
|
||||
---
|
||||
|
||||
Identity groups are a form of dividing user authority points in group management (RBAC).
|
||||
|
||||
An identity group is composed of a series of permission point switches, and a user may be composed of multiple identity groups. For example, identity group A has A permission, and identity group B has B permission. User C in group A and identity group B has permission A and permission B. In order to simplify the design of permissions, permission points are implemented through simple `true/false`
|
||||
|
||||
More about `RBAC` can be found in the related wiki: https://en.wikipedia.org/wiki/Role-based_access_control I won’t go into details here.
|
||||
|
||||
The following mainly talks about how to add/modify permission points in `Tailchat`
|
||||
|
||||
|
||||
## Built-in permissions
|
||||
|
||||
Permission points need to be declared on both the front-end and back-end at the same time. The front-end is responsible for the display of the front-end, and the back-end is responsible for the comprehensive permission verification. If there is no permission, the processing interface should directly throw an error.
|
||||
|
||||
### Frontend Management
|
||||
|
||||
The permission point list of the front end is maintained in `client/shared/utils/role-helper.ts`, including the permission point of the permission point, such as:
|
||||
|
||||
|
||||
```tsx
|
||||
export const PERMISSION = {
|
||||
/**
|
||||
* Non-plugin permission points are called core
|
||||
*/
|
||||
core: {
|
||||
message: 'core.message',
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
And the display of the permission point on the management page:
|
||||
|
||||
```tsx
|
||||
export const getPermissionList = (): PermissionItemType[] => [
|
||||
{
|
||||
key: PERMISSION.core.message,
|
||||
title: t('Send Message'),
|
||||
desc: t('Allow members to send messages in text channel'),
|
||||
default: true,
|
||||
}
|
||||
];
|
||||
```
|
||||
|
||||
The way to use it is to obtain the permission points maintained under the group through hooks:
|
||||
|
||||
```tsx
|
||||
const [allowSendMessage] = useHasGroupPermission(groupId, [
|
||||
PERMISSION.core.message,
|
||||
]);
|
||||
```
|
||||
|
||||
The way of using arrays is convenient for some business logics that need to have multiple permission points.
|
||||
|
||||
|
||||
### Backend
|
||||
|
||||
The permission statement of the backend is maintained in `server/packages/sdk/src/services/lib/role.ts`, and the usage method is very simple. as follows:
|
||||
```ts
|
||||
const [hasPermission] = await call(ctx).checkUserPermissions(
|
||||
groupId,
|
||||
userId,
|
||||
[PERMISSION.core.message]
|
||||
);
|
||||
if (!hasPermission) {
|
||||
throw new NoPermissionError(t('no operation permission'));
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Plugin permissions
|
||||
|
||||
TODO
|
||||
64
website/docs/contribution/guide.md
Normal file
@@ -0,0 +1,64 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Contribution Guidelines
|
||||
---
|
||||
|
||||
`Tailchat` is a very open project and welcomes contributions of any kind from all backgrounds. Its plugin architecture is meant to allow `Tailchat` to host the implementation of any idea.
|
||||
|
||||
We hope that `Tailchat` is not just a simple chat application, but a space to connect different tools and different ideas.
|
||||
|
||||
Github link: https://github.com/msgbyte/tailchat
|
||||
|
||||
-----------
|
||||
|
||||
Contributor roles are currently urgently needed for `Tailchat`:
|
||||
|
||||
|
||||
### Front-end plugin developer
|
||||
|
||||
- Familiar with the use of React
|
||||
- Possess certain abstract thinking
|
||||
- Have basic aesthetic ability
|
||||
- Passionate about open source projects
|
||||
|
||||
### Backend plugin developers
|
||||
|
||||
- Familiar with the use of Nodejs
|
||||
- Have a basic understanding of microservices
|
||||
- Passionate about open source projects
|
||||
|
||||
### electron application developer
|
||||
|
||||
- Understand cross-platform development
|
||||
- Familiar with code injection, able to realize data interaction between render process and main
|
||||
- Passionate about open source projects
|
||||
|
||||
### React Native App Developers
|
||||
|
||||
- Familiar with the development of React Native applications
|
||||
- Familiar with the use of React Native Web
|
||||
- Passionate about open source projects
|
||||
|
||||
### Operation Classmates
|
||||
|
||||
- Understand basic operational capabilities and have experience as a group leader
|
||||
- Understand the publicity channels and methods of open source projects
|
||||
- Strong communication skills
|
||||
- Passionate about open source projects
|
||||
|
||||
### Ambassador
|
||||
|
||||
- Master the mother tongue and English (if English is the mother tongue, only English is enough)
|
||||
- Have a certain understanding of the open source community
|
||||
- Participate in the development of Tailchat usage and best practices
|
||||
- Strong communication skills
|
||||
- Passionate about open source projects
|
||||
|
||||
### other
|
||||
|
||||
More of all possibilities...
|
||||
|
||||
|
||||
:::info
|
||||
Contact: Send an email to `moonrailgun@gmail.com` or [Join TailchatNightly Channel](https://nightly.paw.msgbyte.com/invite/8Jfm1dWb)
|
||||
:::
|
||||
4
website/docs/deployment/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Application Deployment",
|
||||
"position": 10
|
||||
}
|
||||
42
website/docs/deployment/admin.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
sidebar_position: 9
|
||||
title: Deployment admin platform (optional)
|
||||
---
|
||||
|
||||
:::info
|
||||
The feature of `admin` is still being iterated, and it is currently in the early trial version
|
||||
We will continue to enrich the internal content in the future
|
||||
:::
|
||||
|
||||
Get the latest `admin` configuration from `github`:
|
||||
```bash
|
||||
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/admin.yml
|
||||
```
|
||||
|
||||
Set the account and password of the `admin` in the environment variable `docker-compose.env`:
|
||||
|
||||
```ini
|
||||
ADMIN_USER=tailchat
|
||||
ADMIN_PASS=<Write the independent background password here, do not tell others>
|
||||
```
|
||||
|
||||
Then use [Multiple Files](https://docs.docker.com/compose/extends/#understanding-multiple-compose-files) to start the application:
|
||||
```bash
|
||||
docker compose -f docker-compose.yml -f admin.yml up -d
|
||||
```
|
||||
|
||||
*Pay attention to the order, because `admin.yml` depends on `docker-compose.yml`, so it should be placed behind*
|
||||
|
||||
At this time, add `/admin/` after the access backend address to access:
|
||||
```
|
||||
https://tailchat.example.com/admin/
|
||||
```
|
||||
|
||||
*Note: don't forget to have a `/` at the end*
|
||||
|
||||
|
||||
<details>
|
||||
<summary>About the deprecated legacy admin</summary>
|
||||
|
||||
admin-old will be remove in v1.8.6. you can checkout version before to get it
|
||||
</details>
|
||||
BIN
website/docs/deployment/assets/docker-init.png
Normal file
|
After Width: | Height: | Size: 169 KiB |
34
website/docs/deployment/cdn.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
sidebar_position: 11
|
||||
title: CDN Deployment (optional)
|
||||
---
|
||||
|
||||
There may be cases where front-end and back-end are deployed separately. For example, if you want to manage front-end code separately in object storage, add CDN support. You need to compile the front-end code separately.
|
||||
|
||||
Backend code is still recommended to use `docker` to deploy
|
||||
|
||||
In order to compile the front-end code separately, you need to download the source code and compile it manually
|
||||
|
||||
```bash
|
||||
git clone https://github.com/msgbyte/tailchat.git
|
||||
cd tailchat
|
||||
|
||||
# You can switch between different distributions by git, for example: git checkout v1.8.8
|
||||
|
||||
pnpm install # You need to use `pnpm` to install dependencies, using other package management tools may cause problems. and you should use pnpm@8 because here is some break change in pnpm@9
|
||||
```
|
||||
|
||||
Wait patiently for dependencies to be installed
|
||||
|
||||
Enter the front-end code and compile it
|
||||
|
||||
```bash
|
||||
cd client/web
|
||||
SERVICE_URL=<your-api-url> pnpm build
|
||||
```
|
||||
|
||||
Make sure the value of `SERVICE_URL` is the address of your api backend, for example: `http://127.0.0.1:11000`
|
||||
|
||||
After compiling, you can get all the front-end files in the `tailchat/client/web/dist` directory.
|
||||
|
||||
> In addition, if there is a 404 report after refreshing the page, you need to configure a configuration similar to [When hosting a static website, set the index.html file in the root directory as the default home page]
|
||||
85
website/docs/deployment/dev.md
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
sidebar_position: 99
|
||||
title: Development environment
|
||||
---
|
||||
|
||||
For setting up the development environment, tailchat provides a very simple and fast way:
|
||||
|
||||
## Use Docker to quickly build a dependent environment
|
||||
|
||||
**mongodb**
|
||||
```bash
|
||||
docker run -d --name mongo -p 27017:27017 mongo:4
|
||||
```
|
||||
|
||||
**redis**
|
||||
```bash
|
||||
docker run -d --name redis -p 6379:6379 redis
|
||||
```
|
||||
|
||||
**minio**
|
||||
```bash
|
||||
docker run -d \
|
||||
-p 19000:9000 \
|
||||
-p 19001:9001 \
|
||||
--name minio \
|
||||
-e "MINIO_ROOT_USER=tailchat" \
|
||||
-e "MINIO_ROOT_PASSWORD=com.msgbyte.tailchat" \
|
||||
minio/minio server /data --console-address ":9001"
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
Here is a minimal example `.env` which let you can run tailchat in development environment.
|
||||
|
||||
```ini
|
||||
PORT=11000
|
||||
MONGO_URL=mongodb://127.0.0.1:27017/tailchat
|
||||
REDIS_URL=redis://localhost:6379/
|
||||
MINIO_URL=127.0.0.1:19000
|
||||
MINIO_USER=tailchat
|
||||
MINIO_PASS=com.msgbyte.tailchat
|
||||
```
|
||||
|
||||
## Node Version
|
||||
|
||||
Tailchat is develop with `nodejs`, please install nodejs by yourself, here is nodejs official: [https://nodejs.org/](https://nodejs.org/)
|
||||
|
||||
Suggestion to use `nodejs18.x`, and not support `nodejs20` yet because nodejs has some break change.
|
||||
|
||||
## Start the development server
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
You can edit the configuration of `server/.env` to your own relevant context
|
||||
|
||||
The file can be started from `server/.env.example`
|
||||
|
||||
Now you can preview your server in `http://localhost:11011`
|
||||
|
||||
## Project directory description
|
||||
|
||||
- `apps`: non-core applications
|
||||
- `cli`: Tailchat’s command line program
|
||||
- `github-app`: Tailchat’s github integration bot
|
||||
- `oauth-demo`: Tailchat open platform third-party login demo program
|
||||
- `widget`: Web page embedded widget
|
||||
- `client`: client
|
||||
- `desktop`: desktop version
|
||||
- `mobile`: mobile version
|
||||
- `packages`: dependency packages
|
||||
- `shared`: platform-independent common code
|
||||
- `web`: web version
|
||||
- `plugins`: pure frontend plugins
|
||||
- `src`: source code
|
||||
- `packages`
|
||||
- `types`: common types for both front and back ends
|
||||
- `server`: server
|
||||
- `admin`: background management
|
||||
- `models`: database model
|
||||
- `plugins`: server-side plugins
|
||||
- `services`: microservices
|
||||
- `website`: official website
|
||||
187
website/docs/deployment/docker-compose.mdx
Normal file
@@ -0,0 +1,187 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
title: Docker Compose deployment
|
||||
---
|
||||
|
||||
## Recommended configuration
|
||||
|
||||
Recommended minimum configuration **1 core 2G**
|
||||
|
||||
> If there is only **1 core 1G**? Please refer to my blog: [Linux small resource server experience summary](http://moonrailgun.com/posts/6769ba51/) expand memory space by swapping memory
|
||||
>
|
||||
> Memory usage for reference:
|
||||
> 
|
||||
|
||||
## Pre-environment
|
||||
|
||||
### Docker / Docker Compose
|
||||
|
||||
First you need to make sure you have a `Docker / Docker Compose` environment
|
||||
|
||||
The installation method can refer to: [Install the docker environment](./install-docker.md)
|
||||
|
||||
## Pull Image
|
||||
|
||||
You can pull the compiled image from **public image** or **manually compile from source code**
|
||||
|
||||
> Using the compiled image can compile without spending enough computer resources, which is very friendly to servers with small resource configurations. In addition, compared to source code compilation, the code of the public image is more stable.
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
<Tabs groupId="build">
|
||||
<TabItem value="cli" label="One-command installation using cli" default>
|
||||
|
||||
> Use `cli` Please make sure you already have a node environment on your server (node version 16+ is recommended)
|
||||
> If you don't know about node, you can use `Manually install from public image`
|
||||
|
||||
Use the command line tool `tailchat-cli` to pull/update the image with one click:
|
||||
```bash
|
||||
npx tailchat-cli docker update
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="public-image" label="Manually install from public image" default>
|
||||
|
||||
Manually install using Docker native commands:
|
||||
```bash
|
||||
docker pull moonrailgun/tailchat # Pull the tailchat image from the public image registry
|
||||
docker tag moonrailgun/tailchat tailchat # Retag the downloaded image to tailchat (consistent with source code compilation, if not changed, it will follow the source code compilation process)
|
||||
```
|
||||
|
||||
:::info
|
||||
You can view historically supported image versions from [Docker Hub](https://hub.docker.com/r/moonrailgun/tailchat/tags)
|
||||
:::
|
||||
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="source-code" label="Compile from source">
|
||||
|
||||
*This section is for advanced players to get the latest tailchat implementation, please make sure you have enough knowledge of `docker`, `nodejs`, `git`*
|
||||
|
||||
#### Compilation environment
|
||||
|
||||
- Download from [official website](https://nodejs.org/en/download/)
|
||||
- Or use [nvm](https://github.com/nvm-sh/nvm)
|
||||
|
||||
#### Install pnpm
|
||||
|
||||
`pnpm` is a package management tool for `nodejs`, a substitute for `npm`, in order to ensure the same dependency environment as developers, it is strongly recommended that you use pnpm as a follow-up package management tool
|
||||
|
||||
```bash
|
||||
npm install -g pnpm
|
||||
```
|
||||
|
||||
#### Clone Repo
|
||||
|
||||
Download the project from remote:
|
||||
|
||||
```bash
|
||||
mkdir msgbyte && cd msgbyte
|
||||
|
||||
git clone https://github.com/msgbyte/tailchat.git # Clone the project to local
|
||||
```
|
||||
|
||||
#### Compile project
|
||||
|
||||
```bash
|
||||
cd tailchat && docker compose build
|
||||
```
|
||||
|
||||
*Compilation has certain requirements on server configuration, 2-core 4G compilation takes about 10 minutes, for reference*
|
||||
|
||||
After the compilation is complete, you can view the compiled image through `docker images`.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
## Startup project
|
||||
|
||||
<Tabs groupId="build">
|
||||
<TabItem value="cli" label="One-command installation using cli" default>
|
||||
|
||||
|
||||
```bash
|
||||
npx tailchat-cli docker init
|
||||
```
|
||||
|
||||
Executing this command will ask you some configuration-related questions in an interactive manner (as shown in the figure below), and the configuration file will be automatically generated after filling it out
|
||||
|
||||

|
||||
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="public-image" label="Manually install from public image">
|
||||
|
||||
|
||||
> A configuration file needs to be downloaded before starting to tell `docker-compose` how to start the image
|
||||
> Download configuration files and configure environment variables from the repository:
|
||||
> - [docker-compose.yml](https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.yml)
|
||||
> - [docker-compose.env](https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.env)
|
||||
|
||||
```bash
|
||||
mkdir tailchat && cd tailchat
|
||||
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.yml
|
||||
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.env
|
||||
```
|
||||
|
||||
Need to modify the configuration before starting
|
||||
|
||||
Modify the configuration of the `docker-compose.env` file, the following fields are recommended to be modified:
|
||||
|
||||
- `API_URL` is an externally accessible url address, used for file service access, it can be a domain name or an ip **If the sent picture cannot be displayed normally, this variable is not set**
|
||||
- `SECRET` server-side encryption key, used to generate Token. The default is `tailchat`
|
||||
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="source-code" label="Compile from source">
|
||||
|
||||
|
||||
Need to modify the configuration before starting
|
||||
|
||||
Modify the configuration of the `docker-compose.env` file, the following fields are recommended to be modified:
|
||||
|
||||
- `API_URL` is an externally accessible url address, used for file service access, it can be a domain name or an ip **If the sent picture cannot be displayed normally, this variable is not set**
|
||||
- `SECRET` server-side encryption key, used to generate Token. The default is `tailchat`
|
||||
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
|
||||
After completing the configuration, use `docker-compose` to start the `Tailchat` application with one click:
|
||||
|
||||
```bash
|
||||
# Make sure the configuration files (docker-compose.yml and docker-compose.env) are in the current directory
|
||||
# Execute the following command to start with one key
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Visit: `http://<server ip>:11000` to open tailchat.
|
||||
|
||||
Note that some cloud services may need to manually open firewall ports.
|
||||
|
||||
*Some environment variables are provided in the `docker-compose.env` file for configuration.*
|
||||
|
||||
The `docker-compose.yml` configuration of `tailchat` provides the following configuration by default:
|
||||
|
||||
- `mongodb`: Persistent Database
|
||||
- `redis`: KV database and message transport service
|
||||
- `minio`: Distributed file service
|
||||
|
||||
The persistent files (database, file storage) are managed uniformly through `docker volume`:
|
||||
|
||||
```
|
||||
docker volume ls | grep "tailchat-server"
|
||||
```
|
||||
|
||||
:::info
|
||||
Complete environment variables can be queried [Environment Variables](./environment.md)
|
||||
:::
|
||||
|
||||
## More deployment related documents
|
||||
|
||||
- [Build https gateway (optional)](./https-gateway.md)
|
||||
- [Deployment admin platform (optional)](./admin.md)
|
||||
79
website/docs/deployment/environment.md
Normal file
@@ -0,0 +1,79 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
title: Environment Variable
|
||||
---
|
||||
|
||||
## Environment Variable
|
||||
|
||||
| Name | Default Value | Description |
|
||||
| ----- | ------ | --- |
|
||||
| PORT | 11000 | Gateway service port number |
|
||||
| SECRET | tailchat | encryption key, used for JWT |
|
||||
| STATIC_HOST | "{BACKEND}" | Externally accessible static service host, used for file service access, the default is the dynamic server address inferred from the front-end request, if it is expected to be stored in a third-party OSS, it needs to be modified |
|
||||
| STATIC_URL | "{BACKEND}/static/" | Externally accessible static service complete address prefix, used for file service access, the default is the dynamic server address inferred from the front-end request, if it is expected to be stored in a third-party OSS Modify, if this variable is set, the above `STATIC_HOST` value is invalid |
|
||||
| API_URL | http://127.0.0.1:11000 | Externally accessible url address, used for issuer issuance on open platforms or as a fallback for file services |
|
||||
| MONGO_URL | - | Database service address |
|
||||
| REDIS_URL | - | Redis service address |
|
||||
| MINIO_URL | - | File service address (minio) |
|
||||
| MINIO_USER | - | File service username |
|
||||
| MINIO_PASS | - | File service password |
|
||||
| MINIO_BUCKET_NAME | tailchat | file service bucket name |
|
||||
| MINIO_PATH_STYLE | false | Whether to use path-style s3 communication format, `true` is `Path Style`, `false` is `Virtual hosted style` |
|
||||
| MINIO_SSL | false | Whether to use SSL to connect storage, if "1" or "true" enable SSL |
|
||||
| SMTP_SENDER | - | Mail service sender (example: `"Tailchat" example@163.com`) |
|
||||
| SMTP_URI | - | mail service connection address (example: `smtp://username:password@smtp.example.com/?pool=true`) |
|
||||
| FILE_LIMIT | 1048576 | File/image upload size limit, the default is 1m, please enter a number(unit: byte) |
|
||||
| EMAIL_VERIFY | - | Whether to enable email verification, if it is "1" or "true", add email verification control when registering |
|
||||
| REQUEST_TIMEOUT | 10000 | Number of milliseconds to wait before reject a request with a RequestTimeout error. Disabled: 0 |
|
||||
| TIANJI_SCRIPT_URL | - | Script Url of Tianji if you wanna monitor Tailchat user usage, you can get it in code modal in Tianji website (example: `https://tianji.example.com/tracker.js`) |
|
||||
| TIANJI_WEBSITE_ID | - | Tianji website id |
|
||||
| DISABLE_MESSAGEPACK | - | Whether to disable using messagepack as [parser](https://socket.io/docs/v4/custom-parser/) for socketio in openapi, if "1" or "true" turn off this method |
|
||||
| DISABLE_LOGGER | - | Whether to disable the log output, if "1" or "true" turn off the log on the fly |
|
||||
| DISABLE_TRACING | - | Whether to disable the Tracing function (enabling it can save a lot of logs), if "1" or "true" turn off the log on the fly |
|
||||
| DISABLE_USER_REGISTER | - | Whether to disable the user register, if "1" or "true" turn off this method |
|
||||
| DISABLE_GUEST_LOGIN | - | Whether to disable the guest login, if "1" or "true" turn off this method |
|
||||
| DISABLE_CREATE_GROUP | - | Whether to disable user create group, if "1" or "true" turn off this method |
|
||||
| DISABLE_PLUGIN_STORE | - | Whether to hide user plugin store entry, if "1" or "true" turn off this method |
|
||||
| DISABLE_ADD_FRIEND | - | Whether to hide user add friend entry, if "1" or "true" turn off this method |
|
||||
| DISABLE_TELEMETRY | - | Whether to disable send telemetry report to msgbyte to help us improve, its anonymous, if "1" or "true" turn off telemetry |
|
||||
|
||||
> Some examples of environment variables can be seen: https://github.com/msgbyte/tailchat/blob/master/server/.env.example
|
||||
|
||||
### Use files to configure environment variables
|
||||
|
||||
- - If starting locally, copy `.env.example` to `.env` and edit
|
||||
```bash
|
||||
mv .env.example .env
|
||||
vi .env
|
||||
```
|
||||
|
||||
- If it is started by `docker-compose`, you can directly edit `docker-compose.env`, and use `docker compose up -d` directly after the modification to take effect
|
||||
|
||||
### About the use of environment variables with spaces
|
||||
|
||||
If your environment variable value contains spaces, in order for the system to recognize that this is a complete string instead of treating spaces as separators. You need to wrap a double quotes around the outside.
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
SMTP_SENDER="\"Tailchat\" example@163.com" # If there are repeated double quotes, they need to be escaped with an escape character
|
||||
```
|
||||
|
||||
|
||||
-------------
|
||||
|
||||
:::caution
|
||||
Some environment variable modifications may need to clear the cache to take effect
|
||||
:::
|
||||
|
||||
### How to clear the cache
|
||||
|
||||
Changes to some environment variables may involve cache updates, such as `FILE_LIMIT`, because config data needs to be sent to the client.
|
||||
|
||||
Therefore, it may appear that after modifying the environment variable, the performance on the client is still the same as before. At this point you need to clear the old cache for the update to take effect.
|
||||
|
||||
There are several options for clearing the cache:
|
||||
|
||||
- Execute `docker compose down` then run `docker compose up -d`. This is because the data of the `redis` service is not persisted, shutting down and restarting the service is equivalent to a brand new environment
|
||||
- Manually enter the `redis` service to clean up the cache items whose name contains `config.client`, which contains the configuration items returned to the client
|
||||
- Enter the cache management page of the `admin` management system. Click the `Clean Configuration Cache` button
|
||||
45
website/docs/deployment/https-gateway.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
title: Build https gateway (optional)
|
||||
---
|
||||
|
||||
In `Tailchat`, some services are strongly dependent on `https`, such as audio and video calls, embedding external `https` media resources and web pages, etc.
|
||||
|
||||
At the same time, for the safety of users(client to server), we highly recommend that `Tailchat` be provided externally as `https` service.
|
||||
|
||||

|
||||
|
||||
If you have no related experience, and only deploy `Tailchat` service on the same machine (without occupying **80**/**443** port), then we recommend `swag` from `Tailchat` Configuration begins.
|
||||
|
||||
:::info
|
||||
You can see the original configuration in [Github](https://github.com/msgbyte/tailchat/tree/master/docker)
|
||||
:::
|
||||
|
||||
Pull the required configuration file directly by the following command
|
||||
```bash
|
||||
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/swag.yml
|
||||
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/swag.env.example -O swag.env
|
||||
mkdir config
|
||||
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/config/nginx.conf -O ./config/nginx.conf
|
||||
```
|
||||
|
||||
After completion, you should see the following three files in the current directory:
|
||||
- `swag.yml`
|
||||
- `swag.env`
|
||||
- `config/nginx.conf`
|
||||
|
||||
Modify the content of `swag.env`, change the value of `URL` to the domain name, such as: `URL=tailchat.example.com`
|
||||
|
||||
:::info
|
||||
The `https` protocol relies on the domain name for certificate verification, so it is necessary to assign a domain name in advance to point to the target server
|
||||
:::
|
||||
|
||||
The address of the domain name needs to create an A pointing record in the management background of the purchased domain name.
|
||||
|
||||
After assigning the domain name we can start the service.
|
||||
|
||||
```bash
|
||||
docker compose -f ./swag.yml up -d
|
||||
```
|
||||
|
||||
If everything goes well, the `swag` service has automatically applied for a certificate for you and started the reverse proxy service. At this time, if you visit `https://tailchat.example.com` in the browser, you can see the familiar The interface is already there.
|
||||
80
website/docs/deployment/install-docker.md
Normal file
@@ -0,0 +1,80 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
title: Install the docker environment
|
||||
---
|
||||
|
||||
> Because the `Tailchat` environment is a bit complicated for beginners, it provides a `docker-based one-command` environment configuration. But for students who are not familiar with `docker`, `docker` itself may also be a kind of complexity.
|
||||
|
||||
> Therefore, in order to facilitate everyone to quickly build `Tailchat`, this article is provided as a guide. Students who have a certain understanding of `docker` can skip this article
|
||||
|
||||
> This article takes `linux centos` as an example, the goal is to facilitate the deployment directly on the server. For students who want to use it on other systems (`windows`, `mac`), you can refer to the official documentation to install `docker`
|
||||
|
||||
## One-command installation of docker
|
||||
|
||||
Officially maintained one-command installation `Docker` script, suitable for students who don’t like to study details
|
||||
|
||||
Execute the following operations in sequence on the server terminal
|
||||
|
||||
```bash
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sudo sh get-docker.sh
|
||||
```
|
||||
|
||||
If the installation is successful, you can skip the subsequent content.
|
||||
|
||||
## Manually install docker and docker compose
|
||||
|
||||
Official document: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
|
||||
|
||||
```bash
|
||||
# If you have installed docker before, you can execute the following command to delete the old one
|
||||
sudo yum remove docker \
|
||||
docker-client \
|
||||
docker-client-latest \
|
||||
docker-common \
|
||||
docker-latest \
|
||||
docker-latest-logrotate \
|
||||
docker-logrotate \
|
||||
docker-engine
|
||||
```
|
||||
|
||||
|
||||
```bash
|
||||
sudo yum install -y yum-utils # yum-utils provides the yum-config-manager command
|
||||
|
||||
sudo yum-config-manager \
|
||||
--add-repo \
|
||||
https://download.docker.com/linux/centos/docker-ce.repo
|
||||
```
|
||||
|
||||
> Install docker and docker-compose plugins
|
||||
|
||||
```bash
|
||||
sudo yum install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||
```
|
||||
|
||||
*PS: `docker-compose-plugin` provides the `docker compose` command, the usage is the same as `docker-compose`*
|
||||
|
||||
> If `docker ps` shows that the daemon process is not started (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?), you can execute the following command to start it: `sudo systemctl start docker`
|
||||
|
||||
## Install docker-compose separately
|
||||
|
||||
If the purchased server has been pre-installed with docker, if you want to install docker-compose separately, you can read this section:
|
||||
|
||||
Official document: [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/)
|
||||
|
||||
```bash
|
||||
curl -SL https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose # Download binaries
|
||||
sudo chmod +x /usr/local/bin/docker-compose # give execute permission
|
||||
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose # Soft link to path, can be called directly
|
||||
docker-compose --version # The line command returns the version number and the installation is successful
|
||||
```
|
||||
|
||||
## NOTICE
|
||||
|
||||
For historical reasons, `docker compose` has a `docker` plugin version and a `docker compose` standalone version. Generally speaking, `docker compose xxx` is equivalent to `docker-compose xxx`
|
||||
|
||||
## Reference
|
||||
|
||||
- [Docker](https://docs.docker.com/engine/install/)
|
||||
- [Docker Compose](https://docs.docker.com/compose/install/)
|
||||
155
website/docs/deployment/mobile.md
Normal file
@@ -0,0 +1,155 @@
|
||||
---
|
||||
sidebar_position: 12
|
||||
title: Mobile Self Compile (optional)
|
||||
---
|
||||
|
||||
The source code of `Tailchat` mobile terminal is located in `client/mobile`. The technology stack is `react-native`
|
||||
|
||||
You can download the compiled general version directly from the official website: [https://tailchat.msgbyte.com/downloads](https://tailchat.msgbyte.com/downloads), or compile it yourself from the source code
|
||||
|
||||
This section mainly explains how to compile the mobile version of `Tailchat`.
|
||||
|
||||
## Prepare the development environment
|
||||
|
||||
You can see the complete development environment preparation operation at [https://reactnative.dev/docs/environment-setup](https://reactnative.dev/docs/environment-setup), so I won’t go into details here.
|
||||
|
||||
### Install dependencies
|
||||
|
||||
```bash
|
||||
cd client/mobile
|
||||
yarn
|
||||
```
|
||||
|
||||
### Environment check
|
||||
|
||||
```bash
|
||||
yarn doctor
|
||||
```
|
||||
|
||||
## Prepare environment variables
|
||||
|
||||
```bash
|
||||
cp.env.example.env
|
||||
```
|
||||
|
||||
In the `.env` file we configure the required environment variables for compilation
|
||||
|
||||
```ini
|
||||
TAILCHAT_UPLOAD_STORE_FILE=
|
||||
TAILCHAT_UPLOAD_STORE_PASSWORD=
|
||||
TAILCHAT_UPLOAD_KEY_ALIAS=
|
||||
TAILCHAT_UPLOAD_KEY_PASSWORD=
|
||||
|
||||
GETUI_APPID=
|
||||
GETUI_APPKEY=
|
||||
GETUI_APPSECRET=
|
||||
GETUI_HUAWEI_APP_ID=
|
||||
```
|
||||
|
||||
## Certificate signing
|
||||
|
||||
If you are only using it for testing, you can skip this section and Tailchat will sign it for you using a public test certificate.
|
||||
|
||||
### Android
|
||||
|
||||
If you need to use your own certificate for signing, you need to fill in the following:
|
||||
|
||||
```ini
|
||||
TAILCHAT_UPLOAD_STORE_FILE=
|
||||
TAILCHAT_UPLOAD_STORE_PASSWORD=
|
||||
TAILCHAT_UPLOAD_KEY_ALIAS=
|
||||
TAILCHAT_UPLOAD_KEY_PASSWORD=
|
||||
```
|
||||
|
||||
Need to fill in: certificate file name, password, alias, alias password
|
||||
The certificate file needs to be placed in the `client/mobile/android/app` directory, usually a `*.keystore` file
|
||||
|
||||
> As for how to generate it, you can use `Android Studio` or `keytool` tool to generate it.
|
||||
|
||||
### iOS
|
||||
|
||||
TODO
|
||||
|
||||
## Push
|
||||
|
||||
`Tailchat` implements Android multi-vendor message push by integrating personal tweets as a relay
|
||||
|
||||
You can get all the required configuration in the application configuration of `getui`
|
||||
|
||||
Among them `GETUI_APPID`, `GETUI_APPKEY`, `GETUI_APPSECRET` are filled in in order
|
||||
|
||||
Corresponding configuration is required on the server side `GETUI_APPID`, `GETUI_APPKEY`, `GETUI_MASTERSECRET` so that the self-deployed push service can send push messages correctly
|
||||
|
||||

|
||||
|
||||
### Manufacturer Push
|
||||
|
||||
Manufacturer push can be turned on or off as needed
|
||||
|
||||
The source code needs to be modified as follows:
|
||||
- `manifestPlaceholders` section and `dependencies` section of `client/mobile/android/app/build.gradle`
|
||||
- `.env` environment variable configuration
|
||||
|
||||
|
||||
## Compile
|
||||
|
||||
### Android
|
||||
|
||||
```bash
|
||||
cd android
|
||||
./gradlew assembleRelease
|
||||
```
|
||||
|
||||
### iOS
|
||||
|
||||
iOS compilation needs to be done through `xcode`
|
||||
|
||||
> Screenshot cannot be taken due to lack of equipment, please follow the public information on the Internet.
|
||||
|
||||
### FAQ
|
||||
|
||||
If the following types of errors occur:
|
||||
|
||||
```
|
||||
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
|
||||
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
|
||||
|
||||
FAILURE: Build failed with an exception.
|
||||
|
||||
* What went wrong:
|
||||
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
|
||||
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
|
||||
> Could not create task ':app:generateDebugLintModel'.
|
||||
> java.lang.NullPointerException (no error message)
|
||||
|
||||
* Try:
|
||||
> Run with --stacktrace option to get the stack trace.
|
||||
> Run with --info or --debug option to get more log output.
|
||||
> Run with --scan to get full insights.
|
||||
|
||||
* Get more help at https://help.gradle.org
|
||||
|
||||
BUILD FAILED in 27s
|
||||
```
|
||||
|
||||
It may be because your environment variable is missing, you can leave the value empty, but the entry must exist
|
||||
|
||||
like:
|
||||
```ini
|
||||
GETUI_APPID=xxxxxxxxxxxx
|
||||
GETUI_APPKEY=yyyyyyyyy
|
||||
GETUI_APPSECRET=zzzzzzzzzz
|
||||
GETUI_HUAWEI_APP_ID=
|
||||
```
|
||||
|
||||
instead of
|
||||
|
||||
```ini
|
||||
GETUI_APPID=xxxxxxxxxxxx
|
||||
GETUI_APPKEY=yyyyyyyyy
|
||||
GETUI_APPSECRET=zzzzzzzzzz
|
||||
```
|
||||
|
||||
#### Can I compile it myself and publish it to the app store?
|
||||
|
||||
Yes, but please modify the application name, package name, icon and other information to prevent conflicts with official applications.
|
||||
4
website/docs/deployment/other-way/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Install with other ways",
|
||||
"position": 5
|
||||
}
|
||||
10
website/docs/deployment/other-way/bt.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: Install with BT
|
||||
---
|
||||
|
||||
:::info
|
||||
This document is only available for Chinese.
|
||||
:::
|
||||
|
||||
If you are chinese user, and wanna install Tailchat with bt, please learn more with switch language to chinese and read it.
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Kubernetes",
|
||||
"position": 2
|
||||
}
|
||||
147
website/docs/deployment/other-way/kubernetes/sealos.md
Normal file
@@ -0,0 +1,147 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
title: Deployment in sealos
|
||||
---
|
||||
|
||||
`Sealos` is an open-source Kubernetes deployment system that allows us to quickly create an on-demand, pay-as-you-go application cluster.
|
||||
|
||||
## First, enter Sealos and open "Application Management"
|
||||
|
||||

|
||||
|
||||
## Create a new application
|
||||
|
||||

|
||||
|
||||
### Create dependencies
|
||||
|
||||
As an enterprise-level application, `tailchat` has the minimum dependencies of `mongodb`, `redis`, and `minio`. Let's create them one by one.
|
||||
|
||||
#### MongoDB
|
||||
|
||||
For convenience, we will fix one instance and bind it to local storage. The image used is `mongo:4`. Note that because we did not set a password for the database, do not provide network services to the public network. The container exposes port 27017, which is the default database service port. The content is as follows:
|
||||
|
||||

|
||||
|
||||
Click "Deploy Application" to submit the deployment. Wait patiently for a while, and you can see that the application has started up.
|
||||
|
||||

|
||||
|
||||
> Note: that the initial allocation of 64m is too small for MongoDB, so I changed it to 128m by modifying the application. Resource allocation can be changed at any time, which is also a convenient feature of Sealos/Kubernetes.
|
||||
|
||||
#### Minio
|
||||
|
||||
Next, we will create Minio, an open-source object storage service. We can also quickly create it through Sealos's UI. The image used is `minio/minio`. Note that we need to make some adjustments:
|
||||
|
||||
- Expose port: 9000
|
||||
- Change the run command to: `minio`
|
||||
- Change the command parameters to: `server /data`
|
||||
- Set environment variables:
|
||||
- MINIO_ROOT_USER: tailchat
|
||||
- MINIO_ROOT_PASSWORD: com.msgbyte.tailchat
|
||||
- Local storage: `/data`
|
||||
|
||||
The final result is as follows:
|
||||
|
||||

|
||||
|
||||
Click the "Deploy" button and you can see that the service has started up normally.
|
||||
|
||||
#### Redis
|
||||
|
||||
Finally, we need to deploy Redis as a content cache and message forwarding. The image used is `redis:alpine`, and the exposed port is `6379`. The final result is as follows:
|
||||
|
||||

|
||||
|
||||
### Create Tailchat itself
|
||||
|
||||
At this point, all the dependencies required by Tailchat have been deployed, as shown below:
|
||||
|
||||

|
||||
|
||||
Now we can deploy the Tailchat itself. The Tailchat itself will be relatively complex, but because Sealos is purely UI-based, it will not be too complicated.
|
||||
|
||||
- Use image: `moonrailgun/tailchat`
|
||||
- Expose port: `11000` (remember to open external access)
|
||||
- Configure environment variables as follows:
|
||||
```
|
||||
SERVICEDIR=services,plugins
|
||||
TRANSPORTER=redis://redis:6379
|
||||
REDIS_URL=redis://redis:6379
|
||||
MONGO_URL=mongodb://mongo/tailchat
|
||||
MINIO_URL=minio:9000
|
||||
MINIO_USER=tailchat
|
||||
MINIO_PASS=com.msgbyte.tailchat
|
||||
```
|
||||
|
||||
The final effect is as follows:
|
||||
|
||||

|
||||
|
||||
After waiting patiently for a while, you can see that the Tailchat service has started up.
|
||||
|
||||

|
||||
|
||||
## Preview service
|
||||
|
||||
First, we can check the availability of the Tailchat service by adding `/health` to the external address provided by the service, such as `https://<xxxxxxxxxx>.cloud.sealos.io/health`. When it starts up, the Tailchat service will return content like this:
|
||||
|
||||

|
||||
|
||||
This JSON string contains the image version used, node name, system usage, and microservice loading status. Here we can see that my common services, such as `user`/`chat.message`, and some services with plugin prefixes such as `plugin.registry`, have all started up normally, indicating that our server is running normally. Now we can directly access our external address and see that after a short loading time, the page opens normally and automatically jumps to the login page.
|
||||
|
||||

|
||||
|
||||
Register an account casually, and you can see that we can enter the main interface of Tailchat normally, as shown in the following figure:
|
||||
|
||||

|
||||
|
||||
At this point, our service has successfully landed in Sealos.
|
||||
|
||||
## Scaling service
|
||||
|
||||
Of course, as a distributed architecture system, Tailchat naturally supports horizontal scaling. In Sealos, scaling is also very simple. Just modify the number of instances through the change operation:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
At this point, when we access `https://<xxxxxxxxxx>.cloud.sealos.io/health`, we can see that we can access different nodes.
|
||||
|
||||

|
||||
|
||||
## Add Tailchat entry to desktop
|
||||
|
||||
Open Terminal, enter `vim app.yml` to create and edit a configuration file
|
||||
|
||||
Enter the following content, note that the url should be replaced with the url deployed by yourself
|
||||
|
||||
```yml
|
||||
apiVersion: app.sealos.io/v1
|
||||
kind: App
|
||||
metadata:
|
||||
name: tailchat-app-entry
|
||||
spec:
|
||||
name: Tailchat
|
||||
icon:
|
||||
type: iframe
|
||||
data:
|
||||
url: <Your url>
|
||||
desc:
|
||||
icon: https://tailchat.msgbyte.com/img/logo.svg
|
||||
menuData:
|
||||
nameColor: text-black
|
||||
helpDropDown:
|
||||
helpDocs:
|
||||
displayType: normal
|
||||
```
|
||||
|
||||
Press `esc` to exit edit mode, press `:wq` to save and exit vim
|
||||
|
||||
Type `kubectl apply -f app.yml` to start the configuration.
|
||||
|
||||
After refreshing the page, we can see that our entry appears on the desktop of `sealos`
|
||||
|
||||

|
||||
117
website/docs/deployment/other-way/kubernetes/simple.md
Normal file
@@ -0,0 +1,117 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Simple Deployment
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
Kubernetes is an open-source container orchestration platform used for automating the deployment, scaling, and management of containerized applications. It provides a way to orchestrate containers, automating tasks such as deployment, scheduling, load balancing, and fault recovery, making containerized applications run efficiently in a distributed system.
|
||||
|
||||
Advantages of Kubernetes include:
|
||||
- Automation: Kubernetes automates tasks such as deployment, scheduling, load balancing, and fault recovery, reducing the amount of manual work required.
|
||||
- Scalability: Kubernetes can manage thousands of containerized applications in large-scale clusters, with good horizontal and vertical scalability.
|
||||
- Flexibility: Kubernetes supports multiple container runtimes and multiple cloud platforms, allowing applications to be deployed and managed in different environments.
|
||||
- Reliability: Kubernetes provides powerful fault recovery mechanisms and self-healing capabilities, ensuring high availability and reliability of applications.
|
||||
- Community support: Kubernetes is an active open-source project with a large community support and ecosystem, allowing for quick updates and support.
|
||||
|
||||
## Quick Start
|
||||
|
||||
If you want to deploy the Tailchat project on Kubernetes, you can find the prepared simple Tailchat deployment configuration in the `docker/simple/k8s` subdirectory of the project directory. These configuration files include Kubernetes resource definitions for running Tailchat, such as StatefulSet, Service, and dependencies such as databases and persistent storage. These resource definitions allow you to quickly deploy a simple Tailchat project on Kubernetes without manually creating and configuring these resources.
|
||||
|
||||
:::info
|
||||
Note that the deployed Tailchat in this tutorial does not include the complete Tailchat ecosystem, such as the **Open Platform** and **Admin Management Platform**.
|
||||
:::
|
||||
|
||||
### Environment Dependencies
|
||||
|
||||
To start this chapter, we assume that you have a working Kubernetes environment ready. This section does not describe how to set up a k8s environment.
|
||||
|
||||
### Getting Started
|
||||
|
||||
First, we need to clone the project repository:
|
||||
|
||||
```bash
|
||||
git clone git@github.com:msgbyte/tailchat.git
|
||||
```
|
||||
|
||||
Change the working directory to the configuration file directory:
|
||||
|
||||
```bash
|
||||
cd docker/simple/k8s
|
||||
```
|
||||
|
||||
At this point, you can see many prepared configuration files, and we can start by running a single command:
|
||||
|
||||
```bash
|
||||
kubectl apply -f namespace.yml -f pv.yml -f mongo.yml -f minio.yml -f redis.yml -f tailchat.yml
|
||||
```
|
||||
|
||||
This command will create the `namespace`, create `pv` and `pvc`, create `mongodb`, `minio`, `redis`, and other necessary third-party middleware, and finally start a multi-instance `tailchat` service.
|
||||
|
||||
You can check the status of each service using the following command:
|
||||
|
||||
```bash
|
||||
kubectl get svc -n tailchat
|
||||
```
|
||||
|
||||
### Routing and Load Balancing
|
||||
|
||||
When all services are ready, our Tailchat service is now running in the cluster, but we cannot access it because it has not been exposed to the outside.
|
||||
|
||||
For local testing, we can use the `port forward` function to map the port of a pod to the local machine. In a production environment, however, we need to build routing and forwarding.
|
||||
|
||||
Taking `traefik` as an example:
|
||||
|
||||
> Traefik is an open-source reverse proxy and load balancer designed specifically for routing and load balancing traffic in containerized applications and microservices architectures. Traefik supports multiple backend services, including Docker, Kubernetes, Mesos, Swarm, Consul, Etcd, and more. It can automatically discover and configure backend services and route traffic to the corresponding service instances based on rules.
|
||||
|
||||
#### Installing Helm and Adding Repository Address
|
||||
|
||||
The installation of `helm` is not discussed here. We execute the following command to add `traefik` to the repository list:
|
||||
|
||||
```bash
|
||||
helm repo add traefik https://helm.traefik.io/traefik
|
||||
```
|
||||
|
||||
#### Installing Traefik in the Tailchat Namespace
|
||||
|
||||
```bash
|
||||
helm install traefik traefik/traefik -n tailchat
|
||||
```
|
||||
|
||||
#### Starting Ingress Resource Declaration
|
||||
|
||||
```bash
|
||||
kubectl apply -f ingress.yml
|
||||
```
|
||||
|
||||
If everything is ok, you can see the following output using the following command:
|
||||
|
||||
```bash
|
||||
kubectl get services -n tailchat
|
||||
```
|
||||
|
||||

|
||||
|
||||
#### Setting up DNS Services
|
||||
|
||||
You can modify the domain address configuration in the `ingress.yml` mentioned above, which defaults to `http://tailchat.internal.com/`.
|
||||
|
||||
If you do not wish to modify or do not have a domain name, you can modify the `hosts` file to achieve this:
|
||||
|
||||
```bash
|
||||
sudo vim /etc/hosts
|
||||
```
|
||||
|
||||
Then add the following path:
|
||||
|
||||
```
|
||||
127.0.0.1 tailchat.internal.com
|
||||
```
|
||||
|
||||
Now you can open your browser and visit `http://tailchat.internal.com` to access the Tailchat service deployed on Kubernetes.
|
||||
|
||||
Of course, you can also check the availability of the service by visiting the following address:
|
||||
|
||||
```
|
||||
http://tailchat.internal.com/health
|
||||
```
|
||||
87
website/docs/deployment/other-way/manual.md
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Manual Deployment
|
||||
---
|
||||
|
||||
:::caution
|
||||
The content of this chapter requires you to have a certain degree of understanding of nodejs, git, linux. When there are problems such as dependency problems, environmental problems, system problems, etc., you need to have the ability to solve and troubleshoot problems by yourself.
|
||||
|
||||
If you do not understand this, it is not recommended that you use the contents of this chapter for deployment. It is recommended to use a unified image for deployment.
|
||||
:::
|
||||
|
||||
## Dependencies
|
||||
|
||||
- git
|
||||
- nodejs v16.18.0 or above
|
||||
- pnpm v8.3.1 or above
|
||||
- mongodb
|
||||
- redis
|
||||
- minio
|
||||
|
||||
## Download the source code
|
||||
|
||||
```bash
|
||||
mkdir msgbyte && cd msgbyte
|
||||
|
||||
git clone https://github.com/msgbyte/tailchat.git
|
||||
```
|
||||
|
||||
### Switch to stable code
|
||||
|
||||
Because the cloned code is the latest code, it may be unstable for a short period of time, so if you want to switch to the stable code of each version, you can use the tag function of git
|
||||
|
||||
For example, if you wanna use `v1.7.6`, you can use the command:
|
||||
|
||||
```bash
|
||||
git checkout v1.7.6
|
||||
```
|
||||
|
||||
## Compile the project
|
||||
|
||||
Tailchat is a front-end and back-end separated project. So we have to deal with the front-end code and the back-end code separately
|
||||
|
||||
### Install dependencies
|
||||
|
||||
We assume you have installed `nodejs v16.18.0+` or above. And installed `pnpm v8.3.1` or above
|
||||
|
||||
```bash
|
||||
cd tailchat
|
||||
pnpm install
|
||||
```
|
||||
|
||||
This command will take some time to install all the dependencies of Tailchat. When the installation is complete, the internal plug-in will automatically execute the compilation command.
|
||||
|
||||
### Building the project
|
||||
|
||||
```bash
|
||||
NODE_ENV=production pnpm build
|
||||
```
|
||||
|
||||
This command will execute the commands for compiling the front-end and back-end management terminals in parallel. And move the front-end product to the `server/dist/public` directory of the server
|
||||
|
||||
When the project is built, our product can run normally
|
||||
|
||||
:::caution
|
||||
Please build in `macos` / `linux` environment as much as possible, window does not necessarily fully support shell commands
|
||||
:::
|
||||
|
||||
## Run the project
|
||||
|
||||
In order to ensure the horizontal expansion of the project, although the core code of `Tailchat` is written in the same project, it can be divided into multiple subdivided microservices when it is actually started. Selectively enable different services by passing in a combination of different environment variables.
|
||||
|
||||
Create an environment variable file in the server directory using the `.env.example` directory as an example
|
||||
|
||||
```bash
|
||||
cp server/.env.example server/dist/.env
|
||||
vim .env
|
||||
```
|
||||
|
||||
Modify the necessary environment variables to your own, such as `MONGO_URL`, `REDIS_URL`, `MINIO_URL`
|
||||
|
||||
then start the service
|
||||
|
||||
```bash
|
||||
SERVICEDIR=services,plugins pnpm start:service
|
||||
```
|
||||
|
||||
> `SERVICEDIR` indicates the directory where the microservice is loaded
|
||||
26
website/docs/deployment/quickstart.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Quick Start
|
||||
---
|
||||
|
||||
## Demo environment
|
||||
|
||||
The demo environment will continuously deploy the latest front-end code and update the back-end code from time to time
|
||||
|
||||
[https://nightly.paw.msgbyte.com/](https://nightly.paw.msgbyte.com/)
|
||||
|
||||
## Deployment method
|
||||
|
||||
### Docker/Docker Compose
|
||||
|
||||
It is highly recommended to use `docker-compose` to deploy `tailchat`
|
||||
|
||||
Please refer to the tutorial: [Docker Compose Deployment](./docker-compose.mdx)
|
||||
|
||||
### Kubernetes
|
||||
|
||||
Please refer to the tutorial: [Kubernetes Simple Deployment](./other-way/kubernetes/simple.md)
|
||||
|
||||
## System Structure
|
||||
|
||||
See [System Architecture](../architecture.md)
|
||||
46
website/docs/deployment/smtp.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
sidebar_position: 10
|
||||
title: SMTP Service (optional)
|
||||
---
|
||||
|
||||
`Tailchat` includes email services, used in scenarios such as **password recovery**, **mail authentication**
|
||||
|
||||
Only simple mail service (SMTP) is used in `Tailchat` because only one-way sending mail is required and no receiving mail is required.
|
||||
|
||||
In order to enable the service, we need to set the following in the environment variable:
|
||||
|
||||
- `SMTP_SENDER`: sender information, the general format is `xxx@example.com` or `"YourName" xxx@example.com`
|
||||
- `SMTP_URI`: SMTP mail service address, follow the international common URI format: `<protocol>://<username>:<password>@<host>:<port>/<other-info>`
|
||||
|
||||
## Auxiliary testing using cli
|
||||
|
||||
If you are not familiar with SMTP service, in order to improve detection efficiency, you can choose to use `tailchat-cli` to quickly help you verify the reliability of SMTP service
|
||||
|
||||
> For usage of tailchat-cli, see [tailchat-cli](../cli/tailchat-cli.md)
|
||||
|
||||
```
|
||||
tailchat smtp
|
||||
|
||||
SMTP Service
|
||||
|
||||
Commands:
|
||||
tailchat smtp verify Verify smtp sender service
|
||||
tailchat smtp test Send test email with smtp service
|
||||
|
||||
Options:
|
||||
--version Show version number [boolean]
|
||||
-h, --help Show help [boolean]
|
||||
```
|
||||
|
||||
You can verify URI availability with `tailchat smtp verify`, no email is actually sent during this operation. Similar to account login
|
||||
|
||||
If there are still problems after the verification is passed, you can use `tailchat smtp test` to actually send a test email to help you troubleshoot the problem, because there are many possibilities in the actual production environment, such as bounced letters caused by audit problems of various service providers, such as The degree of verification is different. For example, some service providers allow custom sender names, and some have strict requirements on them.
|
||||
|
||||
|
||||
## SMTP_URI example
|
||||
|
||||
Because the services provided by different service providers are different, only some of the content can be cited here for demonstration. If you have other URIs that can be used as examples, please submit a PR to help us improve the documentation together:
|
||||
|
||||
- `smtps://<username>:<password>@smtp.exmail.qq.com/?pool=true`
|
||||
- `smtps://<username>:<password>@smtp.163.com/?pool=true`
|
||||
- `smtps://<qqNumber>:<password>@smtp.qq.com/?pool=true`
|
||||
103
website/docs/deployment/troubleshooting.md
Normal file
@@ -0,0 +1,103 @@
|
||||
---
|
||||
sidebar_position: 50
|
||||
title: Troubleshooting
|
||||
---
|
||||
|
||||
## Deployment related
|
||||
|
||||
### How to update the version?
|
||||
|
||||
It is the same as getting the image when deploying
|
||||
|
||||
```bash
|
||||
docker pull moonrailgun/tailchat
|
||||
docker tag moonrailgun/tailchat tailchat
|
||||
```
|
||||
|
||||
Then restart the application, such as `docker compose up -d`
|
||||
|
||||
### How to use the specified version?
|
||||
|
||||
```bash
|
||||
docker pull moonrailgun/tailchat:1.8.4
|
||||
docker tag moonrailgun/tailchat:1.8.4 tailchat
|
||||
```
|
||||
|
||||
Just specify the version number when pulling the image
|
||||
|
||||
## Server related
|
||||
|
||||
### The Websocket connection access is incorrect, the manifestation is that it can be registered but the main interface cannot be opened
|
||||
|
||||
If nginx is used for reverse proxy. Please ensure that the configuration of nginx supports websocket, a reference configuration is as follows:
|
||||
|
||||
```
|
||||
server {
|
||||
server_name demo.example.com;
|
||||
|
||||
listen 443 ssl;
|
||||
|
||||
access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-real-ip $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://127.0.0.1:11000/;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Internal Network can be accessed but External Network can not be accessed?
|
||||
|
||||
You can start a simple http service to see if it is a problem with the docker-proxy layer. *This problem may occur on the docker-ce image machine of Tencent lighthouse, you can choose to use the centos7 image to reinstall*
|
||||
|
||||
```bash
|
||||
docker run --rm --name nginx-test -p 8080:80 nginx
|
||||
```
|
||||
|
||||
### There will be a random hash volume at startup
|
||||
|
||||
See: [https://github.com/msgbyte/tailchat/issues/79](https://github.com/msgbyte/tailchat/issues/79)
|
||||
|
||||
### Getting `502 Invalid paramenters` when sending mail
|
||||
|
||||
If the prompt is similar to: `Error: Mail command failed: 502 Invalid paramenters`
|
||||
|
||||
```
|
||||
code:'EENVELOPE',
|
||||
response: '502 Invalid paramenters',
|
||||
responseCode: 502,
|
||||
command: 'MAIL FROM'
|
||||
```
|
||||
|
||||
Please check whether your `SMTP_SENDER` content is correct, the general format is `xxx@example.com` or `"YourName" xxx@example.com`
|
||||
|
||||
### Openapi service is always restart
|
||||
|
||||
If this throw error `Issuer Identifier must be a valid web uri`
|
||||
|
||||
you should make sure has been writing a url(`http://xxxx` or `https://xxxx`) in env `API_URL`
|
||||
|
||||
## Openapi platform related
|
||||
|
||||
If the open platform is deployed behind a proxy, if the endpoint in the JSON of the access `/open/.well-known/openid-configuration` result is incorrect, please try to modify the configuration of the proxy to forward real ip.
|
||||
|
||||
Such as nginx:
|
||||
|
||||
```
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_pass http://127.0.0.1:11000;
|
||||
proxy_redirect off;
|
||||
}
|
||||
```
|
||||
4
website/docs/devops/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Operations",
|
||||
"position": 15
|
||||
}
|
||||
22
website/docs/devops/mongodb.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Database management
|
||||
---
|
||||
|
||||
`Tailchat` uses mongodb as the main database to store user information
|
||||
|
||||
In `docker`, common operation and maintenance commands are as follows:
|
||||
|
||||
```bash
|
||||
# backup
|
||||
docker exec -i <IMAGE_NAME> mongodump -d tailchat --archive > ./backup.archive
|
||||
|
||||
# restore
|
||||
docker exec -i <IMAGE_NAME> mongorestore -d tailchat --archive < ./backup.archive
|
||||
```
|
||||
|
||||
Among them `<IMAGE_NAME>` represents the name of the mongodb image, and `-d tailchat` represents the name of the database used, the default database name is `tailchat`, you can modify it through the environment variable `MONGO_URL`
|
||||
|
||||
:::info
|
||||
For user data security, it is recommended to create a scheduled task to regularly back up the database file
|
||||
:::
|
||||
90
website/docs/intro.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Summary
|
||||
---
|
||||
|
||||
`Tailchat` is an open source IM application that is pluggable and easy to expand. Plugin architecture gives `Tailchat` unlimited possibilities.
|
||||
|
||||
Front-end micro-kernel architecture + back-end micro-service architecture makes `Tailchat` to control any customized/privatized scenarios
|
||||
|
||||
Created for enterprises and private domain users, highly free group management and customized panel display allow private domain owners to better display their works, manage users, and build their own brand and circle.
|
||||
|
||||
## Feature
|
||||
|
||||
- Complete basic ability of instant messaging
|
||||
- The free expansion ability endowed by the plugin architecture
|
||||
- The horizontal expansion capability endowed by the microservice architecture
|
||||
|
||||
## Highlight
|
||||
|
||||
- The front-end micro-kernel architecture based on [mini-star](https://ministar.moonrailgun.com/) and the back-end micro-service architecture based on [moleculer](https://moleculer.services/) can adapt to various user usage, easy to expand
|
||||
- A complete chat system that supports various syntaxes such as mentions, panel jumps, rich text, markdown, url links, etc.
|
||||
- Message reaction mechanism, allowing you to express yourself through expressions
|
||||
- File sharing and image sending
|
||||
- Support voice calls and video calls
|
||||
- Perfect identity group management, RBAC
|
||||
- User Management and User Muting
|
||||
- Email authentication and password retrieval
|
||||
- Various panels: web page embedding, custom html, topic panel
|
||||
- Simple message push and github notification subscription
|
||||
- Admin platform
|
||||
- Openapi platform
|
||||
- Bot
|
||||
- OAuth
|
||||
- More wonderful chemical reactions brought by plugins
|
||||
- custom theme
|
||||
- listen to music online
|
||||
- message encryption
|
||||
- fetch link metadata
|
||||
- Airdrop
|
||||
- Task
|
||||
- Draw
|
||||
- Font size
|
||||
- Toolbox
|
||||
- ...
|
||||
|
||||
## Technology Stack
|
||||
|
||||
- Frontend
|
||||
- `React`
|
||||
- `Redux`
|
||||
- `mini-star`
|
||||
- `tailwindcss`
|
||||
- `iconify`
|
||||
- Backend
|
||||
- `Nodejs`
|
||||
- `Socket.io`
|
||||
- `koa`
|
||||
- `moleculer`
|
||||
|
||||
## Screenshot
|
||||
|
||||
#### Overview
|
||||
|
||||

|
||||
|
||||
#### Plugin Center
|
||||
|
||||

|
||||
|
||||
#### Themes
|
||||
|
||||

|
||||
|
||||
#### Roles & Permission
|
||||
|
||||

|
||||
|
||||
#### Github Subscription Bot
|
||||
|
||||

|
||||
|
||||
#### Admin
|
||||
|
||||

|
||||
|
||||
## Open Source Agreement
|
||||
|
||||
For open source agreements, please mainly refer to the following documents:
|
||||
|
||||
[Apache 2.0](https://github.com/msgbyte/tailchat/blob/master/LICENSE)
|
||||
4
website/docs/meeting/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Video Conference",
|
||||
"position": 35
|
||||
}
|
||||
98
website/docs/meeting/agora.md
Normal file
@@ -0,0 +1,98 @@
|
||||
---
|
||||
sidebar_position: 10
|
||||
title: Agora Plugin Deployment Guide
|
||||
---
|
||||
|
||||
:::info
|
||||
The agora plugin needs to ensure that your `tailchat` image version is 1.4.0+
|
||||
:::
|
||||
|
||||
## Apply for projects on the agora platform
|
||||
|
||||
The Tailchat agora integration is an audio and video call function that relies on the agora service, so it needs to be registered on the agora platform before use.
|
||||
|
||||
Agora website: [https://www.agora.io/](https://www.agora.io/)
|
||||
|
||||
### Get configuration parameters
|
||||
|
||||
After registration/login, it will automatically jump to the console. Project configuration can be done in the console
|
||||
|
||||

|
||||
|
||||
If you have not created a project, you need to create a project first. As shown below
|
||||
|
||||

|
||||
|
||||
It is recommended to use safe mode to avoid being stolen by others.
|
||||
|
||||
Next we need to get some configuration items to configure the Tailchat's agora plugin.
|
||||
|
||||

|
||||
|
||||
In project configuration we can get `appid` and `app cert`. These two are the environment variables `AGORA_APP_ID` and `AGORA_APP_CERT` that we will use later
|
||||
|
||||
|
||||
### Get client credentials
|
||||
|
||||
In addition, we also need to obtain the customer's permission at the `RESTful API` in the upper right corner,
|
||||
|
||||
The operation is as shown in the figure:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
In this way we get two other environment variables: `AGORA_CUSTOMER_KEY` and `AGORA_CUSTOMER_SECRET`.
|
||||
|
||||
Our initial preparations are complete
|
||||
|
||||
## Install plugin
|
||||
|
||||
At present, the server-side plugin of the Agora plugin has been installed by default, and you do not need to do anything. However, environment variables need to be configured for use.
|
||||
|
||||
### Configure environment variables
|
||||
|
||||
To configure environment variables, see [environment variables](../deployment/environment.md)
|
||||
|
||||
The agora plugin requires environment variables as follows:
|
||||
|
||||
- `AGORA_APP_ID`: the application id of the Agora project
|
||||
- `AGORA_APP_CERT`: AGORA project certificate
|
||||
- `AGORA_CUSTOMER_KEY`: AGORA customer id
|
||||
- `AGORA_CUSTOMER_SECRET`: AGORA customer secret key
|
||||
|
||||
These environment variables can be obtained in the above tutorial.
|
||||
|
||||
After configuring the environment variables, every will be final
|
||||
|
||||
|
||||
## Application service status callback
|
||||
|
||||
:::info
|
||||
you can skip it if you dont need it.
|
||||
:::
|
||||
|
||||
In order to synchronize the call status to `Tailchat`, it is necessary to apply for a server callback in Agora.
|
||||
|
||||
In project configuration, we need to enable `Notification Center Service Configuration` in `Service Config`
|
||||
|
||||

|
||||
|
||||
Need to subscribe to the following events:
|
||||
|
||||
- channel create=101
|
||||
- channel destroy=102
|
||||
- broadcaster join channel=103
|
||||
- broadcaster leave channel=104
|
||||
|
||||
The receiving server URL is generally: `https://<YOUR SERVER DOMAIN>/api/plugin:com.msgbyte.agora/webhook`, where `<YOUR SERVER DOMAIN>` is replaced with your `Tailchat` domain name.
|
||||
|
||||
:::info
|
||||
The service of Agora will check the connectivity of the server, so it is necessary to configure the environment variables and start the service before performing this step.
|
||||
|
||||
In addition, the Agora needs to configure `https` and `webrtc` service also depends on `https`, so you need to ensure that the server gateway supports the `https` protocol
|
||||
:::
|
||||
|
||||
After the configuration is complete, you will see the following prompt. It will take effect after the confirmation of the staff of the agora.
|
||||
|
||||

|
||||
100
website/docs/meeting/deployment.md
Normal file
@@ -0,0 +1,100 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
title: Deploy Tailchat Meeting
|
||||
---
|
||||
|
||||
:::info
|
||||
The `Tailchat Meeting` solution is currently not integrated with `Tailchat`, if you want to use the video conferencing solution in Tailchat, please choose `agora` or `livekit` solution
|
||||
:::
|
||||
|
||||
The video conferencing service `Tailchat Meeting` can exist as an independent application. In this section, we will describe how to deploy `Tailchat Meeting` independently
|
||||
|
||||
The following content is based on the `docker` environment, please ensure that the server has the most basic `docker` environment.
|
||||
|
||||
If you haven't installed `docker` + `docker-compose`, you can check the document [Install docker environment](../deployment/install-docker.md)
|
||||
|
||||
## Fast deployment
|
||||
|
||||
```bash
|
||||
git clone https://github.com/msgbyte/tailchat-meeting --depth=1
|
||||
```
|
||||
|
||||
> NOTE: Next, the host mode of docker will be used for installation. That means, `docker-compose` will automatically bind the host port
|
||||
|
||||
The ports that need to be reserved by the server are as follows:
|
||||
- swag (server gateway, nginx enhanced version, the port can be modified through the configuration file tailchat-meeting/compose/nginx.conf)
|
||||
- 80
|
||||
- 443
|
||||
- tailchat-meeting
|
||||
- 13001
|
||||
- 40000-49999 (for RTC service, dynamic occupancy)
|
||||
-redis
|
||||
- 6379
|
||||
|
||||
**The above ports will be exposed on the host machine. For the sake of server security, it is recommended to configure a suitable firewall policy, and only expose the necessary ports 443 and 40000-49999**
|
||||
|
||||
```bash
|
||||
cd tailchat-meeting/compose
|
||||
cp docker-compose.env.example docker-compose.env
|
||||
vi docker-compose.env
|
||||
```
|
||||
|
||||
Modify environment variables.
|
||||
The environment variables are as follows:
|
||||
|
||||
```
|
||||
# Internal IP
|
||||
MEDIASOUP_IP=
|
||||
# Public IP
|
||||
MEDIASOUP_ANNOUNCED_IP=
|
||||
|
||||
# swag
|
||||
URL=
|
||||
SUBDOMAINS=
|
||||
TZ=Asia/Shanghai
|
||||
```
|
||||
|
||||
其中
|
||||
|
||||
- If you only deploy on a single machine, `MEDIASOUP_IP` and `MEDIASOUP_ANNOUNCED_IP` can both fill in the public network ip of the server, **But for service providers with flexible deployment networks (such as domestic AWS, Tencent Cloud, Alibaba Cloud, etc.) must strictly follow the notes to fill in the internal IP and public network IP** (because the external network IP provided by this type of service provider is not bound to the network card)
|
||||
- `tailchat-meeting` is based on **webrtc** service, so it strongly depends on https/wss protocol. The swag service can automatically apply for an https certificate for you, but you must assign a valid domain name and ensure that the dns point has been pointed to the server.
|
||||
- More related documents can be viewed [README](https://github.com/linuxserver/docker-letsencrypt/blob/master/README.md)
|
||||
- Sample configuration:
|
||||
```bash
|
||||
URL=meeting.example.com # 这里请填入
|
||||
SUBDOMAINS= # 该参数用于多域名证书申请,可留空
|
||||
```
|
||||
|
||||
|
||||
After the modification, you can directly execute the following command
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
`docker compose` will automatically download images from the network and build `tailchat-meeting`
|
||||
|
||||
Building may take time and resources. Especially for building the frontend code, please be patient if you use a server with a low server.
|
||||
|
||||
> In the real world test, the time-consuming reference of a small resource server with 1 core and 2G is as follows:
|
||||
> - Download dependencies: 3 minutes
|
||||
> - Compile frontend code: 5 minutes
|
||||
|
||||
Visit `https://meeting.example.com` to see `tailchat-meeting` page
|
||||
|
||||
## Combined usage
|
||||
|
||||
For fool-proof deployment, it only needs one command to execute. If there are ready-made gateway services (such as nginx, caddy, etc.) and redis instances, you can selectively start the services.
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
docker compose up tailchat-meeting -d # Only run the tailchat-meeting instance
|
||||
```
|
||||
|
||||
|
||||
## Reasons for using host mode
|
||||
|
||||
The core RTC service of `tailchat-meeting` needs to apply for a port at runtime, but this function cannot be realized for docker. Pre-applying for a certain range of port bindings will not only waste meaningless ports, but also occupy a lot of resources and kill the system instantly when starting.
|
||||
|
||||
**It should be noted that please do not expose the 6379 port where redis is located, which may cause security risks. **
|
||||
BIN
website/docs/meeting/images/1.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
website/docs/meeting/images/2.png
Normal file
|
After Width: | Height: | Size: 214 KiB |
BIN
website/docs/meeting/images/3.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
website/docs/meeting/images/4.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
website/docs/meeting/images/5.png
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
website/docs/meeting/images/6.png
Normal file
|
After Width: | Height: | Size: 296 KiB |
BIN
website/docs/meeting/images/7.png
Normal file
|
After Width: | Height: | Size: 138 KiB |
47
website/docs/meeting/intro.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Summary
|
||||
---
|
||||
|
||||
:::info
|
||||
Video Conference solutions require SSL support, so only websites that support https will work properly
|
||||
:::
|
||||
|
||||
`Tailchat` provides those solutions for video and voice calls, you can choose according to the actual situation:
|
||||
- ~~`tailchat-meeting` self-deploying video conferencing (WIP)~~
|
||||
- `agora` Acoustic Network integration, for details, see: [Acoustic Network Plug-in Deployment Guide](./agora.md)
|
||||
- `livekit` Allow self-host solution: [Livekit Plugin Deployment Guide](./livekit.md)
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Collapsed content is outdated</summary>
|
||||
|
||||
## Tailchat Meeting
|
||||
|
||||
The video conferencing module is an important part of the suite of `Tailchat` series. Capabilities are provided as follows:
|
||||
- Voice communication
|
||||
- Video session
|
||||
- screen sharing
|
||||
- virtual background
|
||||
- file transfer
|
||||
- chat record
|
||||
|
||||
At the same time, `tailchat-meeting` can also exist as an independent product, and you can quickly initiate/join meetings without logging in
|
||||
|
||||
### Project repository
|
||||
|
||||
- Open source address: [https://github.com/msgbyte/tailchat-meeting](https://github.com/msgbyte/tailchat-meeting)
|
||||
- Open source agreement: Apache 2.0
|
||||
|
||||
:::info Open source statement
|
||||
This project is based on secondary development of [edumeet](https://github.com/edumeet/edumeet) and [mediasoup](https://github.com/versatica/mediasoup).
|
||||
|
||||
On this basis, function addition, SDK implementation and code optimization were carried out. If you want to find a looser implementation of the open source protocol (MIT + ISC protocol), you can take a look at these two projects
|
||||
:::
|
||||
|
||||
|
||||
### Project Architecture
|
||||
|
||||

|
||||
|
||||
</details>
|
||||