chat app with accounts built with ExpressJS, ReactJS, & SocketIO
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
public
src
.gitignore
LICENSE
README.md
eapp-mongo.js
eapp.js
package-lock.json
package.json
register.html
users.json
yarn.lock
ychat-input.gif
ychatlogo.png

README.md

ychat

ychatlogo


a real-time chat app from Dan McKeown copyright 2017

Licensed under ISC License


ychatdemo


Table Of Contents

features

ychat provides the following features:

  • Simplistic NodeJS account system using LokiJS [or MongoDB] with basic auth via PassportJS
  • Front-end designed to look like a contemporary chat UI; built using ReactJS components
  • SocketIO-powered real time chat service for multiple logged-in users

service worker

The sw-precache-webpack-plugin is integrated into production configuration, and it will take care of generating a service worker file that will automatically precache all of your local assets and keep them up to date as you deploy updates. The service worker will use a cache-first strategy for handling all requests for local assets, including the initial HTML, ensuring that your web app is reliably fast, even on a slow or unreliable network.

Opting Out of Caching

If you would prefer not to enable service workers prior to your initial production deployment, then remove the call to serviceWorkerRegistration.register() registerServiceWorker() from src/index.js.

quickstart

  1. cd ychat
  2. npm install
  3. npm run ychat
  4. visit the server at http://localhost:3000

quickstartMongo

  1. cd ychat
  2. npm install
  3. brew services start mongodb
  4. npm run ychat-mongo
  5. visit the server at http://localhost:3000

requirements

  • NodeJS 6 or higher
  • NPM 3 or higher
  • MongoDB [if you are using the ychat-mongo version]

installation

  • Check NodeJS version: node --version or install
  • Check NPM version: npm --version
  • If you are using the MongoDB version (npm run ychat-mongo) check that MongoDB is installed: brew upgrade mongodb
  • Clone the Git repo: git clone <repo-url>

usage

  • To start users should create an account at /register.
  • Once an account is created, follow the link to the home page and log in with the account.
  • Once the chat page loads, the user can share chat messages with the room and receive messages from other users logged into the site
  • ychat installations are one large chat room with all currently logged-in users able to send and receive messages to the whole ychat room.

notes

  • This project uses the ExpressJS server on NodeJS to serve the front-end files and answer API requests like login attempts and message passing over websockets
  • Y Chat was bootstrapped with Create React App and uses front-end based on code posted to CodePen
  • The default version [which runs from npm run ychat] saves user login data in the users.json file using LokiJS while the ychat-mongo version [available at npm run ychat-mongo] persists the user data in a MongoDB document store