Realtime chat using Websockets, Next.js, Nitric and Clerk.
This example uses nitric v0, please raise an issue if you would like a v1 example.
You can view and participate in a live demo here.
Apologies if the demo is down, if you're interested in trying it out let me know in issues or you can also run it on your local machine or deploy it to your own AWS account.
- Nitric CLI
- Node.js
- yarn
yarn install
- Install the Nitric CLI
- Create a Clerk App for development purposes.
- Add GitHub as a social connection under User & Authentication -> Social Connections.
- Get your Clerk API Keys under Developers -> API Keys
cp .env.example .env
and add values forNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
andCLERK_SECRET_KEY
from step 5.yarn dev:server
yarn dev
- Nitric CLI
- Node.js
- yarn
- Pulumi configured on your machine
- AWS configured on your machine
- Fork and Push this repo to GitHub
- Create a Clerk App for production purposes.
- Deploy backend to AWS using
nitric up
- Deploy to Vercel and add
.env
values (NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
,NEXT_PUBLIC_NITRIC_API_BASE_URL
*,CLERK_SECRET_KEY
)
* NEXT_PUBLIC_NITRIC_API_BASE_URL
is your production API endpoint. You can find this from the cli output after using nitric up
to deploy to the cloud.