/clatter

web application like a twitter clone

Primary LanguageRuby

Clatter

web application like a twitter clone

Build Status Coverage Status Code Climate

Deploy

Demo

https://clatter-demo.herokuapp.com

demo user

user: sample
password: password

Installation

Requirement

  • ImageMagick
  • bower

Manual deployment to heroku

$ git clone https://github.com/hyone/clatter.git
$ cd clatter

$ heroku login
$ heroku create <application-name>

# To use heroku-buildpack-multi
$ heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-multi.git

$ git remote add heroku https://git.heroku.com/<application-name>.git/
$ git push heroku master
$ heroku run rake db:migrate

Configuration

Using AWS S3 as image storage

To use AWS S3 service instead of local file system (default) to store images, you must set ENVIRONMENT VARIABLES like below:

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
AWS_S3_BUCKET_NAME

and then, restart server.

Using OAuth services to register and login a user

This application is able to use Twitter, Github and Google as OAuth authentication services. To use these services,

At first, register the application to OAuth services we want to use:

These callback URLs must be set respectively like below:

  • Twitter: ${APP_ROOT_URL}/users/auth/twitter/callback
  • Github: ${APP_ROOT_URL}/users/auth/github/callback
  • Google: ${APP_ROOT_URL}/users/auth/google_oauth2/callback

and then, set consumer key and consumer secret to ENVIRONMENT VARIABLES respectively like below:

Twitter:

TWITTER_CONSUMER_KEY
TWITTER_CONSUMER_SECRET

Github:

GITHUB_CLIENT_ID
GITHUB_CLIENT_SECRET

Google:

GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET

and then, restart server.

In case of heroku, set ENVIRONMENT VARIABLES like below:

$ heroku config:add TWITTER_CONSUMER_KEY=XXXXXXXXXXXXXXXXXXXXXXXXX
$ heroku config:add TWITTER_CONSUMER_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
$ heroku restart

Development

Requirement on Development

In addition to packages required on installation:

  • docker (For PostgreSQL container)
  • docker-compose
  • terminal-notifier (Optional)

Setup demo data

# after set up database
$ bin/rake db:seed:development