https://github.com/davemooreuws/nchat
Secure realtime chat using Websockets, Next.js, Nitric and Clerk
https://github.com/davemooreuws/nchat
clerkauth nextjs realtime-chat secure-websockets tailwindcss websockets
Last synced: about 2 months ago
JSON representation
Secure realtime chat using Websockets, Next.js, Nitric and Clerk
- Host: GitHub
- URL: https://github.com/davemooreuws/nchat
- Owner: davemooreuws
- Created: 2023-08-10T02:02:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-27T05:07:37.000Z (about 1 year ago)
- Last Synced: 2025-03-15T13:04:11.636Z (2 months ago)
- Topics: clerkauth, nextjs, realtime-chat, secure-websockets, tailwindcss, websockets
- Language: TypeScript
- Homepage: https://nchat.nitric.rocks
- Size: 1.16 MB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NChat
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.
## Tools used
- [Clerk](https://clerk.com)
- [Next.js](https://nextjs.org)
- [Nitric](https://nitric.io)
- [Tailwind CSS](https://tailwindcss.com)## Demo
You can view and participate in a live demo [here](https://nchat.nitric.rocks/).
> 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.
## Local Development
### Requirements
- [Nitric CLI](https://nitric.io/docs/guides/getting-started/installation)
- Node.js
- yarn### Steps
1. `yarn install`
2. Install the [Nitric CLI](https://nitric.io/docs/guides/getting-started/installation)
3. Create a [Clerk App](https://dashboard.clerk.com/apps/new) for development purposes.
4. Add GitHub as a social connection under User & Authentication -> Social Connections.
5. Get your Clerk API Keys under Developers -> API Keys
6. `cp .env.example .env` and add values for `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` from step 5.
7. `yarn dev:server`
8. `yarn dev`## Deploy to Production
### Requirements
- [Nitric CLI](https://nitric.io/docs/guides/getting-started/installation)
- Node.js
- yarn
- Pulumi configured on your machine
- AWS configured on your machine### Steps
1. Fork and Push this repo to GitHub
2. Create a [Clerk App](https://dashboard.clerk.com/apps/new) for production purposes.
3. Deploy backend to AWS using `nitric up`
4. 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.