score-the-pigs/README.md

37 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2025-03-11 23:42:37 +00:00
# biff-sqlite
This is a modified version of
[biff-postgres](https://github.com/jacobobryant/biff-postgres/tree/master) to
use SQLite. In addition to replacing PostgreSQL with SQLite, I've also:
- removed tailwind (in favor of [pico.css](https://picocss.com/)) and recaptcha
- removed all links to unpkg by vendoring all css and js directly
- brought in [HoneySQL](https://github.com/seancorfield/honeysql) to replace writing raw SQL
- brought in [Migratus](https://github.com/yogthos/migratus) to manage migrations
- attempted to silence all kondo warnings
# getting started
``` bash
MY_PROJECT_NAME="dashboard-for-ynab"
git clone https://git.sr.ht/~luciano/biff-sqlite $MY_PROJECT_NAME
cd $MY_PROJECT_NAME
rm -rf .git
git init
git add .
git commit -m "biff-sqlite starter"
clj-kondo --lint "$(clojure -Spath)" --dependencies --parallel --copy-configs
clj -M:dev dev
```
Run `clj -M:dev dev` like usual and then connect with a REPL on :7888.
You may want to rename the `com.biffweb` namespace prefix to your own, as well
as change the strings `my_project` and `my-project` everywhere they're present.
That's left as an exercise for the reader at this time.
# Deploying to production
I intend to deploy projects built off this template with fly.io but I haven't
set everything up for that just yet. Essentially you need to configure a fly
volume, make an SQLite db there, then point the #prod DB_URL at it.