Skip to content

🐦 A clone of Twitter written using Ruby on Rails

Notifications You must be signed in to change notification settings

sushinoya/twitter-clone

Repository files navigation

Twitter Clone

This is a basic clone of Twitter built using Ruby on Rails. Instead of design, the project focuses more on using a clean and well-tested codebase to implement the fundamental functionalities of any platform such as Twitter.

Screenshots:

screen shot 2017-08-22 at 10 31 33 pm

screen shot 2017-08-22 at 11 26 57 pm

screen shot 2017-08-22 at 11 32 16 pm

System Dependencies

  1. PostgreSQL at least version 9.4

Getting Started

  1. Get the codebase
git clone https://github.com/sushinoya/twitter-clone.git
  1. Install gem dependencies
cd twitter-clone
bundle install
  1. Setup environment variables

You can find the environment variables used in this application in .env.sample. We're using Dotenv to load the environment variables.

cp .env.sample .env
# Update the values of the environment variables in .env accordingly
  1. Setup Database
rake db:setup

To seed the database, simply run

rake db:seed
  1. Start the application

We're using Puma as our web server.

# Start the web server
rails server

Testing

We use Rspec as our testing framework. So, during development, run these regularly.

# Run the specs
bundle exec rspec

Coding Style

  1. Ruby

    We use Rubocop to perform static analysis of the code according to rules defined in .rubocop.yml. Basically, it follows Ruby Style Guide and Rails Style Guide.

    # Run rubocop
    bundle exec rubocop
  2. CoffeeScript

    We setup CoffeeLint to ensure our CoffeeScript code are clean and consistent. You may find the installation steps here.

    # Run coffeelint
    coffeelint .
  3. Slim - Slim-Lint

# Run slim-lint
slim-lint .
  1. SCSS - SCSS-Lint
# Run scss-lint
scss-lint

Branch Policy

We follow the Github Flow when developing the application, and name our branches as follow:

  • master is the active development branch

Local development branch naming:

  • feature/<your-branch-name> for substantial new feature or function
  • enhance/<your-branch-name> for minor feature or function enhancement
  • bugfix/<your-branch-name> for bug fixes

About

🐦 A clone of Twitter written using Ruby on Rails

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published