Profile PictureIan Nuttall
$7

Sell My Repo

Add to cart

Sell My Repo

$7

Sell My Repo is a very simple Next.js boilerplate to sell access to your private GitHub repos using Gumroad for payments.

This product is a real-life example of the app! When you purchase, you'll get an invite to the repo which you can fork and deploy to Vercel for free.

Following the guide below, you can set up your own free app and start selling access to your code.

The entire app was built with AI, using Cursor and v0 for the UI.


1. Add Custom Field to Gumroad Checkout

  1. Go to the Checkout form settings in Gumroad
  2. Set "Type of field" to "Text"
  3. Mark it as "Required"
  4. Add a new field with the label "GitHub Username"
  5. Add the product(s) you want to add this field to
  6. Save your changes

2. Add License Key to Gumroad Product

  1. In your Gumroad product settings, click "Insert" and then "License key"
  2. Copy the product ID from the license block (so we can add it to the .env file later)
  3. Save your changes

3. Create GitHub Personal Access Token

  1. Go to Developer Settings > Personal access tokens in Github
  2. Click "Generate new token"
  3. Set a name and expiration for your token (we recommend 1 year)
  4. Under "Repository access", chose "Only select repositories" and select your repo
  5. Under "Permissions", give "Read and write" access to "Administration"
  6. Generate the token and copy it (you'll need it for the next step)

4. Set Up Environment Variables

Add the following variables to your .env.local file:

GUMROAD_PRODUCT_ID=your_gumroad_product_id
GITHUB_ACCESS_TOKEN=your_github_personal_access_token
GITHUB_REPO_OWNER=your_github_username
GITHUB_REPO_NAME=your_repository_name

5. Deploy to Vercel via GitHub

  1. Push your project to a GitHub repository
  2. Go to Vercel and sign in
  3. Click "Add New Project"
  4. Select your GitHub repository
  5. Vercel will automatically detect it's a Next.js project
  6. In the "Environment Variables" section, copy and past the variables from your .env.local file
  7. Click "Deploy"

All Set!

Your app is now set up and ready to sell access to your private GitHub repository via Gumroad.

Add to cart
4 sales
Copy product URL