- Clone the repo
cd
into the local clonenpm install
- Create an Ably app
- Go to Settings and click Add new rule. Set Channel namespace to "chat". Tick Persist all messages and tick Message interactions enabled
- Note the env vars
- Create a Clerk app
- Enable Email, Phone number, and Username sign in options. Go to Users & Authentication > Email, Phone, Username and tick Name. Go to Customization > Avatars and tick Initials.
- Note the the env vars
- Create
.env.local
with the notes env vars:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
ABLY_SECRET_KEY=
- Run
npm run dev