-
-
Notifications
You must be signed in to change notification settings - Fork 417
docs/dev: add local run instructions and idempotent migrations (#4290) #4297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
docs/dev: add local run instructions and idempotent migrations (#4290) #4297
Conversation
…inations#4290) - Add migrate:development script that verifies skipped migrations and re-applies when needed - Add support for local index application via apply-indexes.js --local - Update README / DEVELOP.md with 'run locally' instructions
👷 Deploy request for pollinations pending review.Visit the deploys page to approve it
|
✅ Deploy Preview for pollinations-react-hooks-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi! |
|
Hi! @Circuit-Overtime |
|
@claude can you review? there seem to be a few empty files |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Hi @voodoohop, I opened a cleanup PR for the repo: |
|
hey @yashx007 i didnt quite understand the cleanup PR. it seems to be adding empty files |
|
@voodoohop sorry for that, u can verify - I have removed the unnecessary files as suggested. Also that cleanup PR was intended to remove a small set of zero-byte / problematic files that were tripping CI and file-parsing (some had non-ASCII trailing characters in their names). That made it look like “empty files were being added,” but the goal was to remove the unused/unsafe ones while preserving anything that could break builds. |
|
@voodoohop check it i have removed auth.pollinations.ai/GET and added one small line to README.md to force a Netlify rebuild. |
|
@yashx007 sorry for the delay. ive been on holiday. will check it in the next few days |
|
@voodoohop no worries, just lemme know if there are any changes required whenever u will review. |


Summary
This PR implements a complete “run locally” developer flow for the auth service and makes the local migration runner idempotent and resilient.
Key outcomes:
migrate:developmentscript that safely runs local D1 migrations and verifies their effects.This addresses issue #4290 by providing clear, repeatable steps for running the service locally and a safer migration runner for developer machines.
Changes
migrate-development.js
wrangler d1 migrations list.[SKIPPED],[APPLYING],[APPLIED]for visibility.apply-indexes.js
--localsupport to execute index creation against the local D1 preview DB.package.json
"migrate:development": "node ./scripts/migrate-development.js"wrangler dev --port 3333.README.md / DEVELOP.md (auth.pollinations.ai)
.dev.varsusage and the need to provide real secrets (GITHUB_CLIENT_ID/SECRET, JWT_SECRET, etc.).Verification (what I ran locally)
Install dependencies
Run idempotent migrations
[SKIPPED])apply-indexes.js --localConfirm D1 tables exist
npx wrangler d1 execute github_auth --local --command "SELECT name FROM sqlite_master WHERE type='table';"users,domains,oauth_state, etc.)Start dev server
http://127.0.0.1:3333Test /authorize endpoint
curl -i "http://127.0.0.1:3333/authorize?redirect_uri=http://127.0.0.1:3333/callback"Verify oauth_state rows
Notes: Missing-table errors observed early were fixed by re-applying migrations; the runner now automatically handles this.
Known manual steps / developer notes
Secrets: Populate
.dev.varswith valid credentials:REDIRECT_URI.Nix: Recommended for repeatable dev; quick PowerShell/WSL path also documented.
Wrangler / D1: Runner expects a local D1 preview DB (
--local). If port conflicts occur, usewrangler dev --no-open --port 3333.Closes #4290