/cat_chat

Back end for a chat application

Primary LanguageRuby

#Cat Chat ##Description I was part of a three-person team that created a chat application. I wrote the backend for our application, which is the code in this repository. To use the chat application, go here.

Trello: Here

Hackpad: Here ##Features

  • Usernames
  • All messages can be seen by other users in real time
  • Timestamped messages
  • Basic swear word filter
  • Multiple chatrooms
  • Statistics about top chatroom, active users, and top ten users
  • A chatbot that responds when users type "amiright", "is anyone here?", "meow", and "woof."

##Instructions ###To make a new message:

	 user: "string"
	 chatroom: "string"
	 message: "text"
  • The response will be in JSON format with the following parameters:
	 id: integer
	 user: "string"
	 chatroom: "string"
	 message: "text"
	 created_at: timestamp

###To view all messages:

	 id: integer
	 user: "string"
	 chatroom: "string"
	 message: "text"
	 created_at: timestamp

###To view all messages from a particular chatroom

	 id: integer
	 user: "string
	 message: "text"
	 created_at: timestamp

###To view the statistics:

{
	topTenUsers: [ 
		{
			user: "string",
			message_count: integer
		}
	],
	mostPopularChatroom: {
		name: "string",
		message_count: integer
	},
	recentlyActiveUsers: [
		"name",
		"name",
		"name"
	]
}

###To create a new chatroom:

###To view a list of chatrooms:

###To view a list of users:

		id: integer,
		name: "string",
		created_at: timestamp,
		updated_at: timestamp

###To view all messages from a specific user:

{
    name: "string",
    messages: [
        {
            message: "string",
            chatroom: "string",
            created_at: timestamp
        }
    ]
}