Realtime chat using GraphQL Live Queries, Next.js and NextAuth.js
- NextAuth.js
- Next.js
- Apollo Client
- Grafbase
- Server-Sent Events
- GraphQL Live Queries
- GraphQL
- Tailwind CSS
npm install
- Create a GitHub App
cp .env.example .env
- Add a secret value for
NEXTAUTH_SECRET
to.env
(openssl rand -base64 32
) cp grafbase/.env.example grafbase/.env
- Add the same
NEXTAUTH_SECRET
tografbase/.env
npx grafbase dev
npm run dev
- Create an account with Grafbase
- Push this repo to GitHub
- Create new project with Grafbase
- Add environment variable
NEXTAUTH_SECRET
to Grafbase - Deploy to Vercel and add
.env
values (NEXT_PUBLIC_GRAFBASE_API_URL
,NEXTAUTH_SECRET
,GITHUB_CLIENT_ID
,GITHUB_CLIENT_SECRET
)