Skip to content

Commit

Permalink
🧹📚 docs: refactor and clean up (#1392)
Browse files Browse the repository at this point in the history
* 📑 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
  • Loading branch information
fuegovic authored Dec 22, 2023
1 parent 5c27fa3 commit 51050cc
Show file tree
Hide file tree
Showing 66 changed files with 1,599 additions and 851 deletions.
9 changes: 7 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
APP_TITLE=LibreChat
# CUSTOM_FOOTER="My custom footer"

DEBUG_LOGGING=true

HOST=localhost
PORT=3080

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

#===============#
# Debug Logging #
#===============#
DEBUG_LOGGING=true
DEBUG_CONSOLE=false

#=============#
# Permissions #
#=============#
Expand Down Expand Up @@ -86,6 +90,7 @@ CHATGPT_MODELS=text-davinci-002-render-sha
#============#

GOOGLE_KEY=user_provided
# 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
# GOOGLE_REVERSE_PROXY=

#============#
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ jobs:
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: pip install mkdocs-nav-weight
- run: mkdocs gh-deploy --force
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ config.local.ts
**/storageState.json
junit.xml

# docker override file
docker-compose.override.yaml
docker-compose.override.yml

# meilisearch
meilisearch
meilisearch.exe
Expand Down
102 changes: 12 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</a>
</p>

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


## All-In-One AI Conversations with LibreChat
## 🪶 All-In-One AI Conversations with LibreChat
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.

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.
Expand All @@ -58,113 +58,35 @@ Click on the thumbnail to open the video☝️

---

## ⚠️ [Breaking Changes](docs/general_info/breaking_changes.md) ⚠️

**Please read this before updating from a previous version**
## 📚 Documentation
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)

---

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

---

<h1>Table of Contents</h1>

<details open>
<summary><strong>Getting Started</strong></summary>

* Installation
* [Docker Compose Install🐳](docs/install/docker_compose_install.md)
* [Linux Install🐧](docs/install/linux_install.md)
* [Mac Install🍎](docs/install/mac_install.md)
* [Windows Install💙](docs/install/windows_install.md)
* Configuration
* [.env Configuration](./docs/install/dotenv.md)
* [AI Setup](docs/install/ai_setup.md)
* [User Auth System](docs/install/user_auth_system.md)
* [Online MongoDB Database](docs/install/mongodb.md)
* [Default Language](docs/install/default_language.md)
* [LiteLLM Proxy: Load Balance LLMs + Spend Tracking](docs/install/litellm.md)
</details>

<details>
<summary><strong>General Information</strong></summary>

* [Code of Conduct](.github/CODE_OF_CONDUCT.md)
* [Project Origin](docs/general_info/project_origin.md)
* [Multilingual Information](docs/general_info/multilingual_information.md)
* [Tech Stack](docs/general_info/tech_stack.md)
</details>

<details>
<summary><strong>Features</strong></summary>

* **Plugins**
* [Introduction](docs/features/plugins/introduction.md)
* [Google](docs/features/plugins/google_search.md)
* [Stable Diffusion](docs/features/plugins/stable_diffusion.md)
* [Wolfram](docs/features/plugins/wolfram.md)
* [Make Your Own Plugin](docs/features/plugins/make_your_own.md)
* [Using official ChatGPT Plugins](docs/features/plugins/chatgpt_plugins_openapi.md)


* [Automated Moderation](docs/features/mod_system.md)
* [Token Usage](docs/features/token_usage.md)
* [Manage Your Database](docs/features/manage_your_database.md)
* [PandoraNext Deployment Guide](docs/features/pandoranext.md)
* [Third-Party Tools](docs/features/third_party.md)
* [Proxy](docs/features/proxy.md)
* [Bing Jailbreak](docs/features/bing_jailbreak.md)

</details>

<details>
<summary><strong>Cloud Deployment</strong></summary>

* [DigitalOcean](docs/deployment/digitalocean.md)
* [Azure](docs/deployment/azure-terraform.md)
* [Linode](docs/deployment/linode.md)
* [Cloudflare](docs/deployment/cloudflare.md)
* [Ngrok](docs/deployment/ngrok.md)
* [HuggingFace](docs/deployment/huggingface.md)
* [Render](docs/deployment/render.md)
* [Meilisearch in Render](docs/deployment/meilisearch_in_render.md)
* [Hetzner](docs/deployment/hetzner_ubuntu.md)
* [Heroku](docs/deployment/heroku.md)
</details>

<details>
<summary><strong>Contributions</strong></summary>

