Skip to content

Latest commit

 

History

History
108 lines (70 loc) · 4 KB

local-development-setup.md

File metadata and controls

108 lines (70 loc) · 4 KB

Local development setup

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:

  1. Clone the repository
  2. Bootstrap dependencies
  3. Run command of a package
  4. Hack!

Each step is described in below.

1. Clone the repository

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.

2. Bootstrap dependencies

node and yarn

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 return 16.13.1
    If it doesn't, you can use fnm or nvm to manage node versions on your machine.
    Then run fnm use or nvm use to set correct version.

  • yarn -v should return v3 (like 3.2.1).
    If it returns command not found, enable yarn by running corepack enable.
    Follow official installation guide if you have trouble.

Bootstrap

Simply run yarn to bootstrap.

All dependencies are already available, so this should be a quick process.

3. Run command of a package

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:

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.

4. Hack!

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: