Cloudflare D1
Initialize your local database and prepare your own production D1 database
ShipStart uses Cloudflare D1 for accounts, orders, credits, configuration, and AI jobs. You can initialize local D1 without creating a remote database.
1. Initialize local data
Run in the project folder:
pnpm db:migrate:localWhen prompted, confirm applying the migrations. Wrangler creates the local database and applies the SQL files in drizzle/.
If you want the AI model and price catalogue, also run:
pnpm db:seed:local2. Check the database
pnpm exec wrangler d1 execute D1 --local --command "SELECT name FROM sqlite_master WHERE type='table';"This command uses the D1 binding in wrangler.jsonc, so it works with your configured database name.
You should see the application tables. If login reports a missing table, stop the dev server, run the local migrations, and restart pnpm dev.
You can now return to Authentication or Environment configuration.
3. Prepare the Live Database
When you are ready to publish, follow steps 2 and 3 of Deploy to Cloudflare to create D1 in your account, update the settings, and initialize it. Reuse that database if you already created it.
Live data is separate from local data. Register your admin account again on the live site and set up its admin options.
To check the live database, run:
pnpm exec wrangler d1 execute D1 --remote --command "SELECT name FROM sqlite_master WHERE type='table';"If the application tables are listed, initialization is complete. Next, test registration with the Authentication guide.
When You Need a New Table
Everyday use and admin configuration do not require table changes. When a new product feature needs extra data, follow Database Development.