Backend for arkham.build. At the moment, it provides card recommendations based on aggregating ArkhamDB deck guides.
- The app is a Node.js HTTP API written in Typescript using the Hono framework.
- Data is ingested from several upstream sources with a daily cron job, stored in a Postgres database and accessed via kysely. Database migrations are handled with dbmate.
- Kamal is used to deploy the app to a Digital Ocean droplet previously prepared with an Ansible playbook.
- Integration tests use Vitest, and Testcontainers to work against a real database.
The original recommendation logic was contributed by Sy Brand / TartanLlama in a separate project and has since been ported over.
# install tooling dependencies
npm install
# start docker compose
make up
# (separate shell) run migrations
make migrate-up
# (separate shell) ingest data
make ingest
# more commands are available in Makefile
# run tests
npm test
# auto-format code
npm run fmt
# lint code
npm run lint
# check types
npm run check
You can find a pre-configured Yaak workspace in ./config/yaak
.
Refer to available Kamal commands and the additional aliases
in the deploy.yml
file.