http://conflictapp.herokuapp.com/
Welcome to Conflict, a full stack single page clone of Discord. Conflict supports live messaging in both group and private chats. Users who register with the site can create or join chat servers via invitation link.
- React-Redux Supports front-end rendering of pages and for managing flux-pattern
- Ruby on Rails Supports back-end server and accessing database
- PostgreSQL as the database system
- Heroku as the platform for hosting
Users will be able to login or sign up for an account with Conflict. Security of users are made a priority and so passwords are protected through encryption. Errors are rendered to inform users if they've put any false information in.
A Demo user feature is also included!
A user's session is tracked via a session token. The backend server bootstraps the currently logged in user so they won't have to login again unless they sign out. This is accomplished via javascript to save the current user to the window.
<% if logged_in? %>
<script id="bootstrap-current-user" type="text/javascript">
window.currentUser = <%= render("api/users/user.json.jbuilder",
user: current_user).html_safe %>
</script>
<% end %>
Users can chat with each other either in a group server or privately through DM's. Live chat is an essential feature to this app that is implemented via Ruby on Rails ActionCable websockets. Users are subscribed to a channel when they enter it.
openSocket() {
const cable = ActionCable.createConsumer();
this.currentChat = cable.subscriptions.create({
channel: 'ChatChannel'
}, {
connected: () => {
},
received: (messages) => {
this.props.receiveMessages(messages);
},
create: function(chatContent) {
this.perform('create', {
content: chatContent
});
},
load: function(){
return this.perform("load")
}
});
}
Users can create or join servers via an invitation link. The option of editing and deleting servers and channels are also available but ONLY to the server leader.
- Online status for the users
- Edit and delete Messages