Skip to content

Commit

Permalink
📝 docs: Add wiki toc
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Dec 14, 2023
1 parent 39f674e commit 0878f2b
Show file tree
Hide file tree
Showing 16 changed files with 118 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/Deployment/Analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

To better analyze the usage of LobeChat users, we have integrated several free/open-source data statistics services in LobeChat for collecting user usage data, which you can enable as needed.

#### TOC

- [Vercel Analytics](#vercel-analytics)
- [🚧 Posthog](#-posthog)

## Vercel Analytics

[Vercel Analytics](https://vercel.com/analytics) is a data analysis service launched by Vercel, which can help you collect website visit information, including traffic, sources, and devices used for access.
Expand Down
5 changes: 5 additions & 0 deletions docs/Deployment/Analytics.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

为更好地帮助分析 LobeChat 的用户使用情况,我们在 LobeChat 中集成了若干免费 / 开源的数据统计服务,用于收集用户的使用情况,你可以按需开启。

#### TOC

- [Vercel Analytics](#vercel-analytics)
- [🚧 Posthog](#-posthog)

## Vercel Analytics

[Vercel Analytics](https://vercel.com/analytics) 是 Vercel 推出的一款数据分析服务,它可以帮助你收集网站的访问情况,包括访问量、访问来源、访问设备等等。
Expand Down
7 changes: 7 additions & 0 deletions docs/Deployment/Docker-Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

We provide [Docker Images][docker-release-link] for you to deploy LobeChat service on your private device.

#### TOC

- [Install Docker container environment](#install-docker-container-environment)
- [Deploy container image](#deploy-container-image)
- [`A` Command deployment (recommended)](#a-command-deployment-recommended)
- [`B` Docker Compose](#b-docker-compose)

## Install Docker container environment

If already installed, skip this step.
Expand Down
7 changes: 7 additions & 0 deletions docs/Deployment/Docker-Deployment.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

我们提供了 [Docker 镜像][docker-release-link],供你在自己的私有设备上部署 LobeChat 服务

#### TOC

- [安装 Docker 容器环境](#安装-docker-容器环境)
- [部署容器镜像](#部署容器镜像)
- [`A` 指令部署(推荐)](#a-指令部署推荐)
- [`B` Docker Compose](#b-docker-compose)

## 安装 Docker 容器环境

如果已安装,请跳过此步
Expand Down
10 changes: 10 additions & 0 deletions docs/Development/Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

LobeChat is an AI conversation application built on the Next.js framework, aiming to provide an AI productivity platform that enables users to interact with AI through natural language. The following is an overview of the architecture design of LobeChat:

#### TOC

- [Application Architecture Overview](#application-architecture-overview)
- [Frontend Architecture](#frontend-architecture)
- [Edge Runtime API](#edge-runtime-api)
- [Agents Market](#agents-market)
- [Plugin Market](#plugin-market)
- [Security and Performance Optimization](#security-and-performance-optimization)
- [Development and Deployment Process](#development-and-deployment-process)

## Application Architecture Overview

The overall architecture of LobeChat consists of the frontend, EdgeRuntime API, Agents Market, Plugin Market, and independent plugins. These components collaborate to provide a complete AI experience.
Expand Down
10 changes: 10 additions & 0 deletions docs/Development/Architecture.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

LobeChat 是一个基于 Next.js 框架构建的 AI 会话应用,旨在提供一个 AI 生产力平台,使用户能够与 AI 进行自然语言交互。以下是 LobeChat 的架构设计介稿:

#### TOC

- [应用架构概览](#应用架构概览)
- [前端架构](#前端架构)
- [Edge Runtime API](#edge-runtime-api)
- [Agents 市场](#agents-市场)
- [插件市场](#插件市场)
- [安全性和性能优化](#安全性和性能优化)
- [开发和部署流程](#开发和部署流程)

## 应用架构概览

LobeChat 的整体架构由前端、EdgeRuntime API、Agents 市场、插件市场和独立插件组成。这些组件相互协作,以提供完整的 AI 体验。
Expand Down
9 changes: 9 additions & 0 deletions docs/Development/Chat-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

The implementation of LobeChat's large model AI mainly relies on OpenAI's API, including the core conversation API on the backend and the integrated API on the frontend. Next, we will introduce the implementation approach and code for the backend and frontend separately.

#### TOC

- [Backend Implementation](#backend-implementation)
- [Core Conversation API](#core-conversation-api)
- [Conversation Result Processing](#conversation-result-processing)
- [Frontend Implementation](#frontend-implementation)
- [Frontend Integration](#frontend-integration)
- [Using Streaming to Get Results](#using-streaming-to-get-results)

## Backend Implementation

The following code removes authentication, error handling, and other logic, retaining only the core functionality logic.
Expand Down
9 changes: 9 additions & 0 deletions docs/Development/Chat-API.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

LobeChat 的大模型 AI 实现主要依赖于 OpenAI 的 API,包括后端的核心会话 API 和前端的集成 API。接下来,我们将分别介绍后端和前端的实现思路和代码。

#### TOC

- [后端实现](#后端实现)
- [核心会话 API](#核心会话-api)
- [会话结果处理](#会话结果处理)
- [前端实现](#前端实现)
- [前端集成](#前端集成)
- [使用流式获取结果](#使用流式获取结果)

## 后端实现

以下代码中移除了鉴权、错误处理等逻辑,仅保留了核心的主要功能逻辑。
Expand Down
8 changes: 8 additions & 0 deletions docs/Development/Feature-Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ LobeChat is built on the Next.js framework and uses TypeScript as the primary de

Taking the "Chat Messages" feature as an example, here are the brief steps to implement this feature:

#### TOC

- [1. Define Routes](#1-define-routes)
- [2. Define Data Structure](#2-define-data-structure)
- [3. Create Zustand Store](#3-create-zustand-store)
- [4. Create Page and Components](#4-create-page-and-components)
- [5. Function Binding](#5-function-binding)

## 1. Define Routes

In the `src/app` directory, we need to define a new route to host the "Chat Messages" page. Generally, we would create a new folder under `src/app`, for example, `chat`, and create a `page.tsx` file within this folder to export a React component as the main body of the page.
Expand Down
8 changes: 8 additions & 0 deletions docs/Development/Feature-Development.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ LobeChat 基于 Next.js 框架构建,使用 TypeScript 作为主要开发语

我们以 "会话消息" 功能为例,以下是实现这个功能的简要步骤:

#### TOC

- [1. 定义路由](#1-定义路由)
- [2. 定义数据结构](#2-定义数据结构)
- [3. 创建 Zustand Store](#3-创建-zustand-store)
- [4. 创建页面与组件](#4-创建页面与组件)
- [5. 功能绑定](#5-功能绑定)

## 1. 定义路由

`src/app` 目录下,我们需要定义一个新的路由来承载 "会话消息" 页面。一般来说,我们会在 `src/app` 下创建一个新的文件夹,例如 `chat`,并且在这个文件夹中创建 `page.tsx`文件,在该文件中导出 React 组件作为页面的主体。
Expand Down
7 changes: 7 additions & 0 deletions docs/Development/Steup-Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

Welcome to the LobeChat development environment setup guide.

#### TOC

- [Online Development](#online-development)
- [Local Development](#local-development)
- [Development Environment Requirements](#development-environment-requirements)
- [Project Setup](#project-setup)

## Online Development

If you have access to GitHub Codespaces, you can click the button below to enter the online development environment with just one click:
Expand Down
7 changes: 7 additions & 0 deletions docs/Development/Steup-Development.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

欢迎阅读 LobeChat 的开发环境设置指南。

#### TOC

- [在线开发](#在线开发)
- [本地开发](#本地开发)
- [开发环境需求](#开发环境需求)
- [项目设置](#项目设置)

## 在线开发

如果你有 GitHub Codespaces 的使用权限,可以点击下方按钮一键进入在线开发环境:
Expand Down
8 changes: 8 additions & 0 deletions docs/Development/Test.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

LobeChat's testing strategy includes unit testing and end-to-end (E2E) testing. Below are detailed explanations of each type of testing:

#### TOC

- [Unit Testing](#unit-testing)
- [🚧 End-to-End Testing](#-end-to-end-testing)
- [Development Testing](#development-testing)
- [1. Unit Testing](#1-unit-testing)
- [Testing Strategy](#testing-strategy)

## Unit Testing

Unit testing is used to test the functionality of independent units in the application, such as components, functions, utility functions, etc. We use [vitest][vitest-url] for unit testing.
Expand Down
8 changes: 8 additions & 0 deletions docs/Development/Test.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

LobeChat 的测试策略包括单元测试和端到端 (E2E) 测试。下面是每种测试的详细说明:

#### TOC

- [单元测试](#单元测试)
- [🚧 端到端测试](#-端到端测试)
- [开发测试](#开发测试)
- [1. 单元测试](#1-单元测试)
- [测试策略](#测试策略)

## 单元测试

单元测试用于测试应用中的独立单元(如组件、函数、工具函数等)的功能。我们使用 [vitest][vitest-url] 进行单元测试。
Expand Down
5 changes: 5 additions & 0 deletions docs/Development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Welcome to the LobeChat technical development getting started guide. LobeChat is an AI conversation application built on the Next.js framework, which integrates a series of technology stacks to achieve diverse functions and features. This guide will provide a detailed introduction to the main technical components of LobeChat and how to configure and use these technologies in your development environment.

#### TOC

- [Basic Technology Stack](#basic-technology-stack)
- [Folder Directory Structure](#folder-directory-structure)

## Basic Technology Stack

The core technology stack of LobeChat includes:
Expand Down
5 changes: 5 additions & 0 deletions docs/Development/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

欢迎来到 LobeChat 技术开发上手指南。LobeChat 是一款基于 Next.js 框架构建的 AI 会话应用,它汇集了一系列的技术栈,以实现多样化的功能和特性。本指南将详细介绍 LobeChat 的主要技术组成,以及如何在你的开发环境中配置和使用这些技术。

#### TOC

- [基础技术栈](#基础技术栈)
- [文件夹目录架构](#文件夹目录架构)

## 基础技术栈

LobeChat 的核心技术栈如下:
Expand Down

0 comments on commit 0878f2b

Please sign in to comment.