Skip to content

Commit 51050cc

Browse files
authored
🧹📚 docs: refactor and clean up (danny-avila#1392)
* 📑 update mkdocs * rename docker override file and add to gitignore * update .env.example - GOOGLE_MODELS * update index.md * doc refactor: split installation and configuration in two sub-folders * doc update: installation guides * doc update: configuration guides * doc: new docker override guide * doc: new beginner's guide for contributions - Thanks @berry-13 * doc: update documentation_guidelines.md * doc: update testing.md * doc: update deployment guides * doc: update /dev readme * doc: update general_info * doc: add 0 value to doc weight * doc: add index.md to every doc folders * doc: add weight to index.md and move openrouter from free_ai_apis.md to ai_setup.md * doc: update toc so they display properly on the right had side in mkdocs * doc: update pandoranext.md * doc: index logging_system.md * doc: update readme.md * doc: update litellm.md * doc: update ./dev/readme.md * doc:🔖 new presets.md * doc: minor corrections * doc update: user_auth_system.md and presets.md, doc feat: add mermaid support to mkdocs * doc update: add screenshots to presets.md * doc update: add screenshots to - OpenID with AWS Cognito * doc update: BingAI cookie instruction * doc update: discord auth * doc update: facebook auth * doc: corrections to user_auth_system.md * doc update: github auth * doc update: google auth * doc update: auth clean up * doc organization: installation * doc organization: configuration * doc organization: features+plugins & update:plugins screenshots * doc organization: deploymend + general_info & update: tech_stack.md * doc organization: contributions * doc: minor fixes * doc: minor fixes
1 parent 5c27fa3 commit 51050cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1599
-851
lines changed

.env.example

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
APP_TITLE=LibreChat
1717
# CUSTOM_FOOTER="My custom footer"
1818

19-
DEBUG_LOGGING=true
20-
2119
HOST=localhost
2220
PORT=3080
2321

@@ -26,6 +24,12 @@ MONGO_URI=mongodb://127.0.0.1:27017/LibreChat
2624
DOMAIN_CLIENT=http://localhost:3080
2725
DOMAIN_SERVER=http://localhost:3080
2826

27+
#===============#
28+
# Debug Logging #
29+
#===============#
30+
DEBUG_LOGGING=true
31+
DEBUG_CONSOLE=false
32+
2933
#=============#
3034
# Permissions #
3135
#=============#
@@ -86,6 +90,7 @@ CHATGPT_MODELS=text-davinci-002-render-sha
8690
#============#
8791

8892
GOOGLE_KEY=user_provided
93+
# GOOGLE_MODELS=gemini-pro,gemini-pro-vision,chat-bison,chat-bison-32k,codechat-bison,codechat-bison-32k,text-bison,text-bison-32k,text-unicorn,code-gecko,code-bison,code-bison-32k
8994
# GOOGLE_REVERSE_PROXY=
9095

9196
#============#

.github/workflows/mkdocs.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ jobs:
2121
restore-keys: |
2222
mkdocs-material-
2323
- run: pip install mkdocs-material
24+
- run: pip install mkdocs-nav-weight
2425
- run: mkdocs gh-deploy --force

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ config.local.ts
7171
**/storageState.json
7272
junit.xml
7373

74+
# docker override file
75+
docker-compose.override.yaml
76+
docker-compose.override.yml
77+
7478
# meilisearch
7579
meilisearch
7680
meilisearch.exe

README.md

+12-90
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</a>
2727
</p>
2828

29-
# Features
29+
# 📃 Features
3030
- 🖥️ UI matching ChatGPT, including Dark mode, Streaming, and 11-2023 updates
3131
- 💬 Multimodal Chat:
3232
- Upload and analyze images with GPT-4 and Gemini Vision 📸
@@ -46,7 +46,7 @@
4646
[For a thorough review of our features, see our docs here](https://docs.librechat.ai/features/plugins/introduction.html) 📚
4747

4848

49-
## All-In-One AI Conversations with LibreChat
49+
## 🪶 All-In-One AI Conversations with LibreChat
5050
LibreChat brings together the future of assistant AIs with the revolutionary technology of OpenAI's ChatGPT. Celebrating the original styling, LibreChat gives you the ability to integrate multiple AI models. It also integrates and enhances original client features such as conversation and message search, prompt templates and plugins.
5151

5252
With LibreChat, you no longer need to opt for ChatGPT Plus and can instead use free or pay-per-call APIs. We welcome contributions, cloning, and forking to enhance the capabilities of this advanced chatbot platform.
@@ -58,113 +58,35 @@ Click on the thumbnail to open the video☝️
5858

5959
---
6060

61-
## ⚠️ [Breaking Changes](docs/general_info/breaking_changes.md) ⚠️
62-
63-
**Please read this before updating from a previous version**
61+
## 📚 Documentation
62+
For more information on how to use our advanced features, install and configure our software, and access our guidelines and tutorials, please check out our documentation at [docs.librechat.ai](https://docs.librechat.ai)
6463

6564
---
6665

67-
## Changelog
66+
## 📝 Changelog
6867
Keep up with the latest updates by visiting the releases page - [Releases](https://github.com/danny-avila/LibreChat/releases)
6968

70-
---
71-
72-
<h1>Table of Contents</h1>
73-
74-
<details open>
75-
<summary><strong>Getting Started</strong></summary>
76-
77-
* Installation
78-
* [Docker Compose Install🐳](docs/install/docker_compose_install.md)
79-
* [Linux Install🐧](docs/install/linux_install.md)
80-
* [Mac Install🍎](docs/install/mac_install.md)
81-
* [Windows Install💙](docs/install/windows_install.md)
82-
* Configuration
83-
* [.env Configuration](./docs/install/dotenv.md)
84-
* [AI Setup](docs/install/ai_setup.md)
85-
* [User Auth System](docs/install/user_auth_system.md)
86-
* [Online MongoDB Database](docs/install/mongodb.md)
87-
* [Default Language](docs/install/default_language.md)
88-
* [LiteLLM Proxy: Load Balance LLMs + Spend Tracking](docs/install/litellm.md)
89-
</details>
90-
91-
<details>
92-
<summary><strong>General Information</strong></summary>
93-
94-
* [Code of Conduct](.github/CODE_OF_CONDUCT.md)
95-
* [Project Origin](docs/general_info/project_origin.md)
96-
* [Multilingual Information](docs/general_info/multilingual_information.md)
97-
* [Tech Stack](docs/general_info/tech_stack.md)
98-
</details>
99-
100-
<details>
101-
<summary><strong>Features</strong></summary>
102-
103-
* **Plugins**
104-
* [Introduction](docs/features/plugins/introduction.md)
105-
* [Google](docs/features/plugins/google_search.md)
106-
* [Stable Diffusion](docs/features/plugins/stable_diffusion.md)
107-
* [Wolfram](docs/features/plugins/wolfram.md)
108-
* [Make Your Own Plugin](docs/features/plugins/make_your_own.md)
109-
* [Using official ChatGPT Plugins](docs/features/plugins/chatgpt_plugins_openapi.md)
110-
111-
112-
* [Automated Moderation](docs/features/mod_system.md)
113-
* [Token Usage](docs/features/token_usage.md)
114-
* [Manage Your Database](docs/features/manage_your_database.md)
115-
* [PandoraNext Deployment Guide](docs/features/pandoranext.md)
116-
* [Third-Party Tools](docs/features/third_party.md)
117-
* [Proxy](docs/features/proxy.md)
118-
* [Bing Jailbreak](docs/features/bing_jailbreak.md)
119-
120-
</details>
121-
122-
<details>
123-
<summary><strong>Cloud Deployment</strong></summary>
124-
125-
* [DigitalOcean](docs/deployment/digitalocean.md)
126-
* [Azure](docs/deployment/azure-terraform.md)
127-
* [Linode](docs/deployment/linode.md)
128-
* [Cloudflare](docs/deployment/cloudflare.md)
129-
* [Ngrok](docs/deployment/ngrok.md)
130-
* [HuggingFace](docs/deployment/huggingface.md)
131-
* [Render](docs/deployment/render.md)
132-
* [Meilisearch in Render](docs/deployment/meilisearch_in_render.md)
133-
* [Hetzner](docs/deployment/hetzner_ubuntu.md)
134-
* [Heroku](docs/deployment/heroku.md)
135-
</details>
136-
137-
<details>
138-
<summary><strong>Contributions</strong></summary>
139-
140-
* [Contributor Guidelines](.github/CONTRIBUTING.md)
141-
* [Documentation Guidelines](docs/contributions/documentation_guidelines.md)
142-
* [Contribute a Translation](docs/contributions/translation_contribution.md)
143-
* [Code Standards and Conventions](docs/contributions/coding_conventions.md)
144-
* [Testing](docs/contributions/testing.md)
145-
* [Security](.github/SECURITY.md)
146-
* [Project Roadmap](https://github.com/users/danny-avila/projects/2)
147-
</details>
69+
**⚠️ [Breaking Changes](docs/general_info/breaking_changes.md)**
70+
Please consult the breaking changes before updating.
14871

14972
---
15073

151-
## Star History
74+
## Star History
15275

15376
<a href="https://star-history.com/#danny-avila/LibreChat&Date">
15477
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=danny-avila/LibreChat&type=Date&theme=dark" onerror="this.src='https://api.star-history.com/svg?repos=danny-avila/LibreChat&type=Date'" />
15578
</a>
15679

15780
---
15881

159-
## Contributors
160-
Contributions and suggestions bug reports and fixes are welcome!
161-
Please read the documentation before you do!
82+
## ✨ Contributions
83+
Contributions, suggestions, bug reports and fixes are welcome!
16284

16385
For new features, components, or extensions, please open an issue and discuss before sending a PR.
16486

165-
- Join the [Discord community](https://discord.gg/uDyZ5Tzhct)
87+
---
16688

167-
This project exists in its current state thanks to all the people who contribute
89+
💖 This project exists in its current state thanks to all the people who contribute
16890
---
16991
<a href="https://github.com/danny-avila/LibreChat/graphs/contributors">
17092
<img src="https://contrib.rocks/image?repo=danny-avila/LibreChat" />
File renamed without changes.

docs/contributions/coding_conventions.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: 🧑‍💻 Code Standards and Conventions
3+
weight: -7
4+
---
15
# Coding Conventions
26

37
## Node.js API Server

docs/contributions/documentation_guidelines.md

+20-8
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
1+
---
2+
title: 📝 Documentation Guidelines
3+
weight: -9
4+
---
15
# Documentation Guidelines
26

37
This document explains how to write and format documentation for LibreChat.
48

59
## New Documents
610
- Use lowercase letters and underscores to name new documents (e.g. `documentation_guidelines.md`).
7-
- For new features, create new documentation and place it in the relevant folder/sub-folder under [docs](../docs/).
8-
- If the feature adds new functionality, add it to the feature section of the main [README.md](../../README.md).
9-
- When you create a new document, **add it to both table of contents:**
10-
- [README.md](../../README.md)
11-
- [mkdocs.yml](../../mkdocs.yml)
11+
- For new features, create new documentation and place it in the relevant folder/sub-folder under `../docs`.
12+
- If the feature adds new functionality, add it to the feature section of the main `README.md` as well as in `../docs/index.md`.
13+
- When you create a new document, **you need to add it to two table of contents:**
14+
- in `README.md`
15+
- and in the `index.md` file in the folder where your doc is located
1216

13-
## Formatting
17+
## Markdown Formatting
1418
- Use `#`, `##`, and `###` for headings and subheadings.
1519
- Use `#` for the title of the document.
1620
- Use `##` for the main sections of the document.
1721
- Use `###` for the sub-sections within a section.
18-
- Use `**` to make text bold to highlight important information (not in place of a heading).
22+
- Use `**` to make text **bold** to highlight important information (do not use in place of a heading).
1923
- Use relative paths for links to other documents.
2024
- You can use HTML to add more features to a document.
25+
- By default the title indexed by mkdocs will be the first heading. You can override this by adding metadata at the top of your document:
26+
```bash
27+
---
28+
title: Document Title
29+
weight: 0
30+
---
31+
```
32+
- Setting the weight in the document metadata will influence its position in the table of contents. Lowest weight are placed first. Not setting it will default to `0`. When multiple docs have the same weight it sorts in alphabetical order.
2133

2234
## Important Notes
2335
- **⚠️Keep it organized and structured⚠️**
2436
- Do not add unrelated information to an existing document. Create a new one if needed.
25-
- All assets should be uploaded in the document from GitHub's webui:
37+
- All assets should be uploaded in the document from GitHub's webui
2638
- **Before submitting a PR, double-check on GitHub that everything is properly displayed and that all links work correctly.**
2739

2840
![image](https://github.com/danny-avila/LibreChat/assets/32828263/4f138ab4-31a5-4fae-a459-5335e5ff25a8)
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: 🙌 Beginner's Guide to Contributions
3+
weight: -10
4+
---
5+
# How to Contribute in a Quick and Easy Way
6+
7+
## Installation of Tools
8+
9+
1. [Git](https://git-scm.com/downloads) is essential, the first thing to download.
10+
2. [Git LFS](https://git-lfs.com/) can be useful for uploading files with larger sizes.
11+
3. [Github Desktop](https://desktop.github.com/) - I use it only for UI; I don't recommend using it for pushing or other actions.
12+
13+
## How to Use?
14+
15+
This will be a somewhat raw text, but I'll try to be as clear as possible.
16+
17+
I recommend installing the following extensions in VS Code:
18+
19+
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
20+
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
21+
- [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
22+
23+
### Example of a Pull Request (PR)
24+
25+
Let's say I want to add another page for an API Panel.
26+
27+
1. Open GitHub and select Danny's fork.
28+
2. First, make sure that the main branch is clean with no commits and up to date.
29+
![image](https://github.com/Berry-13/LibreChat/assets/81851188/4d627ee7-0f59-458f-8723-4f0eae447dd9)
30+
3. Open "View all my branches" and create a new branch with a descriptive name for your task. For example: "ApiPanel."
31+
4. In GitHub Desktop, select the branch you just created.
32+
![image](https://github.com/Berry-13/LibreChat/assets/81851188/dd4374b8-419a-4406-97a3-999ba4118397)
33+
5. Start modifying the code, and when you finish a part, commit the changes.
34+
Example of commits:
35+
- commit1: Created the frontend
36+
- commit2: Fixed a bug in variable export
37+
- commit3: Removed unnecessary comments and added translation support
38+
- and so on...
39+
40+
## Testing
41+
42+
While testing the code, if you're working with the frontend, it might be frustrating to run `npm run frontend` and `npm run backend` every time. Instead, use `npm run frontend:dev` to see real-time changes on port 3090 (really!).
43+
44+
> Note: You must run `npm run frontend` once before you can use `npm run frontend:dev`
45+
46+
### How?
47+
48+
- `git add *` adds all files to be committed.
49+
- `git commit -m "name-of-your-commit"` creates a commit.
50+
- `git push` uploads the changes.
51+
52+
Before doing all this, I recommend using GitHub Desktop to see what you've changed.
53+
![image](https://github.com/Berry-13/LibreChat/assets/81851188/a04a7e81-7c75-4c77-8463-d35f603bedf7)
54+
55+
If `git commit` fails due to ESLint errors, read the error message and understand what's wrong. It could be an unused variable or other issues.
56+
57+
### Possible Various Problems
58+
59+
If you have the main branch with many commits and don't know what to do, follow this simple guide:
60+
61+
⚠️ Please do this only when you have no active PRs or when you're not working on the project:
62+
63+
1. Do a pull origin and in the terminal write `git log` to identify how many commits you are behind.
64+
2. Use `git rebase -i HEAD~2`, where 2 represents the number of commits you need to go back. If you need to go back 100 commits, use `git rebase -i HEAD~100`.
65+
3. In the editor, change the "pick" for the two commits to "drop," save with "esc," then type `:wq` and press "Enter."
66+
4. Finally, run `git push --force origin main`.

docs/contributions/index.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Contributing to LibreChat
3+
weight: 5
4+
---
5+
# Contributing to LibreChat
6+
7+
* 🙌 [Beginner's Guide to Contributions](./how_to_contribute.md)
8+
* 🚸 [Contributor Guidelines](https://github.com/danny-avila/LibreChat/blob/main/.github/CONTRIBUTING.md)
9+
* 📝 [Documentation Guidelines](documentation_guidelines.md)
10+
* 🌍 [Contribute a Translation](translation_contribution.md)
11+
* 🧑‍💻 [Code Standards and Conventions](coding_conventions.md)
12+
* 🧪 [Testing During Development](testing.md)
13+
* 🔐 [Security](https://github.com/danny-avila/LibreChat/blob/main/.github/SECURITY.md)
14+
* 🛣️ [Project Roadmap](https://github.com/users/danny-avila/projects/2)

docs/contributions/testing.md

+9-47
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,22 @@
1-
# Locally test the app during development
2-
3-
### Run the app
4-
5-
#### Option 1: Run the app using Docker
6-
7-
For reproducibility and ease of use, you can use
8-
the provided docker-compose file:
9-
10-
1. Comment out the portion pointing at the already built image
11-
12-
```yaml
13-
image: chatgptclone/app:0.3.3
14-
```
15-
16-
2. Uncomment the portion pointing at the local source code
17-
18-
```yaml
19-
# image: node-api
20-
# build:
21-
# context: .
22-
# target: node-api
23-
```
24-
25-
3. Build your local source code for the `node-api` target
1+
---
2+
title: 🧪 Testing During Development
3+
weight: -6
4+
---
265

27-
```shell
28-
docker build `
29-
--target=node-api `
30-
-t node-api `
31-
.
32-
```
33-
34-
4. Docker-compose up
35-
36-
```shell
37-
docker-compose up
38-
```
39-
40-
#### Option 2: Run the app by installing on your machine
41-
42-
1. Install the prerequisites on your machine.
43-
See [section above](#install-the-prerequisites-on-your-machine).
6+
# Locally test the app during development
447

45-
2. Run the app on your machine.
46-
See [section above](#run-the-app).
8+
## WIP
479

48-
### Run the tests
10+
## Run the tests
4911

50-
1. Install the global dependencies
12+
#### 1. Install the global dependencies
5113

5214
```shell
5315
npm ci
5416
npx playwright install --with-deps
5517
```
5618

57-
2. Run tests
19+
#### 2. Run tests
5820

5921
```shell
6022
npx playwright test

0 commit comments

Comments
 (0)