An online real-time version of "The Ground Itself" storytelling TTRPG built with Svelte 5, TypeScript, and Supabase.
Install dependencies:
npm install
Set up local Supabase: See SETUP.md for detailed instructions, or follow the quick start:
# Install Supabase CLI
brew install supabase/tap/supabase # or: npm install -g supabase
# Start Supabase
supabase start
# Copy credentials to .env
cp .env.example .env
# Edit .env with credentials from 'supabase start' output
# Run migrations
supabase db reset
# Generate TypeScript types
npm run supabase:types
Set up HTTPS for mobile testing (optional):
# Install mkcert if not already installed
brew install mkcert
# Run the HTTPS setup script
./scripts/setup-https.sh
This generates SSL certificates for localhost and your local IP address, enabling HTTPS access from mobile devices on the same network.
Start development server:
npm run dev
The server will automatically use HTTPS if certificates are present. Access it at:
https://localhost:5173https://YOUR_LOCAL_IP:5173 (IP shown by setup script)src/lib/supabase/ - Supabase client utilitiessrc/routes/ - SvelteKit routessupabase/migrations/ - Database migrationsMIGRATION_PLAN.md - Implementation plan and progress# Start dev server
npm run dev
# Type check
npm run check
# Lint
npm run lint
# Format code
npm run format
npm run supabase:start # Start Supabase
npm run supabase:stop # Stop Supabase
npm run supabase:reset # Reset database and apply migrations
npm run supabase:status # Check Supabase status
npm run supabase:types # Generate TypeScript types
To test on mobile devices over your local network:
Run the HTTPS setup script:
./scripts/setup-https.sh
This will:
Install the root CA on your mobile device (required for HTTPS to work):
For iOS:
ipconfig getifaddr en0mkcert -CAROOT to see the CA directoryrootCA.pem from that directory to your iPhone (via AirDrop, email, or iCloud)For Android:
ipconfig getifaddr en0mkcert -CAROOT to see the CA directoryrootCA.pem from that directory to your Android deviceStart the dev server:
npm run dev
Access from mobile:
ipconfig getifaddr en0 on macOS)https://YOUR_LOCAL_IP:5173Troubleshooting:
mkcert -key-file certs/localhost-key.pem -cert-file certs/localhost.pem localhost 127.0.0.1 ::1 YOUR_LOCAL_IP