CloudBeaver Documentation
repository·devel·Indexed 26 days ago
https://github.com/dbeaver/cloudbeaverCloudBeaver is an open-source, web-based database management tool featuring a Java backend and a TypeScript/React frontend. This documentation covers the Community Edition (cloudbeaver-ce), including deployment via Docker, frontend development with the DBeaver UI Kit and Ladle, and the use of the H2 Query Executor and cbvr CLI.
What's inside CloudBeaver
- CloudBeaver is an open-source Cloud Database Manager (Community Edition) licensed under the Apache 2 license. It consists of a Java-based web server and a web interface built with TypeScript and React, providing a rich web-based environment for database management.
Build the H2 Query Executor
develTo build the executable JAR for the H2 Query Executor, use the Maven clean install command.
mvn clean installUse the Menu component
develThe Menu component provides a set of composable primitives for building accessible menus, such as context menus and dropdowns, built on top of Ariakit. It uses a compound API that can be accessed via named exports or through the static properties on the
Menuobject. AMenu.Providermust wrap the menu components to provide the necessary context.<Menu.Provider> <Menu.Button> Open menu <Menu.ButtonArrow /> </Menu.Button> <Menu> <Menu.Item>Action 1</Menu.Item> </Menu> </Menu.Provider>Use the Button component
develTheButtoncomponent is a versatile UI element used for various user interactions. It supports different visual styles via thevariantprop, different dimensions via thesizeprop, and aloadingstate to indicate asynchronous operations.Install and run the CloudBeaver frontend dev server
develFollow these steps to set up the development environment for the CloudBeaver frontend.
Prerequisites
- Node.js: Minimum version
v22.15.0(LTS recommended). - Yarn: Must be installed.
- Corepack: Must be enabled by running
corepack enable.
Installation and Execution Steps
Build the Backend and Frontend: Navigate to the
deploydirectory and run the build script. This script clones necessary repositories, builds the backend, installs frontend dependencies, and builds the frontend.- macOS/Linux:
./build.sh - Windows:
./build.bat
- macOS/Linux:
Start the Backend Server: Navigate to the
cloudbeaverfolder within thedeploydirectory and run the execution script.- macOS/Linux:
./run-cloudbeaver-server.sh - Windows:
./run-cloudbeaver-server.bat
- macOS/Linux:
Run the Web Application: Open a new terminal, navigate to
webapp/packages/product-default, and start the development server. You must specify theserverenvironment variable pointing to the backend URL (default ishttp://localhost:8978/).- macOS/Linux:
server=http://localhost:8978/ yarn dev- Windows Command Prompt:
set server=http://localhost:8978/ && yarn dev- Windows PowerShell:
$env:server="http://localhost:8978/"; yarn dev
Once running, the dev server is typically accessible at
http://localhost:8080/.cd deploy ./build.sh cd cloudbeaver ./run-cloudbeaver-server.sh cd webapp/packages/product-default server=http://localhost:8978/ yarn dev- Node.js: Minimum version
Access CloudBeaver Documentation
develYou can find detailed information and guides for CloudBeaver in the following locations:
- GitHub WIKI: For community-driven documentation and technical details.
- Official Documentation: For comprehensive user guides and feature explanations.
Develop components with Ladle
develThe DBeaver UI Kit uses Ladle to provide a sandbox environment for developing, testing, and documenting React components in isolation. You can run the documentation server to interact with components visually.
To start the Ladle development environment, run the following command in your terminal:
yarn docsAfter running the command, open the URL provided in the terminal output to view the component library.
Develop CloudBeaver Frontend using VSCode tasks
develVSCode is the recommended environment for CloudBeaver Frontend development. You can use dedicated tasks to automate the build and run processes.
To use these tasks:
- Press
F1(orCmd/Ctrl + Shift + P) to open the Command Palette. - Select Tasks: Run Task.
- Choose from the following tasks:
- Build CE: Builds both the backend and the frontend.
- Run Backend CE: Starts the backend server.
- Run DevServer CE: Starts the frontend development server.
When using these tasks, the frontend runs in development mode and proxies API requests to your local backend, accessible at
http://localhost:8080/.- Press
Run the CloudBeaver server
develTo start the CloudBeaver server, follow these steps:
- Configure the server: Before the initial startup, view and modify the server configuration. You must validate
init-data.confcarefully, as these parameters cannot be changed after the first server start. - Execute the startup script: Run the
run-cloudbeaver-server.shscript located in the root directory.
- Configure the server: Before the initial startup, view and modify the server configuration. You must validate
Run CloudBeaver in Docker
develCloudBeaver can be deployed using Docker. Use the official Docker repository to pull images and follow the deployment instructions provided in the GitHub Wiki to set up your instance.
https://hub.docker.com/r/dbeaver/cloudbeaverTry the CloudBeaver Demo Server
develA live demo of the CloudBeaver server is available online. If you need to understand how to access databases within the demo environment, refer to the Database access instructions in the GitHub Wiki.
https://demo.cloudbeaver.ioImplement the Dialog component using state or DialogProvider
develThe Dialog component is a modal window built on top of Ariakit that follows the WAI-ARIA Dialog Pattern. It provides a structured layout with
DialogHeader(sticky top),DialogBody(scrollable), andDialogFooter(sticky bottom).You can manage dialog visibility in two ways:
- Manual State Management: Control visibility using
openandonCloseprops. - DialogProvider: Use
DialogProvideranduseDialogStoreto manage state via a disclosure pattern.
Key components include:
Dialog: Main container.DialogDisclosure: Trigger button (requiresDialogProvider).DialogHeader,DialogBody,DialogFooter: Layout containers.DialogHeading,DialogDescription: Accessible label and description elements.DialogDismiss: Button to close the dialog.DialogProvider: Context provider for managing dialog state.
import { Dialog, DialogHeader, DialogBody, DialogFooter, DialogHeading, DialogDescription, DialogDismiss, DialogProvider, useDialogStore, Button, } from '@dbeaver/ui-kit'; // Using state const [open, setOpen] = useState(false); <Dialog open={open} onClose={() => setOpen(false)} data-size="medium"> <DialogHeader> <DialogHeading>Dialog Title</DialogHeading> </DialogHeader> <DialogBody> <DialogDescription>Dialog content goes here</DialogDescription> </DialogBody> <DialogFooter> <Button variant="secondary" onClick={() => setOpen(false)}> Cancel </Button> <Button variant="primary" onClick={() => setOpen(false)}> Confirm </Button> </DialogFooter> </Dialog>; // Using DialogProvider const dialog = useDialogStore(); <DialogProvider store={dialog}> <DialogDisclosure> <Button>Open Dialog</Button> </DialogDisclosure> <Dialog data-size="medium"> <DialogHeader> <DialogHeading>Title</DialogHeading> </DialogHeader> <DialogBody> <DialogDescription>Content</DialogDescription> </DialogBody> <DialogFooter> <DialogDismiss>Close</DialogDismiss> </DialogFooter> </Dialog> </DialogProvider>;- Manual State Management: Control visibility using