| Address | What it shows |
|---|---|
winedog.site |
A blank black page (or your photo, once you add it) |
winedog.site/1 |
Sign-in, then the homepage (a clock for now) |
winedog.site/dev |
Your dev panel for managing accounts |
GitHub Pages (docs/) Cloudflare Worker (worker/)
/ blank image /api/login checks email + code
/1 sign-in + page shell → /api/me sends the protected homepage
/dev panel shell /api/admin/* accounts, codes, sessions, email
D1 database accounts and remembered devices
GitHub only hosts the page shells, so it holds nothing secret. The accounts, the codes and
the homepage content all live in Cloudflare. Someone reading the GitHub files sees only an
empty login form, and the homepage content (worker/src/home.js) is sent only after a
correct email and code.
When someone signs in, their device keeps a random sign-in key. They stay signed in forever on that device until you change their code, disable or delete the account, or sign that device out from the panel.
You need Node.js (LTS) installed. Run the commands below in a terminal
(PowerShell is fine) from the Winedog folder.
cd worker
npm install
npx wrangler login # opens your browser to sign in to Cloudflare
npx wrangler d1 create winedog # prints a database_id
Open worker/wrangler.toml and replace PASTE-DATABASE-ID-HERE with that database_id. Then:
npm run db:init # creates the tables
npx wrangler secret put ADMIN_PASSWORD # type the password you'll use for /dev
npm run deploy # prints your Worker URL
The deploy prints a URL like https://winedog-api.yourname.workers.dev.
Paste it into docs/assets/config.js in place of
https://winedog-api.YOUR-SUBDOMAIN.workers.dev.
Winedog, and uncheck “Keep this code private”.
GitHub Pages needs a public repo on a free plan. That’s safe here because nothing secret is in the repo.winedog.site, then Save. Tick Enforce HTTPS once it becomes available (it can take up to an hour).In Namecheap, go to Domain List → winedog.site → Manage → Advanced DNS and delete any existing parking-page records. Then add:
| Type | Host | Value |
|---|---|---|
| A Record | @ |
185.199.108.153 |
| A Record | @ |
185.199.109.153 |
| A Record | @ |
185.199.110.153 |
| A Record | @ |
185.199.111.153 |
| CNAME Record | www |
SillyMonkeyFlip.github.io. (your GitHub username) |
DNS changes can take from a few minutes to a few hours.
Until this is done, the Email code button opens your own mail app with the message filled in.
winedog.site.worker folder and paste the key:
npx wrangler secret put RESEND_API_KEY
Emails come from noreply@winedog.site and say: Your code for Winedog.site is CODE.
You can change the sender in wrangler.toml (EMAIL_FROM), then run npm run deploy.
winedog.site/dev, sign in with your admin password, fill in their email,
pick a role (Normal or Special), type a code or click Random (3 characters), and optionally tick
“Email the code to them now”.The admin sign-in lasts 12 hours on a device.
docs/image.jpg, then commit and push.worker/src/home.js, then run npm run deploy from the worker folder.
Keep private content there, not in docs/, because everything in docs/ is public on GitHub.
account.role is passed in, ready for showing Special users different things later.docs/assets/style.css.# terminal 1
cd worker
echo ADMIN_PASSWORD=test > .dev.vars
npm run db:init:local
npm run dev
# terminal 2
cd docs
npx serve -l 8080
Then open http://localhost:8080/dev/ (password test) and http://localhost:8080/1/.