Giter VIP home page Giter VIP logo

nchat's Introduction

NChat

Realtime chat using Websockets, Next.js, Nitric and Clerk.

NChat App

This example uses nitric v0, please raise an issue if you would like a v1 example.

Tools used

Demo

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.

Local Development

Requirements

Steps

  1. yarn install
  2. Install the Nitric CLI
  3. Create a Clerk App 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
  • 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 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.