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 [email protected]: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 -v
should return16.13.1
If it doesn't, you can use fnm or nvm to manage node versions on your machine.
Then runfnm use
ornvm use
to set correct version. -
yarn -v
should return v3 (like3.2.1
).
If it returnscommand not found
, enableyarn
by 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-name
is the"name"
property in package'spackage.json
file.
For example,packages/web-console/package.json
has"name": "@questdb/web-console"
. -
$script
is one of the scripts defined in package'spackage.json
file.
For example,packages/web-console/package.json
has"scripts"
which has"start"
Knowing this it's easy to run any script of any package.
For example, if you want to work on the @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 display the 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, further details on working with the web console locally can be found
in @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 an 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!