- Ruby: 2.4.1
- Rails: 5.1.5
- Node.js: v8.4.0
$ bundle install
$ yarn install
$ rails db:create
$ rails db:schema:load
$ rails server
- V bootstrap
- V link: people, chat, sign in/up/out, edit info
- V devise gem
- V email
- V url:
/users/:id
- V show: avatar, name, status
- V url:
/users/edit
- V form: avatar, name, status
- V url:
/users/edit_password
- V form: current password, password, confirmation
- V url:
/users
- V list: all users, paged per 20, sort by name
- V info: avatar, name, status
- V link: Chat(
/users/:id/chat
)
- V url:
/chats/
- V root redirect to this page
- V list: all chats of current user, paged per 20, sort by update time
- V info: last message, user(avatar, name)
- V update latest messages from all people continuously
- V url:
/chats/:id
or/users/:user_id/chat
(redirect to corresponding chat) - V list: last 50 messages
- V info: message(content, timestamp), user(avatar, name)
- V action: click to load more messages
- V auto scroll to bottom if not viewing old messages
- show scroll to bottom if viewing old messages
- V use Action Cable to communicate with server
- V form:
- V message content
- V submit button (or press enter)
- V update latest messages in this chat continuously
- send "read until" to server
- V url:
/chats/:chat_id/messages
- V parameters: limit, offset
- V devise user attributes
- V avatar, name, status
- V has many chats
- V title
- V has many users
- V has many messages
- V id, content, sender id, recipient id
- V belongs to chat
- V belongs to sender
- V belongs to recipient
- read at
- V can authorize user using the chat
- group chat
- attachment
- link detection
- V integrate chat to one page
- show how many unreads
- V store messages together
- V messages in newly created chat
- initial chat id not working
- timezone