This is the second project in the fifth module of the Microverse program. It is a web blog built using Ruby on Rails framework with PostgreSQL database.
MIT License
This is the second project of the fifth module in the Microverse program. Check the below contents for further details about this project.
This repository is about a user blog with posts & likes.
User authentication is required first.
Every post contains comments & likes.
Each user displays (name
/ photo
/ bio
) & number of his posts
.
Each post displays (title
/ text
) & number of its comments
& likes
.
Pagination through posts using kaminari
gem.
It is built using Rails
framework with Ruby
.
The project is configured to use PostgreSQL
database.
Unit tests are carried on models & controller requests using RSpec
.
📌 Tech Stack:
Ruby
PostgreSQL
Rails
RSpec
📌 Key Features:
users
/ posts
/ comments
/ likes
)users
& posts
tablescomments
& likes
are bridge tables for many to many relation between users
& posts
tablesUser
/ Post
/ Comment
/ Like
)recent_posts
allows fetching the last three post for any userrecent_comments
allows fetching the last five comments for any postcounter
auto increments the number of (posts
/ comments
/ likes
) for the relevant owner tableUser
& Post
modelsname
/ title
/ posts_counter
/ comments_counter
/ likes_counter
) are requiredtitle
length must be smaller than or equal 250 charactersposts_counter
/ comments_counter
/ likes_counter
) must be an integer and greate than or equal zeroindex
/ show
) methods for controllers (UsersController
/ PostsController
)Capybara
gem to carry system tests on (index
/ show
) action methods for controllers (UsersController
/ PostsController
)Devise
gem before accessing any controllerYou can easily download or fork this repository and work on it immadiately!
📌 Prerequisites:
Ruby
language & PostgreSQL
database installed📌 Installation:
bundle install
rails db:setup
📌 Development:
rails server
rails console
📌 Tests:
bundle exec rspec -f d
📌 Mahammad:
📌 Zabihullah:
Some additional features I may implement in the project:
React
framework in frontendWish to contribute to this project? Contributions, issues, and feature requests are more than welcome! Feel free to check the issues page too.
Like this project? Show your support by starring!
I thank everyone at Microverse for guiding me through this project.
This project is MIT licensed.