Getting started
Run Rupert locally with Ruby, PostgreSQL, and the Shopify tooling it needs.
Requirements
- Ruby 4.0.6 (via rbenv — see
.ruby-version) - Bundler
- PostgreSQL 16
- Node (for the Shopify CLI, if developing the app install)
Set up
# 1. Install gems (from web/)
bundle install
# 2. Copy the env template and fill in credentials
cp .env.example .env
# 3. Create the postgres role + db (or set POSTGRES_* env vars)
createuser -s rupert
createdb -O rupert rupert_development
# 4. Prepare the database
bin/rails db:create db:migrate
# 5. Build the Tailwind CSS
bin/rails tailwindcss:build
# 6. Run the server
bin/rails server # http://localhost:3000
Environment variables
The .env at the repo root is loaded at boot (Dotenv) and holds the sync-engine credentials:
SHOPIFY_CLIENT_ID/SHOPIFY_CLIENT_SECRET— Shopify sync credentialsSQUARE_ACCESS_TOKEN(+ optionalSQUARE_LOCATION_ID,SQUARE_ENVIRONMENT)SYNC_MINUTES— how often scheduled syncs runGOOGLE_DRIVE_*— automated database backupsBUZZ_*— the Nostr relay + keys for the team agent
When developing through the Shopify CLI, the OAuth pair (SHOPIFY_API_KEY / SHOPIFY_API_SECRET) comes from shopify app info --web-env.
One-time data migration
# Pull historical data from the legacy SQLite mirror into PostgreSQL
bin/rails db:import_legacy
Run the tests
bin/rails test # full suite (integration + unit)