Skip to content

Commit

Permalink
💄 style: update brand and improve docs (lobehub#2917)
Browse files Browse the repository at this point in the history
* 💄 style: update logo style

* ♻️ refactor: hide webrtc sync by default

* 🔧 chore: improve db migration script

* 💄 style: rename to assistant

* 💄 style: update brand

* 💄 style: update brand

* ⚡️ perf: dynamic pwa install

* ✅ test: fix tests

* 📝 docs: update docs

* 📝 docs: update env

* 📝 docs: update docs
  • Loading branch information
arvinxx authored Jun 18, 2024
1 parent cd9a143 commit 2b54cae
Show file tree
Hide file tree
Showing 46 changed files with 182 additions and 130 deletions.
52 changes: 52 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,55 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# set the plugin settings
# the format is `plugin-identifier:key1=value1;key2=value2`, multiple settings fields are separated by semicolons `;`, multiple plugin settings are separated by commas `,`.
# PLUGIN_SETTINGS=search-engine:SERPAPI_API_KEY=xxxxx


########################################
##### S3 Object Storage Service ########
########################################

# S3 keys
#S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6
#S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2

# Bucket name
#S3_BUCKET=lobechat

# Bucket request endpoint
#S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com

# Public access domain for the bucket
#NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com

# Bucket region, such as us-west-1, generally not needed to add
# but some service providers may require configuration
# S3_REGION=us-west-1


########################################
############ Auth Service ##############
########################################


# Clerk related configurations

# Clerk public key and secret key
#NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
#CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx

# you need to config the clerk webhook secret key if you want to use the clerk with database
#CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx


########################################
########## Server Database #############
########################################

# Specify the service mode as server if you want to use the server database
#NEXT_PUBLIC_SERVICE_MODE=server

# Postgres database URL
#DATABASE_URL=postgres://username:password@host:port/database

# use `openssl rand -base64 32` to generate a key for the encryption of the database
# we use this key to encrypt the user api key
#KEY_VAULTS_SECRET=xxxxx/xxxxxxxxxxxxxx=
24 changes: 13 additions & 11 deletions docs/self-hosting/advanced/feature-flags.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,21 @@ All features are controlled by the `FEATURE_FLAGS` variable as the sole configur
You can achieve various feature combinations using the above configuration syntax. All feature flags are Boolean values, enabled with `+` and disabled with `-`.

<Callout type={'tip'}>
Attention: Unlike the `OPENAI_MODEL_LIST` variable, the `FEATURE_FLAGS` variable does not support the `all` keyword. You need to manually control all feature flags (otherwise, they will adopt their default values).
Attention: Unlike the `OPENAI_MODEL_LIST` variable, the `FEATURE_FLAGS` variable does not support
the `all` keyword. You need to manually control all feature flags (otherwise, they will adopt
their default values).
</Callout>

| Configuration Item | Description | Default Value |
| ------------------------- | --------------------------------- | ------------- |
| `webrtc_sync` | Enables WebRTC sync functionality.| Enabled |
| `language_model_settings` | Enables language model settings. | Enabled |
| `openai_api_key` | Allows users to customize the OpenAI API Key. | Enabled |
| Configuration Item | Description | Default Value |
| ------------------------- | ----------------------------------------------- | ------------- |
| `webrtc_sync` | Enables WebRTC sync functionality. | Disabled |
| `language_model_settings` | Enables language model settings. | Enabled |
| `openai_api_key` | Allows users to customize the OpenAI API Key. | Enabled |
| `openai_proxy_url` | Allows users to customize the OpenAI proxy URL. | Enabled |
| `create_session` | Allows users to create sessions. | Enabled |
| `edit_agent` | Allows users to edit assistants. | Enabled |
| `dalle` | Enables the DALL-E functionality. | Enabled |
| `check_updates` | Allows checking for updates. | Enabled |
| `welcome_suggest` | Displays welcome suggestions. | Enabled |
| `create_session` | Allows users to create sessions. | Enabled |
| `edit_agent` | Allows users to edit assistants. | Enabled |
| `dalle` | Enables the DALL-E functionality. | Enabled |
| `check_updates` | Allows checking for updates. | Enabled |
| `welcome_suggest` | Displays welcome suggestions. | Enabled |

You can always check the [featureFlags](https://github.com/lobehub/lobe-chat/blob/main/src/config/featureFlags/schema.ts) to get the latest list of feature flags.
2 changes: 1 addition & 1 deletion docs/self-hosting/advanced/feature-flags.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tags:

| 配置项 | 解释 | 默认值 |
| ------------------------- | -------------------------------- | ------ |
| `webrtc_sync` | 启用 WebRTC 同步功能。 | 开启 |
| `webrtc_sync` | 启用 WebRTC 同步功能。 | 关闭 |
| `language_model_settings` | 启用语言模型设置。 | 开启 |
| `openai_api_key` | 允许用户自定义 OpenAI API Key。 | 开启 |
| `openai_proxy_url` | 允许用户自定义 OpenAI 代理 URL。 | 开启 |
Expand Down
19 changes: 7 additions & 12 deletions docs/self-hosting/advanced/server-database.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ NEXT_PUBLIC_SERVICE_MODE=server

An example of how to fill in Vercel is shown below:

{' '}

<Image
alt={'Add Serverless Postgres DATABASE_URL'}
src={'https://github.com/lobehub/lobe-chat/assets/28616219/d4a710cd-6404-4196-90d0-cd08ca385074'}
Expand All @@ -67,8 +65,6 @@ NEXT_PUBLIC_SERVICE_MODE=server

An example of how to fill in Vercel is shown below:

{' '}

<Image
alt={'Add Node Postgres DATABASE_URL'}
src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c689738-809b-4199-b305-ba5770d39da7'}
Expand Down Expand Up @@ -96,7 +92,7 @@ A server-side database needs to be paired with an identity authentication servic

<Callout type={'warning'}>
Due to workload constraints, currently only Clerk is supported as an identity authentication
service solution. Integration with Next-Auth for server-side database is under development.{' '}
service solution. Integration with Next-Auth for server-side database is under development.
</Callout>

<Steps>
Expand Down Expand Up @@ -143,7 +139,7 @@ We need to add an endpoint in Clerk's Webhooks to inform Clerk to send notificat
alt={'Add an endpoint in Clerk Webhooks'}
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'}
>
{' '}

</Image>

Fill in your Vercel project's URL in the endpoint, such as `https://your-project.vercel.app/api/webhooks/clerk`. Then, in the Subscribe to events section, check the three user events (`user.created`, `user.deleted`, `user.updated`), and click create.
Expand Down Expand Up @@ -185,10 +181,9 @@ You have now successfully configured the Clerk identity authentication service.
LobeChat has long supported multimodal AI conversations, involving the function of uploading images to AI. In the client-side database solution, image files are stored as binary data in the browser's indexedDB database. However, this solution is not feasible in the server-side database. We need to configure the S3 storage service to store a large number of image files, and S3 can also serve as a storage solution for file uploads.

<Callout type={'info'}>
{' '}
In this article, S3 refers to a compatible S3 storage solution, which supports object storage systems
In this article, S3 refers to a compatible S3 storage solution, which supports object storage systems
that comply with the Amazon S3 API. Common examples include Cloudflare R2 etc., all of which support
S3-compatible APIs.{' '}
S3-compatible APIs.
</Callout>

<Steps>
Expand Down Expand Up @@ -228,7 +223,7 @@ S3_BUCKET=lobechat
# Bucket request endpoint
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
# Public domain for accessing the bucket
NEXT_PUBLIC_S3_DOMAIN=https://s3-dev.your-domain.com
NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com
```

### Obtain S3 Key Environment Variables
Expand Down Expand Up @@ -282,7 +277,7 @@ S3_BUCKET=lobechat
# Bucket request endpoint
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
# Public domain for accessing the bucket
NEXT_PUBLIC_S3_DOMAIN=https://s3-dev.your-domain.com
NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com

# Bucket region, such as us-west-1, generally not required to add, but some service providers may need to configure
# S3_REGION=us-west-1
Expand Down Expand Up @@ -386,7 +381,7 @@ S3_BUCKET=lobechat
# Bucket request endpoint
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
# Public access domain for the bucket
NEXT_PUBLIC_S3_DOMAIN=https://s3-dev.your-domain.com
NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com
# Bucket region, such as us-west-1, generally not needed to add, but some service providers may require configuration
# S3_REGION=us-west-1
```
4 changes: 2 additions & 2 deletions docs/self-hosting/advanced/server-database.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ S3_BUCKET=lobechat
# 存储桶的请求端点
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
# 存储桶对外的访问域名
NEXT_PUBLIC_S3_DOMAIN=https://s3-dev.your-domain.com
NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com
```

### 获取 S3 密钥环境变量
Expand Down Expand Up @@ -370,7 +370,7 @@ S3_BUCKET=lobechat
# 存储桶的请求端点
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
# 存储桶对外的访问域名
NEXT_PUBLIC_S3_DOMAIN=https://s3-dev.your-domain.com
NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com
# 桶的区域,如 us-west-1,一般来说不需要添加,但某些服务商则需要配置
# S3_REGION=us-west-1
```
2 changes: 1 addition & 1 deletion docs/self-hosting/advanced/upstream-sync.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ echo "Removed old images."
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
```

</Steps>
</Steps>
16 changes: 8 additions & 8 deletions docs/usage/features/auth.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Support Multi-User Management


<Image
alt={'Identity Verification System'}
cover
Expand All @@ -18,12 +17,13 @@ LobeChat integrates `next-auth`, a flexible and powerful identity verification l
- **Social Login**: Support quick login via various social platforms.
- **Data Security**: Ensure the security and privacy of user data.


<Callout type={'warning'}>
Due to workload constraints, integration of next-auth with a server-side database has not been implemented yet. If you need to use a server-side database, please use Clerk. </Callout>
Due to workload constraints, integration of next-auth with a server-side database has not been implemented yet. If you need to use a server-side database, please use Clerk.
</Callout>

<Callout type={'info'}>
For information on using Next-Auth, you can refer to [Authentication Services - Next Auth](/en-US/docs/self-hosting/advanced/authentication#next-auth). </Callout>
For information on using Next-Auth, you can refer to [Authentication Services - Next Auth](/docs/self-hosting/advanced/authentication#next-auth).
</Callout>

## Clerk: Modern User Management Platform

Expand All @@ -35,10 +35,10 @@ For users requiring advanced user management features, LobeChat also supports [C
- **Scalability**: Supports complex user management requirements.

<Callout type={'info'}>
For information on using Clerk, you can refer to [Authentication Services - Clerk](/en-US/docs/self-hosting/advanced/authentication#clerk). </Callout>

For information on using Clerk, you can refer to [Authentication Services - Clerk](/docs/self-hosting/advanced/authentication#clerk).
</Callout>

<Callout type={'tip'}>
If you need to use Clerk in conjunction with a server-side database, you can refer to the "Configuring Authentication Services" section in [Deploying with a Server-Side Database](/en-US/docs/self-hosting/advanced/server-database). </Callout>

If you need to use Clerk in conjunction with a server-side database, you can refer to the "Configuring Authentication Services" section in [Deploying with a Server-Side Database](/docs/self-hosting/advanced/server-database).
</Callout>

1 change: 0 additions & 1 deletion docs/usage/features/auth.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ LobeChat 集成了 `next-auth`,一个灵活且强大的身份验证库,支
- **登录活动监控**:实时监控用户登录活动,确保账户安全。
- **扩展性**:支持复杂的用户管理需求。


<Callout type={'info'}>
关于 Clerk 的使用,可以查阅 [身份验证服务 - Clerk](/zh/docs/self-hosting/advanced/authentication#clerk)
</Callout>
Expand Down
2 changes: 0 additions & 2 deletions docs/usage/features/database.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ cover
src={'https://github.com/lobehub/lobe-chat/assets/17870709/acf39ea2-74b3-46ae-8eb8-54a51f7f1d36'}
/>


In modern application development, the choice of data storage solution is crucial. To meet the needs of different users, LobeChat offers flexible configurations that support both local and server-side databases. Whether you prioritize data privacy and control or seek a convenient user experience, LobeChat can provide excellent solutions for you.

## Local Database: Data Control and Privacy Protection
Expand All @@ -26,7 +25,6 @@ For users who prefer more control over their data and value privacy protection,

Additionally, we have introduced Conflict-Free Replicated Data Type (CRDT) technology to ensure a seamless multi-device synchronization experience. This experimental feature aims to provide users with greater autonomy and data security.


<Callout type={'info'}>LobeChat defaults to the local database solution to reduce the onboarding cost for new users.</Callout>

Furthermore, we have attempted to introduce CRDT technology to achieve cross-device synchronization based on the local database. This experimental feature aims to provide users with greater autonomy and data security.
Expand Down
2 changes: 1 addition & 1 deletion locales/ar/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"about": "حول",
"advanceSettings": "إعدادات متقدمة",
"appInitializing": "جاري تهيئة LobeChat، يرجى الانتظار ...",
"appInitializing": "جاري تشغيل التطبيق، يرجى الانتظار...",
"autoGenerate": "توليد تلقائي",
"autoGenerateTooltip": "إكمال تلقائي بناءً على الكلمات المقترحة لوصف المساعد",
"autoGenerateTooltipDisabled": "الرجاء إدخال كلمة تلميح قبل تفعيل وظيفة الإكمال التلقائي",
Expand Down
2 changes: 1 addition & 1 deletion locales/bg-BG/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"about": "Относно",
"advanceSettings": "Разширени настройки",
"appInitializing": "LobeChat се инициализира, моля изчакайте...",
"appInitializing": "Приложението се стартира, моля, бъдете търпеливи...",
"autoGenerate": "Автоматично генериране",
"autoGenerateTooltip": "Автоматично генериране на описание на агент въз основа на подкани",
"autoGenerateTooltipDisabled": "Моля, попълнете подсказката, за да използвате функцията за автоматично допълване",
Expand Down
2 changes: 1 addition & 1 deletion locales/de-DE/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"about": "Über",
"advanceSettings": "Erweiterte Einstellungen",
"appInitializing": "LobeChat wird initialisiert. Bitte haben Sie einen Moment Geduld...",
"appInitializing": "Die App wird gestartet, bitte haben Sie etwas Geduld...",
"autoGenerate": "Automatisch generieren",
"autoGenerateTooltip": "Assistentenbeschreibung automatisch auf Basis von Vorschlägen vervollständigen",
"autoGenerateTooltipDisabled": "Bitte geben Sie einen Hinweis ein, um die automatische Vervollständigung zu aktivieren",
Expand Down
28 changes: 14 additions & 14 deletions locales/en-US/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"ModelSwitch": {
"title": "Model"
},
"agentDefaultMessage": "Hello, I'm **{{name}}**. You can start chatting with me right away, or go to [Agent Settings](/chat/settings#session={{id}}) to complete my information.",
"agentDefaultMessage": "Hello, I'm **{{name}}**. You can start chatting with me right away, or go to [Assistant Settings](/chat/settings#session={{id}}) to complete my information.",
"agentDefaultMessageWithSystemRole": "Hello, I'm **{{name}}**, {{systemRole}}. Let's start chatting!",
"agentsAndConversations": "Agents and Conversations",
"agentsAndConversations": "Assistants and Conversations",
"backToBottom": "Back to bottom",
"clearCurrentMessages": "Clear current session messages",
"confirmClearCurrentMessages": "You are about to clear the current session messages. Once cleared, they cannot be retrieved. Please confirm your action.",
"confirmRemoveSessionItemAlert": "You are about to delete this agent. Once deleted, it cannot be retrieved. Please confirm your action.",
"confirmRemoveSessionSuccess": "Agent removed successfully",
"defaultAgent": "Default Agent",
"confirmRemoveSessionItemAlert": "You are about to delete this assistant. Once deleted, it cannot be retrieved. Please confirm your action.",
"confirmRemoveSessionSuccess": "Assistant removed successfully",
"defaultAgent": "Default Assistant",
"defaultList": "Default List",
"defaultSession": "Default Agent",
"defaultSession": "Default Assistant",
"duplicateSession": {
"loading": "Copying...",
"success": "Copy successful",
Expand All @@ -22,7 +22,7 @@
"emptyAgent": "No assistant available",
"historyRange": "History Range",
"inbox": {
"desc": "Activate the brain cluster and spark creative thinking. Your virtual agent is here to communicate with you about everything.",
"desc": "Activate the brain cluster and spark creative thinking. Your virtual assistant is here to communicate with you about everything.",
"title": "Just Chat"
},
"input": {
Expand All @@ -39,20 +39,20 @@
"delAndRegenerate": "Delete and Regenerate",
"regenerate": "Regenerate"
},
"newAgent": "New Agent",
"newAgent": "New Assistant",
"pin": "Pin",
"pinOff": "Unpin",
"regenerate": "Regenerate",
"roleAndArchive": "Role and Archive",
"searchAgentPlaceholder": "Search agents and conversations...",
"searchAgentPlaceholder": "Search assistants and conversations...",
"sendPlaceholder": "Type your message here...",
"sessionGroup": {
"config": "Group Management",
"confirmRemoveGroupAlert": "This group is about to be deleted. After deletion, the agents in this group will be moved to the default list. Please confirm your operation.",
"createAgentSuccess": "Agent created successfully",
"confirmRemoveGroupAlert": "This group is about to be deleted. After deletion, the assistants in this group will be moved to the default list. Please confirm your operation.",
"createAgentSuccess": "Assistant created successfully",
"createGroup": "Add New Group",
"createSuccess": "Created successfully",
"creatingAgent": "Creating agent...",
"creatingAgent": "Creating assistant...",
"inputPlaceholder": "Please enter group name...",
"moveGroup": "Move to Group",
"newGroup": "New Group",
Expand All @@ -71,7 +71,7 @@
"withBackground": "Include Background Image",
"withFooter": "Include Footer",
"withPluginInfo": "Include Plugin Information",
"withSystemRole": "Include Agent Role Setting"
"withSystemRole": "Include Assistant Role Setting"
},
"stt": {
"action": "Voice Input",
Expand Down Expand Up @@ -124,7 +124,7 @@
"action": "Text-to-Speech",
"clear": "Clear Speech"
},
"updateAgent": "Update Agent Information",
"updateAgent": "Update Assistant Information",
"upload": {
"actionFiletip": "Update File",
"actionTooltip": "Upload Image",
Expand Down
Loading

0 comments on commit 2b54cae

Please sign in to comment.