This repository contains the code for the Team Chat web reference application hosted on the PubNub Chat Docs Page. You can download the project to run on your local machine, and explore the code to see how we built it.
The application demonstrates how to build a chat application using:
- PubNub
- TypeScript
- React
- Redux
We've put together a comprehensive tutorial that explains how key features are built in the team chat app. With this tutorial, you should have a better understanding of of our underlying React and Redux frameworks and the Javascript SDK. You can use these frameworks & SDKs to easily add chat capabilities to any application.
Click here to view the tutorial.
- Node.js
- PubNub Account (Free)
To run this application you must obtain publish and subscribe keys from your PubNub Account. If you don't already have an account, you can create one for free.
-
Sign in to your PubNub Dashboard.
-
Click Create New App.
-
Give your app a name, and select Chat App as the app type.
-
Select a region to store your user data (e.g. Portland).
-
Click Create.
-
Click your new app to open its settings, then click its keyset.
-
Locate the Publish and Subscribe keys. You'll need these keys to include in this project.
-
Clone the GitHub repository.
git clone [email protected]:pubnub/typescript-ref-app-team-chat.git
-
Install the project.
cd typescript-ref-app-team-chat npm install
-
Run the project in your local environment. If you are running the app for the first time, enter your PubNub keys to begin populating sample data.
npm start
A web browser should automatically open http://localhost:3000, and you can explore your very own Team Chat app!
Checkout the comprehensive Tutorial or visit the PubNub Chat Docs page for more information about how to use the React and Redux SDKs to add in-app chat to your applications.
This project was bootstrapped with Create React App. Special thanks to Martin Lagrange, Elvis Wolcott, and Mark Erikson.