Everything you need to build a Svelte project, powered by sv.
If you're seeing this, you've probably already done this step. Congrats!
# create a new project
npx sv create my-appTo recreate this project with the same configuration:
# recreate this project
bun x sv@0.15.1 create --template minimal --types ts --add tailwindcss="plugins:none" --install bun biobank-v2Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --openTo create a production version of your app:
npm run buildYou can preview the production build with npm run preview.
To deploy your app, you may need to install an adapter for your target environment.
Local development starts Docker PostgreSQL and runs the Worker locally:
./dev.shForce a local Postgres reseed from normalized source data:
SEED=1 ./dev.shProduction deploy builds the SvelteKit Worker and deploys it with the Hyperdrive
binding from wrangler.jsonc:
./deploy.shPreview deploy publishes a separate Worker on *.workers.dev (no custom domains).
It uses the same prod Hyperdrive binding, so treat it as live data:
./deploy-preview.sh
# or: bun run deploy:previewUse ?tenant= on the workers.dev URL, e.g. ?tenant=bipmed.
The live database connection is stored in Cloudflare Hyperdrive. Local development
uses DATABASE_URL from .env when present, otherwise it falls back to the Docker
PostgreSQL URL:
postgresql://biovault_data_user:biovault_data_password@127.0.0.1:55432/biovault_data?sslmode=disablePostgreSQL is the only runtime database for local development and production.
To reseed the local Docker database from the normalized source data:
bun run db:pg:seed