Action is everything.
brew install orbstack; # i.e. docker
brew install n;
n latest; # or whatever...?
npm i -g pnpm; # pnpm is the 🐐
cargo install surrealdb-migrations@2.0.0; # TODO: work this into package.jsonpnpm i
pnpm docker
pnpm dev
pnpm shipit
pnpm migrate:production
To generate embeddings for semantic search:
- Install Python 3
brew install python3- Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate- Install dependencies
pip install -r requirements.txt- Run embeddings generation
pnpm py:embedThis will use the SentenceBERT model to generate embeddings for all books and verses, which enables semantic search functionality.
The seed script is run on pnpm docker and will look for export.surql to use as the initial db. If export.surql is not found, then the seed database is generated with a default user:
{
email: 'foely.justinj@gmail.com'
password: 'asdf'
}
surrealdb-migrations scaffold template empty
To create a production version of your app:
npm run buildYou can preview the production build with npm run preview.
mkdir deploy-surreal && cd deploy-surreal
Create Dockerfile (code Dockerfile):
# Dockerfile
FROM surrealdb/surrealdb:latest
EXPOSE 8080
CMD ["start", "--bind", "0.0.0.0:8080", "file://data/srdb.db"]
fly launch --no-deploy
You'll see a message like this. Say less Fly, y.
❯ fly launch --no-deploy
Scanning source code
Detected a Dockerfile app
Creating app in /Users/jfols/repos/actio/deploy-surreal
We're about to launch your app on Fly.io. Here's what you're getting:
Organization: Justin (fly launch defaults to the personal org)
Name: deploy-surreal (derived from your directory name)
Region: Ashburn, Virginia (US) (this is the fastest region for you)
App Machines: shared-cpu-1x, 1GB RAM (most apps need about 1GB of RAM)
Postgres: <none> (not requested)
Redis: <none> (not requested)
Sentry: false (not requested)
? Do you want to tweak these settings before proceeding? (y/N)
Accept the defaults on fly.io page that's opened (no Postgres or other add ons).
- Choose an app name: Choose what you like. It will end up as name.fly.dev, so it must be a unique name.
- Choose a region: Choose what you like, usually a region close to your users.
- Setup postgres database?: No, we will persist storage through a volume.
- Setup upstash redis database?: No, we will persist storage through a volume.
- Would you like to deploy now?: No, we need to finalize our configuration first.
fly volumes create data --region --size 1
Get the region from the generated fly.toml,(e.g. primary_region = 'iad').
Add [mounts] seciton to fly.toml with the volume name. data is the default volume name, (e.g. Name: data output from creating the volume), change as appropriate if you set a custom name.
[mounts]
source="data"
destination="/data"
Set secrets:
fly secrets set SURREAL_USER="root"
fly secrets set SURREAL_PASS="..."
fly secrets set SURREAL_CAPS_ALLOW_ALL="true"3, 2, 1, 🚀
fly deploy- CD
- Verse Actions
- Notes
- Concepts
- People (including genealogy)
- Geography
- Bible AI Generated:
- Semantic relationships to concepts and people
- Semantic groupings of verses by theme
- Semantic relationships between people and places
- XState Inspector
- Persisted state with snapshot using Actor.getPersistedSnapshot() (https://stately.ai/docs/persistence)
- SurrealDB token
- Better signing management
- Improved security attributes (SameSite, Secure, HttpOnly)
- Two-finger scroll by chapter
- Unit tests: book machine
- E2E Tests
- Account creation/login/logout/password reset
- Book reading/verse actions
- Progress tracking on table of contents