Create interactive, web-based data visualization user studies by editing study configs and adding stimuli in public/.
For full local + DigitalOcean deployment/testing instructions, see deploy/DEPLOYMENT_RUNBOOK.md.
-
Install Node + Yarn.
-
Install dependencies:
yarn install -
Run the frontend dev server:
yarn serve -
Open http://localhost:8080.
-
Start Supabase services (with local ports):
docker network inspect revisit_net >/dev/null 2>&1 || docker network create revisit_netdocker compose -f supabase/docker-compose.yml -f supabase/docker-compose.local.yml --env-file supabase/.env up -d -
Point your local Vite app to Kong by setting:
VITE_STORAGE_ENGINE="supabase"VITE_SUPABASE_URL="http://localhost:8000"VITE_SUPABASE_ANON_KEY="<same value as ANON_KEY in supabase/.env>"
This runs app + reverse proxy + Supabase in containers.
-
Create shared network once:
docker network inspect revisit_net >/dev/null 2>&1 || docker network create revisit_net -
Start Supabase stack:
docker compose -f supabase/docker-compose.yml --env-file supabase/.env up -d -
Start app + Caddy proxy:
VITE_SUPABASE_ANON_KEY="<ANON_KEY from supabase/.env>" docker compose -f docker-compose.local.yml --env-file deploy/.env.local.example up -d --build -
Open:
- App: http://localhost:8080
- API base:
http://api.localhost:8080
If api.localhost does not resolve on your machine, add 127.0.0.1 api.localhost to your hosts file.
This setup uses two public domains:
- Study UI:
study.<your-domain> - Supabase API gateway:
api.<your-domain>
-
Copy and edit env templates:
cp deploy/.env.prod.example deploy/.env.prod- Update
deploy/.env.prodwith real domains. - Update
supabase/.envwith strong secrets and production URLs.
-
Ensure these Supabase values match your domains:
SITE_URL=https://<study-domain>API_EXTERNAL_URL=https://<api-domain>SUPABASE_PUBLIC_URL=https://<api-domain>
-
Create shared network:
docker network inspect revisit_net >/dev/null 2>&1 || docker network create revisit_net -
Start Supabase services:
docker compose -f supabase/docker-compose.yml --env-file supabase/.env up -d -
Build/start app + reverse proxy:
VITE_SUPABASE_ANON_KEY="<ANON_KEY from supabase/.env>" docker compose -f docker-compose.prod.yml --env-file deploy/.env.prod up -d --build -
Open firewall only for
80/443publicly. Keep admin/internal ports private.
- The app image now serves SPA routes correctly via nginx fallback to
index.html. - Production Docker build forces
VITE_BASE_PATH=/. - Configure your root app
.env/ build args forVITE_STORAGE_ENGINE,VITE_SUPABASE_URL, andVITE_SUPABASE_ANON_KEYto match your deployment.