# ScoreHub — Cloudflare Pages Setup ## Deploy steps (~10 minutes, free) ### 1. Create a free Cloudflare account Go to https://cloudflare.com → Sign up ### 2. Create a KV Namespace (cloud storage) 1. Cloudflare dashboard → **Workers & Pages → KV** 2. Click **Create namespace** → name it `SCOREHUB_KV` → Create 3. Copy the **Namespace ID** shown — you'll need it in step 5 ### 3. Put files on GitHub 1. Go to https://github.com → New repository → name it `scorehub` → Create 2. Click "uploading an existing file" → drag ALL files from this folder → Commit ### 4. Connect to Cloudflare Pages 1. Cloudflare dashboard → **Workers & Pages → Create → Pages** 2. Click **Connect to Git** → select your `scorehub` repo 3. Build settings: - Framework preset: **None** - Build command: (leave blank) - Build output directory: `/` 4. Click **Save and Deploy** ### 5. Bind KV + set environment variables 1. Go to your Pages project → **Settings → Functions** 2. Under **KV namespace bindings** → Add binding: - Variable name: `SCOREHUB_KV` - KV namespace: select `SCOREHUB_KV` 3. Go to **Settings → Environment variables** → Add: - `ADMIN_PASSWORD` → your admin password - `GOOGLE_SHEET_ID` → (optional, for Sheets integration) - `GOOGLE_CLIENT_EMAIL` → (optional) - `GOOGLE_PRIVATE_KEY` → (optional) 4. **Deployments → Retry deploy** to apply --- ## How to use ### Admin - Open `https://your-site.pages.dev` → enter admin password - **Scorecards tab**: upload team .html files - **Coaches tab**: add coaches, set username/password, assign teams ### Coaches - Open `https://your-site.pages.dev/coach.html` - Log in with their username & password - They see only their assigned teams — tap to open and score