Skip to content

docs: document the share-publish local dev stack#387

Merged
graydawnc merged 1 commit into
mainfrom
docs/share-dev-stack
Jun 10, 2026
Merged

docs: document the share-publish local dev stack#387
graydawnc merged 1 commit into
mainfrom
docs/share-dev-stack

Conversation

@graydawnc

Copy link
Copy Markdown
Collaborator

What

  • CONTRIBUTING.md: a new "Share publish: local dev stack" section — the one-time Google Console setup (desktop + web OAuth clients, including the http://localhost:3002/api/auth/google/callback redirect-URI registration), the two gitignored config files and why there are two (wrangler and electron-vite each have their own loader), local D1 migrations, and ./scripts/share-dev.sh. The project-structure tree also gains the four share-era packages (redact, share-kit, share-backend, share-web) it was missing.
  • .dev.vars.example: adds PUBLIC_BASE_URL=http://localhost:3002 — OAuth start/callback derive the redirect_uri from it, and without the override every dev web sign-in 400s with redirect_uri_mismatch against the registered URI.
  • scripts/share-dev.sh: the precheck now covers SPOOL_GOOGLE_CLIENT_SECRET_DESKTOP (the token exchange needs it; previously only the id was checked, so the script booted fine and sign-in failed at runtime) and accepts packages/app/.env.development.local as the source for both values — electron-vite inlines that file into the main bundle, so a filled env file needs zero shell exports. Exports still work and take precedence.

Why

Setting up the stack for the first time today hit four undocumented walls in sequence, each one only diagnosable by reading source. Everything here is the walkthrough that would have made it a five-minute setup.

Test plan

  • bash -n clean; precheck verified against a filled env file (passes), a missing var (errors with the file-or-export hint), and shell-export-only (passes)
  • Full stack booted end-to-end with this setup today: real Google sign-in on desktop and web, publish, visibility toggle

🤖 Generated with Claude Code

Setting up the publish stack for the first time hit four undocumented
walls in a row: the app needs its own .env.development.local (the
share-dev.sh header only mentioned .dev.vars + a shell export), the
desktop OAuth client needs its secret too (the script only checked the
id), web sign-in 400s with redirect_uri_mismatch unless PUBLIC_BASE_URL
points at the share-web origin, and none of it was findable from
CONTRIBUTING.

- CONTRIBUTING: new "Share publish: local dev stack" walkthrough
  (Google Console clients incl. the redirect-URI registration, the two
  config files, D1 migrations, share-dev.sh); project-structure tree
  gains the four share-era packages
- .dev.vars.example: PUBLIC_BASE_URL=http://localhost:3002 with the
  redirect_uri_mismatch warning
- share-dev.sh: precheck covers the desktop client secret and accepts
  packages/app/.env.development.local as the source (electron-vite
  inlines the file; shell exports stay supported and win)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@graydawnc
graydawnc added this pull request to the merge queue Jun 10, 2026
Merged via the queue into main with commit 024b43e Jun 10, 2026
6 checks passed
@graydawnc
graydawnc deleted the docs/share-dev-stack branch June 10, 2026 11:51
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.

1 participant