Skip to content

Add local dev tooling for testing the /purge console - #24

Merged
cable8mm merged 2 commits into
mainfrom
local-purge-dev-tooling
Oct 19, 2026
Merged

cable8mm merged 2 commits into
mainfrom
local-purge-dev-tooling

Conversation

@cable8mm

Copy link
Copy Markdown
Contributor

Summary

  • Add an opt-in CF_ACCESS_DEV_BYPASS env var that skips Cloudflare Access JWT verification for local development only (default off; must never be set in a deployed environment).
  • Add a Vite dev proxy so /purge/catalog and /purge/execute reach the local backend while running npm run dev.
  • Fix the Vite dev base path — in dev mode it was stripping the /purge/ prefix and serving the landing page instead of the operator console at /purge/; the production build (which needs base: '/purge/' for asset URLs) is unaffected.
  • Add npm run dev:purge to build and run the backend + Vite together in one command, with no new dependency.
  • Make the "경로 입력" textarea placeholder reflect the currently selected service instead of always showing wifinote.
  • Document all of the above in README.md and .replworks/TECH_STACK.md.

Test plan

  • npm run typecheck
  • npm test (28 tests pass, including a new DB1 config test for the dev bypass default)
  • npm run build
  • Manually ran npm run dev:purge, opened /purge/ in a browser, confirmed the service catalog loads and the placeholder updates when switching services/modes
  • Did not exercise the "실행" (execute) purge action against real Cloudflare credentials

🤖 Generated with Claude Code

Cloudflare Access blocked testing the operator console on a local
dev server. Add an opt-in CF_ACCESS_DEV_BYPASS env var that skips
JWT verification for local development only, wire a Vite dev proxy
so /purge/catalog and /purge/execute reach the local backend, fix
the Vite dev base path so purge/index.html is actually reachable at
/purge/ in dev, and add a dev:purge script to run build+backend+Vite
together. Also make the path-input placeholder reflect the selected
service instead of always showing "wifinote".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The .env.* gitignore pattern meant to cover local env variants
(.env.local, etc.) also matched .env.example, so it was never
actually committed even though the README links to it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@cable8mm
cable8mm merged commit 52597c6 into main Oct 19, 2026
1 check passed
@cable8mm
cable8mm deleted the local-purge-dev-tooling branch October 19, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants