In order to start working on any package in this monorepo, you first need to clone and bootstrap it.
It is a simple process! Follow these steps:
- Clone the repository
- Bootstrap dependencies
- Run command of a package
- Hack!
Each step is described in below.
There are few ways to clone a repository. Check Github docs if you need help.
-
Clone this repository using SSH:
git clone git@github.com:questdb/ui.git -
or HTTPS:
git clone https://github.com/questdb/ui.git -
or with Github CLI:
gh repo clone questdb/ui
You will notice that cloning takes some time. This is expected, because we use Yarn@3 with PnP (plug and play).
All dependencies are stored in the repository, and there is no need to install (download) them separately. It takes ~1 minute to download on a decent connection. After that there's no more downloading and bootstrapping is very quick!
It does feel a bit strange to have dependencies committed, but it's a well worth trade-off. If you're interested in learning more, check out Yarn@3 with PnP and Zero-Installs.
First make sure you have node and yarn and that their versions are compatible with this project.
This is a common source of issues, best not to skip this step:
-
node -vshould return16.13.1
If it doesn't, you can use fnm or nvm to manage node versions on your machine.
Then runfnm useornvm useto set correct version. -
yarn -vshould return v3 (like3.2.1).
If it returnscommand not found, enableyarnby runningcorepack enable.
Follow official installation guide if you have trouble.
Simply run yarn to bootstrap.
All dependencies are already available, so this should be a quick process.
Congrats, the setup is done! You're ready to start working on any package in packages folder.
Pick any package from packages directory. To run a script for it, use a command in this format:
yarn workspace $package-name $script
where:
-
$package-nameis the"name"property in package'spackage.jsonfile.
For example,packages/web-console/package.jsonhas"name": "@questdb/web-console". -
$scriptis one of the scripts defined in package'spackage.jsonfile.
For example,packages/web-console/package.jsonhas"scripts"which has"start"
Knowing this it's easy to run any script of any package.
If you want to work on @questdb/web-console package, you can start its development server with:
yarn workspace @questdb/web-console start
You might need to run yarn workspace @questdb/react-components build first.
localhost:9999 should show web console.
The setup is done! All packages are ready to be worked on.
They all have a readme.md with more details, for instance, here's a link to @questdb/web-console/readme.md.
Vim and VSCode should work out of the box. If they don't or you use some other IDE, you might need to setup and SDK as explained in Yarn documentation.
If you need help, here are some useful links:
- Github issues, might already have an answer to your question
- QuestDB Documentation includes a lot of useful information
- QuestDB Slack join our helpful community!