Instagram web app with basic featurures in ruby on rails
This application utilizes the
- Haml gem: To write easy and more pleasant HTML documents
- simple_form gem: Powerful way to make forms
- Bootstrap-sass gem: For adding bootstrap
- Devise gem: For adding user info
- Paperclip gem: To manage pics in application After this install ImageMagick for Paperclip gem.
- masonry-rails gem: To add jquery to indent photos
- acts_as_votable gem: To add voting feature
To setup locally install the ruby
rails
latest versions :
clone the repo and follow the commands:
git clone https://github.com/Paarmita/myinsta.git
cd myinsta
bundle install
rake db:migrate
rails s
- User can post posts, like posts.
- User show page displays user's posts images in a 3 column grid
- Index page shows posts created by everyone.
- Validations to assume user name is unique, contains no uppercase letters, and contains no whitespace
- Password protection via BCrypt
- User can post posts, follow users, like posts, comment on posts, etc. and also has a bio and name which are displayed on their show page and users page
- Image storage on AWS S3 via the paperclip gem
The default directory structure of a generated Ruby on Rails application:
|-- app
| |-- assets
| |-- images
| |-- javascripts
| `-- stylesheets
| |-- controllers
| |-- helpers
| |-- mailers
| |-- models
| `-- views
| `-- layouts
|-- config
| |-- environments
| |-- initializers
| `-- locales
|-- db
|-- doc
|-- lib
| `-- tasks
|-- log
|-- public
|-- script
|-- test
| |-- fixtures
| |-- functional
| |-- integration
| |-- performance
| `-- unit
|-- tmp
| |-- cache
| |-- pids
| |-- sessions
| `-- sockets
`-- vendor
|-- assets
`-- stylesheets
`-- plugins
app
Holds all the code that's specific to this particular application.
app/assets
Contains subdirectories for images, stylesheets, and JavaScript files.
app/controllers
automated URL mapping. All controllers should descend from
ApplicationController which itself descends from ActionController::Base.
app/models
ActiveRecord::Base by default.```
app/views
weblogs/index.html.erb for the WeblogsController#index action. All views use
eRuby syntax by default.
app/views/layouts
common header/footer method of wrapping views. In your views, define a layout
using the <tt>layout :default</tt> and create a file named default.html.erb.
Inside default.html.erb, call <% yield %> to render the view using this
layout.
app/helpers
generated for you automatically when using generators for controllers.
Helpers can be used to wrap functionality for your views into methods.
config
and other dependencies.
db
sequence of Migrations for your schema.
doc
generated using <tt>rake doc:app</tt>
lib
doesn't belong under controllers, models, or helpers. This directory is in
the load path.
public
default HTML files. This should be set as the DOCUMENT_ROOT of your web
server.
script
test
command, template test files will be generated for you and placed in this
directory.
vendor
subdirectory. If the app has frozen rails, those gems also go here, under
vendor/rails/. This directory is in the load path.