Chain.Love Contributor helps non-technical contributors propose updates to the Chain.Love infrastructure database. The tool mirrors the Chain.Love style guide, validates input with Zod, authenticates with GitHub via NextAuth, and automatically opens a pull request with the generated CSV entries.
- Step-by-step wizard – explains provider vs. network entries, collects data, and surfaces style guide hints.
- Dynamic validation – category-specific Zod schemas ensure slugs, booleans, and JSON columns match repository rules.
- GitHub automation – forks the upstream repo, creates a branch, commits CSV updates, and opens a PR.
- Submission summary – preview the serialized CSV rows before sending the pull request.
- Node.js 20+
- npm (or compatible package manager)
- GitHub OAuth app configured for this project
Create a .env.local file (or use the provided .env.example) with the following values:
GITHUB_CLIENT_ID=your_github_oauth_app_id
GITHUB_CLIENT_SECRET=your_github_oauth_app_secret
NEXTAUTH_SECRET=generate_a_random_32_character_string
# Optional overrides (defaults are Chain-Love/chain-love, main)
UPSTREAM_OWNER=Chain-Love
UPSTREAM_REPO=chain-love
UPSTREAM_BASE_BRANCH=main
Set the callback URL in your GitHub OAuth app to:
http://localhost:3000/api/auth/callback/github
(Replace the host when deploying.)
npm install
npm run devOpen http://localhost:3000 to access the wizard. Use Connect GitHub to sign in; the session provides the short-lived token required to create forks, branches, and pull requests.
- Overview – learn when to add provider entries vs. network overrides.
- Category & Scope – choose the service category and whether you’re adding a reusable provider row, a network reference, or a network-only entry.
- Details – fill the form tailored to the selected category. Boolean toggles output
TRUE/FALSE, lists convert to JSON arrays, and slug generation helps maintain naming consistency. - Review & Submit – preview the CSV rows, then submit. The app will fork the repo if necessary, commit the changes to a new branch, and open a pull request. The resulting PR link is displayed for follow-up actions (star repo, share in Discussion #41, etc.).
app/– Next.js App Router pages and API routes (OAuth, submissions).components/– UI primitives and the submission wizard components.lib/– Validation schemas, GitHub helpers, and shared utilities.docs/– Internal planning notes for data model, auth setup, validation, PR flow, and documentation plan.
npm run dev– start the development server.npm run build– generate a production build.npm run start– run the production build.npm run lint– run eslint (custom config excludes the upstream/widget clones).
- Update the OAuth callback URL in your GitHub app to the deployed domain.
- Provide the same environment variables (
GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET,NEXTAUTH_SECRET, and optional upstream overrides) on the hosting platform. - Ensure the deployment has write access to GitHub (users must sign in to authorize the app).
This project is released under the MIT License.