To build Tad, you should have node and npm
(https://www.npmjs.com/get-npm) (included when you install Node.js) installed. The versions of these tools used for development are:
$ node --version
v19.3.0
$ npm --version
9.2.0
Once you have Node installed, run npm install
at the top level:
$ npm install
Lerna supports a process called bootstrapping that links local packages together and installs any remaining dependencies. To the extent possible, lerna tries to hoist common dependencies needed by different packages in the monorepo. To bootstrap Tad correctly, run the following:
$ npm run bootstrap
This runs the standard lerna bootstrap
command with a few extra arguments needed for how Tad's source is structured.
After bootstrapping, run the following script to try and build everything, including the web app (tadweb-app), reference web server (tadweb-server), and desktop app:
$ ./tools/build-all.sh
$ cd packages/tad-app
$ npm start -- csv/movie_metadata.csv
If all went well, the Tad app should start with a view of csv/movie_metadata.csv
$ cd packages/tadweb-server
$ npm start
If all goes well, you will see something like:
db initialization complete
Listening on port 9000
open a web browser to localhost:9000
and you should see Tad in your web browser.
You can try out the experimental backends by setting appropriate environment variables and un-commenting
the relevant init
calls in main()
in ../src/tadweb-server/server.ts.
If you want to try the experimental reltab-snowflake backend, set the environment variables $RELTAB_SNOWFLAKE_ACCOUNT
, $RELTAB_SNOWFLAKE_USERNAME
and $RELTAB_SNOWFLAKE_PASSWORD
with a valid account name, username and password, respectively, for your Snowflake account.
If you If you want to try the experimental reltab-bigquery backend, and have a Google BigQuery account, set the environment variable $GOOGLE_APPLICATION_CREDENTIALS
to the path of a bigquery account credentials JSON file.
When iterating on the UI during development, I recommend keeping a couple of windows open:
- In
packages\tadviewer
, runnpm run watch
- In
packages\tad-app
, runnpm run watch
Note that you'll still have to run npm run build
if you make changes in any of the other library packages (reltab
,
reltab-duckdb
, aggtree
).
Similar to above, but with three windows open:
- In
packages\tadviewer
, runnpm run watch
- In
packages\tadweb-app
, runnpm run watch
- In
tadweb-server
, runningnpm start
With those running continuously, you should be able to just hit reload in your browser on localhost:9000
to pick up any code changes. You'll still have to run npm run build
if you make changes in any of the other library packages (reltab
,
reltab-duckdb
, aggtree
, etc.).
Log information (from electron-log):
- on Linux: ~/.config/Tad/main.log
- on OS X: ~/Library/Logs/Tad/main.log
- on Windows: %USERPROFILE%\AppData\Roaming\Tad\main.log