https://github.com/mkdika/rblog
Simple Ruby on Rails 5 blog application
https://github.com/mkdika/rblog
blog bulma-css-framework bulma-template learning-by-doing poc ruby ruby-on-rails-5 sample-app slim
Last synced: 7 months ago
JSON representation
Simple Ruby on Rails 5 blog application
- Host: GitHub
- URL: https://github.com/mkdika/rblog
- Owner: mkdika
- License: mit
- Created: 2019-10-27T10:35:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-04T22:20:59.000Z (about 1 year ago)
- Last Synced: 2024-04-04T23:27:26.471Z (about 1 year ago)
- Topics: blog, bulma-css-framework, bulma-template, learning-by-doing, poc, ruby, ruby-on-rails-5, sample-app, slim
- Language: Ruby
- Homepage:
- Size: 319 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 54
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# rBlog
[](/LICENSE)
[](https://weblog.rubyonrails.org/2019/3/28/Rails-5-2-3-has-been-released/)
[](https://codebeat.co/projects/github-com-mkdika-rblog-master)
[](https://codecov.io/gh/mkdika/rblog)
[](https://travis-ci.com/mkdika/rblog)
[](https://snyk.io/test/github/mkdika/rblog?targetFile=package.json)Yet another simple Ruby on Rails 5 (RoR) blog application.
This is my RoR full stack web development learning project & example, including its automatic CI/CD setup and cloud platform deployment.## Screenshots
### Front page
### Admin page
## This project use
- [Ruby 2.6.5](https://www.ruby-lang.org/en/)
- [Ruby on Rails 5.2.3](https://rubyonrails.org/), web framework.
- [Slim Templating 4](http://slim-lang.com/), HTML templating engine.
- [Devise](https://github.com/plataformatec/devise), flexible authentication solution.
- [Ruby Recaptcha](https://github.com/ambethia/recaptcha), recaptcha lib.
- [Paper Trail](https://github.com/paper-trail-gem/paper_trail), Track changes to your rails models.
- [Will Paginate](https://github.com/mislav/will_paginate), auto pagination from ActiveRecord.
- [RSpec Rails 3](https://relishapp.com/rspec/rspec-rails/v/3-9/docs), BDD and test suite.
- [Faker](https://github.com/faker-ruby/faker), A library for generating fake data such as names, addresses, and phone numbers.
- [Factory Bot Rails](https://github.com/thoughtbot/factory_bot_rails), a library for setting up Ruby objects as test data.
- [Capybara](https://github.com/teamcapybara/capybara), acceptance test framework for web applications.
- [Selenium](https://github.com/SeleniumHQ/selenium), a browser automation framework and ecosystem.
- [Bulma CSS](https://bulma.io/), mobile first CSS framework.
- [Postgresql 10](https://www.postgresql.org/)
- [Peru](https://github.com/buildinspace/peru), a package manager for including other people's code in your projects.
- [Vagrant](https://www.vagrantup.com), for development provisioning. Use [Ubuntu 18.04](http://releases.ubuntu.com/18.04/) based.
- [Ansible](https://www.ansible.com/), for automate and simply Vagrant provision.
- [Travis CI](https://travis-ci.org/), for CI & CD pipelines.
- [Heroku](https://www.heroku.com/), for cloud deployment platform, host this apps for free :smile:## Blog Features
- Multi user login.
- Post blog, with category, tags, and comments.
- Data audit trail & transaction history.
- Multiple resolution responsive view.
- [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) as blog's content markup language.
- __Todo:__
- [ ] Blog post archive page.
- [ ] Setup email account for sending password recovery & instructions.
- [ ] Dashboard to view blog post, number of comments, etc.## Online Demo
- __Heroku__
This is from automatic build (CI/CD). Plese visit [https://simple-rblog.herokuapp.com](https://simple-rblog.herokuapp.com)
Demo account:
- email: `[email protected]`
- password: `admin`## Running locally
### Environment & requirement provision
We need to have Ruby 2.6.5 or for ease the provisioning we can use Vagrant from this repository [vagrant-ruby-dev](https://github.com/mkdika/vagrant-ruby-dev).
### Environment variable
There are several env variable should be config prior running apps:
- `DATABASE_USERNAME`, database username.
- `DATABASE_PASSWORD`, database password.
- `DATABASE_HOST`, database host.
- `DATABASE_PORT`, database port.
- `DATABASE_URL`, database connection string url.
- `RECAPTCHA_SITE_KEY`, recaptcha site key, get it from [here](https://www.google.com/recaptcha/intro/v3.html).
- `RECAPTCHA_SECRET_KEY`, recaptcha secret key.### Run Rails application
Install Rails & dependencies
```bash
bundle install
```Init & setup database
```bash
rails db:setup
```Seed sample data
```bash
rails db:seed
```Run rails app locally
```bash
rails s
```Or if you using and run inside Vagrant.
```bash
rails s -b 0.0.0.0
```Access from [http://localhost:3000](http://localhost:3000)
### Run all automatic testing
```bash
rspec
```## Copyright and License
Copyright 2019 Maikel Chandika ([email protected]). Code released under the MIT License. See [LICENSE](/LICENSE) file.