* [Contributor Guidelines](.github/CONTRIBUTING.md)
* [Documentation Guidelines](docs/contributions/documentation_guidelines.md)
* [Contribute a Translation](docs/contributions/translation_contribution.md)
* [Code Standards and Conventions](docs/contributions/coding_conventions.md)
* [Testing](docs/contributions/testing.md)
* [Security](.github/SECURITY.md)
* [Project Roadmap](https://github.com/users/danny-avila/projects/2)
</details>
**⚠️ [Breaking Changes](docs/general_info/breaking_changes.md)**
Please consult the breaking changes before updating.

---

## Star History
## Star History

<a href="https://star-history.com/#danny-avila/LibreChat&Date">
<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'" />
</a>

---

## Contributors
Contributions and suggestions bug reports and fixes are welcome!
Please read the documentation before you do!
## ✨ Contributions
Contributions, suggestions, bug reports and fixes are welcome!

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

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

This project exists in its current state thanks to all the people who contribute
💖 This project exists in its current state thanks to all the people who contribute
---
<a href="https://github.com/danny-avila/LibreChat/graphs/contributors">
<img src="https://contrib.rocks/image?repo=danny-avila/LibreChat" />
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions docs/contributions/coding_conventions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: 🧑‍💻 Code Standards and Conventions
weight: -7
---
# Coding Conventions

## Node.js API Server
Expand Down
28 changes: 20 additions & 8 deletions docs/contributions/documentation_guidelines.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
---
title: 📝 Documentation Guidelines
weight: -9
---
# Documentation Guidelines

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

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

## Formatting
## Markdown Formatting
- Use `#`, `##`, and `###` for headings and subheadings.
- Use `#` for the title of the document.
- Use `##` for the main sections of the document.
- Use `###` for the sub-sections within a section.
- Use `**` to make text bold to highlight important information (not in place of a heading).
- Use `**` to make text **bold** to highlight important information (do not use in place of a heading).
- Use relative paths for links to other documents.
- You can use HTML to add more features to a document.
- 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:
```bash
---
title: Document Title
weight: 0
---
```
- 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.

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

![image](https://github.com/danny-avila/LibreChat/assets/32828263/4f138ab4-31a5-4fae-a459-5335e5ff25a8)
Expand Down
66 changes: 66 additions & 0 deletions docs/contributions/how_to_contribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: 🙌 Beginner's Guide to Contributions
weight: -10
---
# How to Contribute in a Quick and Easy Way

## Installation of Tools

1. [Git](https://git-scm.com/downloads) is essential, the first thing to download.
2. [Git LFS](https://git-lfs.com/) can be useful for uploading files with larger sizes.
3. [Github Desktop](https://desktop.github.com/) - I use it only for UI; I don't recommend using it for pushing or other actions.

## How to Use?

This will be a somewhat raw text, but I'll try to be as clear as possible.

I recommend installing the following extensions in VS Code:

- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)

### Example of a Pull Request (PR)

Let's say I want to add another page for an API Panel.

1. Open GitHub and select Danny's fork.
2. First, make sure that the main branch is clean with no commits and up to date.
![image](https://github.com/Berry-13/LibreChat/assets/81851188/4d627ee7-0f59-458f-8723-4f0eae447dd9)
3. Open "View all my branches" and create a new branch with a descriptive name for your task. For example: "ApiPanel."
4. In GitHub Desktop, select the branch you just created.
![image](https://github.com/Berry-13/LibreChat/assets/81851188/dd4374b8-419a-4406-97a3-999ba4118397)
5. Start modifying the code, and when you finish a part, commit the changes.
Example of commits:
- commit1: Created the frontend
- commit2: Fixed a bug in variable export
- commit3: Removed unnecessary comments and added translation support
- and so on...

## Testing

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!).

> Note: You must run `npm run frontend` once before you can use `npm run frontend:dev`
### How?

- `git add *` adds all files to be committed.
- `git commit -m "name-of-your-commit"` creates a commit.
- `git push` uploads the changes.

Before doing all this, I recommend using GitHub Desktop to see what you've changed.
![image](https://github.com/Berry-13/LibreChat/assets/81851188/a04a7e81-7c75-4c77-8463-d35f603bedf7)

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.

### Possible Various Problems

If you have the main branch with many commits and don't know what to do, follow this simple guide:

⚠️ Please do this only when you have no active PRs or when you're not working on the project:

1. Do a pull origin and in the terminal write `git log` to identify how many commits you are behind.
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`.
3. In the editor, change the "pick" for the two commits to "drop," save with "esc," then type `:wq` and press "Enter."
4. Finally, run `git push --force origin main`.
14 changes: 14 additions & 0 deletions docs/contributions/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Contributing to LibreChat
weight: 5
---
# Contributing to LibreChat

* 🙌 [Beginner's Guide to Contributions](./how_to_contribute.md)
* 🚸 [Contributor Guidelines](https://github.com/danny-avila/LibreChat/blob/main/.github/CONTRIBUTING.md)
* 📝 [Documentation Guidelines](documentation_guidelines.md)
* 🌍 [Contribute a Translation](translation_contribution.md)
* 🧑‍💻 [Code Standards and Conventions](coding_conventions.md)
* 🧪 [Testing During Development](testing.md)
* 🔐 [Security](https://github.com/danny-avila/LibreChat/blob/main/.github/SECURITY.md)
* 🛣️ [Project Roadmap](https://github.com/users/danny-avila/projects/2)
56 changes: 9 additions & 47 deletions docs/contributions/testing.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,22 @@
# Locally test the app during development

### Run the app

#### Option 1: Run the app using Docker

For reproducibility and ease of use, you can use
the provided docker-compose file:

1. Comment out the portion pointing at the already built image

```yaml
image: chatgptclone/app:0.3.3
```
2. Uncomment the portion pointing at the local source code
```yaml
# image: node-api
# build:
# context: .
# target: node-api
```

3. Build your local source code for the `node-api` target
---
title: 🧪 Testing During Development
weight: -6
---

```shell
docker build `
--target=node-api `
-t node-api `
.
```

4. Docker-compose up

```shell
docker-compose up
```

#### Option 2: Run the app by installing on your machine

1. Install the prerequisites on your machine.
See [section above](#install-the-prerequisites-on-your-machine).
# Locally test the app during development

2. Run the app on your machine.
See [section above](#run-the-app).
## WIP

### Run the tests
## Run the tests

1. Install the global dependencies
#### 1. Install the global dependencies

```shell
npm ci
npx playwright install --with-deps
```

2. Run tests
#### 2. Run tests

```shell
npx playwright test
Expand Down
Loading

0 comments on commit 51050cc

Please sign in to comment.