moved around documentation

This commit is contained in:
andzejsp 2023-05-05 22:54:46 +03:00
parent 3dfa52e8c1
commit 833719ed05
3 changed files with 36 additions and 70 deletions

View File

@ -1,7 +1,39 @@
# GPT4ALL-UI Web interface VUE3 development log, todo's and more
## Installation for development
You must have [Node.js](https://nodejs.org/en) installed on your computer.
```
cd /web/
npm install
```
## Testing, running, debugging
After that to run development server locally and test the web page at http://localhost:5173/:
```
npm run dev
```
> Note
> To run the developmen environment you need to create copy of the `.env` file and name it either `.env.development` or if that dont work then `.env.dev`. Set `VITE_GPT4ALL_API_BASEURL = /api/ ` in the `.env.development`.
> Run your gpt backend by launching `webui.bat` or bash `webui.sh`.
## Building frontend - UI
```
npm run build
```
This will update `/dist/` folder with all the files. Also the build will show you if there are errors or not in your vue code.
> Note
> Make sure you test the built files too, because sometimes the builder dont catch all the errors, and if a component is not refernced it might not load in the built version, but it loads fine in development environment
# UI development log, todo's and more
The new UI is build using Node.js VUE3 + Vite. It uses tailwindcss, feathericons, openfonts and flowbite-vue components.
Here we keep track of things to implement and stuff we need to do.
## Todo's
- Add ability to select multiple discussions to export or delete [WIP]
@ -34,5 +66,4 @@ The new UI is build using Node.js VUE3 + Vite. It uses tailwindcss, feathericons
- Add clear filter button to search input field [DONE]
- Add modal to ask user if you sure about to delete [DONE but in different way]
- Fix up the discussion array to filter out the messages by type not by count. (conditionner and )[DONE]
- Add title of current discussion to page [DONE]
- Add title of current discussion to page [DONE]

View File

@ -1,4 +1,4 @@
VITE_GPT4ALL_API = http://localhost:9600 # http://localhost:9600
VITE_GPT4ALL_API_CHANGE_ORIGIN = 0 # FALSE
VITE_GPT4ALL_API_SECURE = 0 # FALSE
VITE_GPT4ALL_API_BASEURL = / # FALSE
VITE_GPT4ALL_API_BASEURL = /

View File

@ -1,65 +0,0 @@
# GPT4ALL-UI Web interface VUE3
## Dependencies for development
You mus have [Node.js](https://nodejs.org/en) installed on your computer.
```
git clone repo_URL
cd into-this-repo-dir
npm install
```
After that to run development server locally and test the web page at http://localhost:5173/:
```
npm run dev
```
To connect to GPT4ALL-UI API server you need to enter its URL in the `.env` or make a copy of `.env` file and name it `.env.local`. This .env.local is added to `.gitignore`.
All http requests made to GPT4ALL-UI api has to have /api/ prefix. This prefix gets rewritten in the vite.config.js file.
Make changes to your usecase in the `.env.local` file.
Once UI id done you can build static files for serving.
```
npm run build
```
This will create /dist/ folder with all the files. Also the build will show you if there are errors or not in your vue code.
> Make sure you test the static files too, because sometimes the builder dont catch all the errors, and if a component is not refernced it might not load in the built version, but it loads fine in development environment
### Overview of used dependencies and development
- Nodejs
- vue
- feather-icons
- axios
```
npm init vue@latest
```
```
cd gpt4all-ui-vue
npm install
npm run format
npm install axios dotenv
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
npm install feather-icons --save
```
### Running dev environment and building commands
To lint: (not very used)
```
npm run lint
```
To run test:
```
npm run dev
```
To build static files
```
npm run build
```