presciencelabs / tabitha-targets

0 stars 0 forks source link

Sources API

Available at https://targets.tbta.bible

API

https://targets.tbta.bible/English/John/1/1

Local development

pnpm i

Running locally

1. Load the database

Dump files can be found under the "Artifacts" section of the workflow runs of the databases repo: https://github.com/presciencelabs/tabitha-databases/actions/workflows/deploy.yml

Running the following command will load the data locally:

wrangler d1 execute <DB_NAME_FROM_WRANGLER_TOML_FILE> --file=<DB_NAME_FROM_WRANGLER_TOML_FILE>.tabitha.sqlite.sql

2. Start the app

pnpm build will need to be run the first time only.

pnpm dev

The site should then be available here: http://localhost:8788

Static analysis

pnpm check

Testing locally

pnpm exec playwright install will need to be run at least once to get the headless browsers for testing.

pnpm test:e2e

🐛 debugging tests can be done with pnpm test:e2e:dev.

Contributing

Always start your work in a new branch.

Run the following command as a last check before opening a PR

pnpm precommit

Error handling

TODO: will integrate Sentry once https://github.com/getsentry/sentry-javascript/issues/8291 is fixed.