Coder Social home page Coder Social logo

dialoq's Introduction

Dialoq

Live Demo

Dialoq is a dynamic chat-based application, inspired by Slack and Discord. Ruby on Rails is used as its backend MVC, with Postgresql for database management/querying. I used React/Redux components for the frontend. The site also utilizes lottie-web for fluid, visually-appealing UI animations.

I built and designed the project over a 10-day period.

Features

  • Encrypted login (frontend to backend) using BCrypt with protected routes
  • Users can create Servers for any topic
  • Users can create sub-chatrooms within a Server
  • Live messaging with websockets
  • Search functionality (to join servers, add friends, create private rooms etc.)

Dialoq Splash Page Main Page

Live Chat

The websocket for this project was implemented through Rails Action Cable. Channels are dynamically created via a key composed of the server and room database ids. Hash values for each may replace this in later builds. On server/room click, Redux updates the channel key and replaces the old socket.

 componentWillReceiveProps(newProps){
    if (newProps.match.params.roomId !== this.props.match.params.roomId) {
      this.props.fetchRoomMessages(newProps.match.params.roomId)
    }
  }

  componentDidUpdate(prevProps){
    if (prevProps.match.params.roomId !== this.props.match.params.roomId) {
      this.createSocket();
    }
    let index = document.getElementById('message-index');
    index.scrollTo({top: index.scrollHeight, behavior:'auto'})

  }

  createSocket(){
    let channelKey = this.props.match.params.serverId + '_' + this.props.match.params.roomId;
    this.cable = ActionCable.createConsumer('ws://'+window.location.host+'/cable');
    this.chats = this.cable.subscriptions.create({
      channel: 'ChatChannel',
      server_room: channelKey
    }, {
      connected: () => {},
      received: (data) => {
        this.props.receiveMessage(data);
      }
    });
  }

Live Chat

Account Settings

Users also have access to an animated menu where they can change their online status and profile icon. Pop-up animation was done with CSS transitions and React Collapse. Rails updates settings on the backend before sending them back to be rendered by React.

Account Menu

React Collapse was also used for the search animation

Search

dialoq's People

Contributors

mvaleriani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dialoq's Issues

PA Review: Direct Messaging

  • Add friends

  • Message friends privately outside of server rooms

  • Adequate styling

  • Smooth, bug-free navigation

  • Seeded with info to demonstrate this feature

Installations

Hello! Is there any installations guids to install this on our own servers?

PA Review: Live Chat

  • Real-time messaging via websockets

  • Messages show author, and body

  • Adequate styling

  • Smooth, bug-free navigation

  • Seeded with info to demonstrate this feature

  • BONUS: multimedia support (EMOJIIIIIIIS)

Proposal feedback

Overall this looks very strong. You may find some things need to be tweaked to work w/ ActionCable.

Schema

Routes

  • Can you add in :ids for the routes where you'd have them? (DELETE and the like)
  • Nest POSTs and index routes where appropriate
    • POST /api/servers/:id/channels
    • Make your GET channel route RESTful (/api/servers/:serverId/channels)

PA Review: New account creation, login, and guest/demo login

  • Users can sign up, sign in, log out

  • Users can use a demo login to try the site

  • Users can't use certain features without logging in (sending messages & joining servers)

  • Adequate styling

  • Smooth, bug-free navigation

  • Seeded with info to demonstrate this feature

PA Review: Custom Servers

  • Create servers with custom names, icons

  • Users can join existing servers

  • Adequate styling

  • Smooth, bug-free navigation

  • Seeded with info to demonstrate this feature

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.