# odc-client **Repository Path**: mirrors/odc-client ## Basic Information - **Project Name**: odc-client - **Description**: ODC 有集中化部署的 Web 版和本地运行的客户端版本 - **Primary Language**: TypeScript - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: https://www.oschina.net/p/odc-client - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-17 - **Last Updated**: 2025-12-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## 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 run install-odc ``` #### 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