npm i -g wrangler
wrangler d1 create font-vote
Copy the returned database_id into wrangler.toml.
wrangler pages project create font-vote
wrangler pages secret put GITHUB_CLIENT_ID --project-name font-vote
wrangler pages secret put GITHUB_CLIENT_SECRET --project-name font-vote
wrangler pages secret put COOKIE_SECRET --project-name font-vote
wrangler pages secret put ADMIN_ALLOWLIST --project-name font-vote
wrangler pages secret put BASE_URL --project-name font-vote
Notes:
COOKIE_SECRETshould be a random 32+ char string (e.g. fromopenssl rand -hex 32).ADMIN_ALLOWLISTis a comma-separated list of GitHub logins.BASE_URLis optional; use the public origin (e.g.https://font-vote.pages.dev).
Local:
wrangler d1 execute font-vote --file migrations/0001_init.sql
Production:
wrangler d1 execute font-vote --file migrations/0001_init.sql --remote
Local:
wrangler d1 execute font-vote --file seed_collection1_from_input.sql
Production:
wrangler d1 execute font-vote --file seed_collection1_from_input.sql --remote
Preview (main branch):
wrangler pages deploy public --project-name font-vote --branch main
Production:
wrangler pages deploy public --project-name font-vote --branch production
GET /api/collection1(semantic/icon search, sort)GET /api/journal(semantic/user filter, created sort)GET /api/manifest(fetch manifest.json from CDN with local fallback)GET /api/me(session info)GET /api/auth/github(OAuth start)GET /api/auth/callback(OAuth callback)POST /api/propose(auth required)POST /api/admin/collection1(admin add)PUT /api/admin/collection1(admin edit)DELETE /api/admin/collection1(admin delete)POST /api/admin/apply(admin apply)
wrangler pages dev public