Browse Source

docs: perfect the README.md (#631)

* docs: perfect the README.md

* Update README.md

---------

Co-authored-by: hsluoyz <hsluoyz@qq.com>
HEAD
Palp1tate GitHub 2 years ago
parent
commit
3937f12c75
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 17 additions and 89 deletions
  1. +17
    -89
      README.md
  2. BIN
      assets/1-Add-organization.png
  3. BIN
      assets/2-Configure-information-organization.png
  4. BIN
      assets/3-Check-user.png
  5. BIN
      assets/4-Add-member-to-organization.png
  6. BIN
      assets/5-Configure-new-user.png
  7. BIN
      assets/6-Add-application.png
  8. BIN
      assets/7-Configure-new-application.png
  9. BIN
      assets/8-Preview-base-wordsets.png
  10. BIN
      assets/9-Preview-casibase-stores.png

+ 17
- 89
README.md View File

@@ -50,110 +50,38 @@

## Architecture

casibase contains 4 parts:
Casibase contains 2 parts:

| **Name** | **Description** | **Language** |
|----------------|---------------------------------------------------|-----------------------------------------|
| Frontend | User interface for the casibase application | JavaScript + React |
| 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 |
| Frontend | User interface for Casibase | JavaScript + React |
| Backend | Server-side logic and API for Casibase | Golang + Beego + Python + Flask + MySQL |

![0-Architecture-casibase](assets/0-Architecture-casibase.png)

## 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
git clone https://github.com/casdoor/casdoor.git
```
<https://casibase.org>

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**![1-Add-organization](assets/1-Add-organization.png)
## How to contact?

- Configure information about the **Organization**![2-Configure-information-organization](assets/2-Configure-information-organization.png)
Discord: <https://discord.gg/5rPsrAzK7S>

- Add a member to a newly created organization![3-Check-user](assets/3-Check-user.png)![4-Add-member-to-organization](assets/4-Add-member-to-organization.png)
Forum: <https://forum.casbin.com>

- Configure member information (remember its **Name** as well as **Password**)![5-Configure-new-user](assets/5-Configure-new-user.png)
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).


- Create a new **Application**![6-Add-application](assets/6-Add-application.png)

- Configuring **Application** Information (Remember **Name, ClientID** and **ClientSecret**. Change **RedirectURLs** to http://localhost:14000/callback) ![7-Configure-new-application](assets/7-Configure-new-application.png)

### 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
```

![8-Preview-base-wordsets](assets/8-Preview-base-wordsets.png)

![9-Preview-casibase-stores](assets/9-Preview-casibase-stores.png)

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**.
## License
[Apache-2.0](https://github.com/casbin/casibase/blob/master/LICENSE)

BIN
assets/1-Add-organization.png View File

Before After
Width: 1270  |  Height: 510  |  Size: 76 kB

BIN
assets/2-Configure-information-organization.png View File

Before After
Width: 1085  |  Height: 666  |  Size: 63 kB

BIN
assets/3-Check-user.png View File

Before After
Width: 2410  |  Height: 502  |  Size: 128 kB

BIN
assets/4-Add-member-to-organization.png View File

Before After
Width: 1098  |  Height: 509  |  Size: 33 kB

BIN
assets/5-Configure-new-user.png View File

Before After
Width: 1362  |  Height: 1115  |  Size: 94 kB

BIN
assets/6-Add-application.png View File

Before After
Width: 1868  |  Height: 514  |  Size: 104 kB

BIN
assets/7-Configure-new-application.png View File

Before After
Width: 1784  |  Height: 1327  |  Size: 129 kB

BIN
assets/8-Preview-base-wordsets.png View File

Before After
Width: 2560  |  Height: 496  |  Size: 43 kB

BIN
assets/9-Preview-casibase-stores.png View File

Before After
Width: 2560  |  Height: 468  |  Size: 35 kB

Loading…
Cancel
Save