Skip to content

ahoward2/nest-react-websockets

Repository files navigation

React, Socket.io and Nest JS logos image

Description

This is a realtime chat application built with NestJS, React and Socket.io. Nest provides support out of the box for websockets via Socket.io while we're using a Socket.io client in the React application. Users can login and create or join existing chat rooms!

Design

basic architecture

Server

  • Chat websocket gateway.
  • Object schema validation via pipes with zod.
  • Attribute-based access control authorization via guards with CASL.

Client

Installation

$ yarn

Running the app

# start client and server in development mode
$ yarn dev

# build client and server for production
$ yarn build

# start server in production
$ yarn start:prodserver