Skip to content

arkham-build/api.arkham.build

Repository files navigation

api.arkham.build

Backend for arkham.build. At the moment, it provides card recommendations based on aggregating ArkhamDB deck guides.

Overview

  • 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.

Acknowledgements

The original recommendation logic was contributed by Sy Brand / TartanLlama in a separate project and has since been ported over.

Develop

# 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.

Deploy

Refer to available Kamal commands and the additional aliases in the deploy.yml file.

About

Backend for arkham.build. Very work-in-progress.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •