Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 2 KB

README.md

File metadata and controls

67 lines (42 loc) · 2 KB

Integrating Clerk with Grafbase and using Grafbase Next.Js Plugin.

This repo is for my submission for the Grafbase X Hashnode X hackathon which took place from August 1 - August 15, 2023

Getting Started

Either fork the repo or directly clone it

Prerequisites

**Node version 16.8 or later
**macOS, Windows (including WSL), and Linux are supported.

To directly clone the repo

git clone https://github.com/trace2798/nextjs_clerk_appdir.git

Install packages

npm i

Setup .env file

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
CLERK_ISSUER_URL=
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/

NEXT_PUBLIC_GRAFBASE_API_URL=
NEXT_PUBLIC_GRAFBASE_API_KEY=

Start the app

npm run dev

Since I am using the next.js plugin from Grafbase, I do not need to separately start the grafbase server.

Available commands

Running commands with npm npm run [command]

command description
dev Starts a development instance of the app
build To build your application
start Starts a production instance of the app

For env value and functionality of this application I have written a very detailed article on hashnode

Youtube Demo Link: Grafbase Clerk Integration with grafbase Next.js Plugin