An in-progress clone of the popular app Slack.
You can view the site here!
-
Ruby on Rails
-
React
-
Redux
-
Websockets (ActionCable)
-
PostgreSQL Database
- Real-time chat
class MessageBroadcastJob < ApplicationJob
queue_as :default
def perform(message)
ActionCable.server.broadcast "room_channel", message: render_message(message)
end
private
def render_message(message)
ApplicationController.renderer.render(partial: 'api/messages/message', locals: { message: message })
end
end
- Channels
- Multi-person direct messaging