Yuri-M-Dias / challenge-48h-backend

A chat application using Rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Challenge-48H

Build Status

This is a project for an interview.

Running the project

If you have docker setup without a sudo password, you can use the provided script to create two containers with all that you need already:

$ bash docker-run-redis-and-pg.sh

Then you need to create the user with appropriate roles. This script will create the user with the default password and necessary roles, you just need to input your postgres user password when requested:

$ bash init-user-db.sh

This project uses Figaro to manage enviroment variables, so you need to have an appropriate application.yml file:

# config/application.yml

challenge_pg_user: "challenge48h"
challenge_pg_password: "challenge48h"

Then, to install dependencies and run the database:

$ bundle install
$ rake db:create
$ rake db:migrate

Finaly, just start the rails server and navigate to localhost:3000

$ rails s

Project description

There are two clients: users and trainers.

Each of these has the ability to log into the website through authentication.

Once signed in, they can see in the front page and the button ‘chat' showing up.

Clicking on chat you see all the messages in which the logged client is involved.

Then, you can click over ‘New chat’ and you are given a form to send a new message.

In the form you have to select the receiver (either a user or a trainer).

Editing and deleting messages isn’t allowed.

You can create an admin user if you want to make these operations.

About

A chat application using Rails

License:MIT License


Languages

Language:Ruby 74.3%Language:HTML 21.2%Language:JavaScript 1.7%Language:CoffeeScript 1.4%Language:Shell 1.2%Language:CSS 0.1%