# Cloudflare Pages project for the card app (card.glitchonsol.com). Its own project, not # part of glitchonsolana, so the signing endpoint never shares a deploy with the main site. # # This file is the source of truth for vars and bindings: the dashboard can't edit them while it # exists. Top level = local dev (wrangler pages dev, against scripts/local-chain.ts). Production = mainnet. Preview = the devnet # rehearsal, deployed with --branch devnet. vars and d1_databases don't inherit, so each # environment repeats both in full. # # Secrets (not in this file): # production: npx wrangler pages secret put --project-name glitch-card --env production < # preview: npx wrangler pages secret put --project-name glitch-card --env preview < # (piped from a file, so a key never passes through a browser or the clipboard) # COSIGNER_SECRET the co-signer keypair, JSON array of 64 numbers (card/keys/-cosigner.json) # RPC_URL the Helius RPC URL with its key # RATE_SALT any long random string; keys the rate-limit hash of client IPs (required on devnet and mainnet) # The API refuses to start without RATE_SALT outside localnet, and on mainnet also without RPC_DAS=1 # and ALLOWED_HOSTS (server/env.ts). # Local dev talks only to the local chain (localnet refuses any RPC_URL but 127.0.0.1). name = "glitch-card" pages_build_output_dir = "dist" compatibility_date = "2026-07-29" # @solana/kit ships its Node build to workerd and expects the Node compatibility layer. compatibility_flags = ["nodejs_compat"] [vars] CLUSTER = "localnet" RPC_DAS = "0" [[d1_databases]] binding = "DB" database_name = "glitch-card-local" database_id = "00000000-0000-0000-0000-000000000000" migrations_dir = "migrations" [env.preview.vars] CLUSTER = "devnet" RPC_DAS = "1" # The branch alias the devnet rehearsal is deployed to (the project is glitch-card.pages.dev). ALLOWED_HOSTS = "devnet.glitch-card.pages.dev" [[env.preview.d1_databases]] binding = "DB" database_name = "glitch-card-devnet" database_id = "01f3a9d3-dbad-4199-9b19-417e7db8d837" migrations_dir = "migrations" [env.production.vars] CLUSTER = "mainnet" RPC_DAS = "1" ALLOWED_HOSTS = "card.glitchonsol.com" [[env.production.d1_databases]] binding = "DB" database_name = "glitch-card" database_id = "5f6fef95-7091-4e99-815e-1d4ff8538154" migrations_dir = "migrations"