docs: document the share-publish local dev stack#387
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
http://localhost:3002/api/auth/google/callbackredirect-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.PUBLIC_BASE_URL=http://localhost:3002— OAuth start/callback derive theredirect_urifrom it, and without the override every dev web sign-in 400s withredirect_uri_mismatchagainst the registered URI.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 acceptspackages/app/.env.development.localas 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 -nclean; precheck verified against a filled env file (passes), a missing var (errors with the file-or-export hint), and shell-export-only (passes)🤖 Generated with Claude Code