https://github.com/oceanbase/odc-client
OceanBase Developer Center Client
https://github.com/oceanbase/odc-client
Last synced: 6 months ago
JSON representation
OceanBase Developer Center Client
- Host: GitHub
- URL: https://github.com/oceanbase/odc-client
- Owner: oceanbase
- License: apache-2.0
- Created: 2023-05-10T07:26:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-15T02:38:51.000Z (6 months ago)
- Last Synced: 2025-07-15T05:48:33.976Z (6 months ago)
- Language: TypeScript
- Homepage:
- Size: 22.8 MB
- Stars: 21
- Watchers: 9
- Forks: 10
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Development Guide
English | [中文](docs/README_CN.md)
### Introduction
ODC has a centralized deployment **web version** and a locally run **client version**. The web version requires ODC Server to run, while the client version automatically installs the corresponding dependencies and generates a standalone installation package.
### Project Initialization
#### Environment Requirements
1. [Nodejs](https://nodejs.org/zh-cn/download) 16 or above
2. [pnpm](https://pnpm.io/zh/installation)
3. Minimum 8GB RAM
4. (Optional, required for generating Mac client) MacOS system
#### Client Dependency Installation (Skip for Web Version)
##### ODC Server
After packaging the ODC Server Jar file, store it in the following directory:
[Build Jar](https://github.com/oceanbase/odc/blob/main/docs/en-US/DEVELOPER_GUIDE.md#31-jar-build-and-run)
```shell
libraries
- java
- odc.jar
- plugins
- plugin-related packages
- starters
- starter-related packages
```
```shell
pnpm run prepack jar
```
##### JRE
```shell
# Use ODC provided JRE
pnpm run prepack jre
```
##### OBClient
```shell
# Use ODC provided OBClient
pnpm run prepack obclient
```
#### Install Dependencies
```shell
pnpm install
```
#### Configure ODC Server Address
Modify the `proxy` field in `config/config.js` and change the `target` attribute to the address of the ODC Server.
```shell
proxy: {
'/api/v1/webSocket/obclient': {
target: 'ODC Server Address',
ws: true,
},
'/api/': {
target: 'ODC Server Address',
},
'/oauth2/': {
target: 'ODC Server Address',
},
'/login/': {
target: 'ODC Server Address',
}
}
```
### Development
#### Web Version Development
```shell
pnpm run dev
```
This will start a web server on the default `8000` port. Access [http://localhost:8000](https://localhost:8000) to open ODC.
#### Client Development
ODC client is developed based on Electron. We need to start two services: the web server and the Electron server.
##### Start the Client Web Server
```shell
pnpm run dev:client
```
After it starts successfully, we can proceed to start Electron.
##### Start Electron
```shell
pnpm run start-electron
```
### Build
#### Web Version Build
```shell
pnpm run build:odc
```
The packaged artifacts can be found in `dist/renderer`.
#### Client Build
```shell
# Build for win, linux, mac
node ./scripts/client/build.js all
```
You can adjust the command parameters to selectively build different installation packages. Currently, the following types are supported:
1. **mac** - dmg installation package
2. **linux_x86** - x86_64 version deb, AppImage installation package
3. **linux_aarch64** - arm64 version deb, AppImage installation package
4. **win** - win32, win64 version installation package
5. **all** - all installation packages