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:
- PostgreSQL at least version 9.4
- Get the codebase
git clone https://github.com/sushinoya/twitter-clone.git
- Install gem dependencies
cd twitter-clone
bundle install
- 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
- Setup Database
rake db:setup
To seed the database, simply run
rake db:seed
- Start the application
We're using Puma as our web server.
# Start the web server
rails server
We use Rspec as our testing framework. So, during development, run these regularly.
# Run the specs
bundle exec rspec
-
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
-
CoffeeScript
We setup CoffeeLint to ensure our CoffeeScript code are clean and consistent. You may find the installation steps here.
# Run coffeelint coffeelint .
-
Slim - Slim-Lint
# Run slim-lint
slim-lint .
- SCSS - SCSS-Lint
# Run scss-lint
scss-lint
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 functionenhance/<your-branch-name>
for minor feature or function enhancementbugfix/<your-branch-name>
for bug fixes