docs: perfect the README.md (#631)
* docs: perfect the README.md * Update README.md --------- Co-authored-by: hsluoyz <hsluoyz@qq.com>
108
README.md
|
@ -50,110 +50,38 @@
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
casibase contains 4 parts:
|
Casibase contains 2 parts:
|
||||||
|
|
||||||
| **Name** | **Description** | **Language** |
|
| **Name** | **Description** | **Language** |
|
||||||
|----------------|---------------------------------------------------|-----------------------------------------|
|
|----------------|---------------------------------------------------|-----------------------------------------|
|
||||||
| Frontend | User interface for the casibase application | JavaScript + React |
|
| Frontend | User interface for Casibase | JavaScript + React |
|
||||||
| Backend | Server-side logic and API for casibase | Golang + Beego + Python + Flask + MySQL |
|
| Backend | Server-side logic and API for Casibase | Golang + Beego + Python + Flask + MySQL |
|
||||||
| AI Model | Artificial intelligence model | Python + OpenAI |
|
|
||||||
| Knowledge Base | Storage for casibase application domain knowledge | pgvector |
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Demo Installation
|
## Online Demo
|
||||||
|
|
||||||
casibase uses Casdoor to manage members. So you need to create an organization and an application for casibase in a Casdoor instance.
|
<https://ai.casbin.com>
|
||||||
|
|
||||||
### Casdoor configuration
|
## Documentation
|
||||||
|
|
||||||
```shell
|
<https://casibase.org>
|
||||||
git clone https://github.com/casdoor/casdoor.git
|
|
||||||
```
|
|
||||||
|
|
||||||
refer to: https://casdoor.org/docs/basic/server-installation
|
## Install
|
||||||
|
|
||||||
Follow these steps to setup Casdoor for casibase:
|
<https://casibase.org/docs/basic/server-installation>
|
||||||
|
|
||||||
- Create an **Organization**
|
## How to contact?
|
||||||
|
|
||||||
- Configure information about the **Organization**
|
Discord: <https://discord.gg/5rPsrAzK7S>
|
||||||
|
|
||||||
- Add a member to a newly created organization
|
Forum: <https://forum.casbin.com>
|
||||||
|
|
||||||
- Configure member information (remember its **Name** as well as **Password**)
|
Contact: <https://tawk.to/chat/623352fea34c2456412b8c51/1fuc7od6e>
|
||||||
|
|
||||||
|
## Contribute
|
||||||
|
For Casibase, if you have any questions, you can give issues, or you can also directly start Pull Requests(but we recommend giving issues first to communicate with the community).
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
- Create a new **Application**
|
[Apache-2.0](https://github.com/casbin/casibase/blob/master/LICENSE)
|
||||||
|
|
||||||
- Configuring **Application** Information (Remember **Name, ClientID** and **ClientSecret**. Change **RedirectURLs** to http://localhost:14000/callback) 
|
|
||||||
|
|
||||||
### casibase configuration
|
|
||||||
|
|
||||||
#### Get the code
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git clone https://github.com/casbin/casibase.git
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Setup database
|
|
||||||
|
|
||||||
casibase will store its users, nodes and topics informations in a MySQL database named: `casibase`, will create it if not existed. The DB connection string can be specified at: https://github.com/casbin/casibase/blob/master/conf/app.conf
|
|
||||||
|
|
||||||
```ini
|
|
||||||
dataSourceName = root:123@tcp(localhost:3306)/
|
|
||||||
```
|
|
||||||
|
|
||||||
Casnode uses XORM to connect to DB, so all DBs supported by XORM can also be used.
|
|
||||||
|
|
||||||
#### Custom config
|
|
||||||
|
|
||||||
- #### Backend (`casibase\conf\app.conf`)
|
|
||||||
|
|
||||||
```ini
|
|
||||||
casdoorEndpoint = <Your_Casdoor_endpoint>
|
|
||||||
clientId = <Your_clientId_in_Casdoor_configuration>
|
|
||||||
clientSecret = <Your_clientSecret_in_Casdoor_configuration>
|
|
||||||
casdoorOrganization = "casibase"
|
|
||||||
casdoorApplication = "app-casibase"
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### Frontend (`casibase\web\src\Conf.js`)
|
|
||||||
|
|
||||||
```ini
|
|
||||||
export const AuthConfig = {
|
|
||||||
......
|
|
||||||
clientId: <Your_clientId_in_Casdoor_configuration>,
|
|
||||||
......
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Run casnode
|
|
||||||
|
|
||||||
- #### Backend (`casibase`)
|
|
||||||
|
|
||||||
```shell
|
|
||||||
go run main.go
|
|
||||||
```
|
|
||||||
|
|
||||||
- #### Frontend (`casibase\web`)
|
|
||||||
|
|
||||||
```shell
|
|
||||||
yarn install
|
|
||||||
yarn start
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Preview
|
|
||||||
|
|
||||||
Access the login view via the following link:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
http://localhost:13001
|
|
||||||
```
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The **casibase** demo is shown above, and in the future users can upload various **knowledge** files, **wordsets**, and **factorsets** to achieve a **customized domain knowledge base**.
|
|
||||||
|
|
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 34 KiB |