8000 GitHub - lchanmann/chat_app: Simple real-time chat application using ActionCable and Vue.js
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lchanmann/chat_app

Repository files navigation

README

This is a simple real-time chat application featuring public chatroom where Bob bot, a message responder, lives and private messaging to user.

This application use Action Cable for real-time messaging and Vue.js for frontend chat view interface.

Bot bot

Bot bot is a message responder bot that reply with canned responses as follow:

  • Bob answers 'Sure.' if you ask him a question.
  • He answers 'Woah, chill out!' if you yell at him (ALL CAPS).
  • He says 'Fine. Be that way!' if you address him without actually saying anything.
  • He answers 'Whatever.' to anything else.

BobBot class can be found at lib/bob_bot.rb. It uses Visitor pattern to decide which response to give instead of hard-coded using condition expressions (if, unless or case).

Public chatroom

A public chatroom does not require user to login to use. When joining a numbered username (e.g. User1234) w 6F68 ill be assigned the browser session and messages send by the user will be prefixed with the assigned username (e.g. User1234: hello).

Bob bot is listening to public chatroom and will respond to any message sent to the chatroom.

Public Lobby

Private conversation (user <-> user)

A private conversation requires login and allows for user to user messaging. A user can also send private message to Bot bot.

Public Lobby

Running the app

Clone the repo:

git clone https://github.com/lchanmann/chat_app.git
cd chat_app

Install dependencies

bundle install
yarn install

Setup database

rake db:setup

Compile client app

bin/webpack

Run server app

rails s

Running tests

All tests can be found in spec directory.

To run all server-side tests in models, lib, channels and controllers, run:

rspec

To run client-side tests in javascript, run:

yarn test

About

Simple real-time chat application using ActionCable and Vue.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0