Skip to content

πŸ’Ž RoR blog website / API. fully functional website that list posts to empower readers to interact with them by adding comments and liking them.

License

Notifications You must be signed in to change notification settings

ITurres/blog_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

Blog App


πŸ“— Table of Contents


πŸ“– Blog App

  • The Blog app is an example of a blog website. A fully functional website that will show the list of posts and empower readers to interact with them by adding comments and liking posts.

  • It can also be used from other applications through the API endpoints.

Learning objectives

  • Use Ruby Gems as a software packages system.
  • Understand what ORM is.
  • Use database migration files to maintain database schema.
  • Set up associations between models.
  • Write SQL queries with Active Record.
  • Use validations for models.
  • Write unit tests for models.
  • Use controllers to handle requests and render empty views.
  • Understand Rails naming conventions.
  • Use params from browser requests in a safe way.
  • Write tests for controllers.
  • Use preprocessed HTML files with embedded Ruby code.
  • Use layouts and templates for shared content.
  • Write integration tests with Capybara gem.
  • Secure app from n+1 problems.
  • Build a web app that requires the user to log in.
  • Use devise gem for authentication.
  • Limit access to web app resources based on authorization rules with Cancan Gem.
  • Build a RESTful API.
  • Understand the importance of APIs and docs following standards.
  • Generate documentation for an API.
  • Understand the importance of APIs and docs following standards.

πŸ›  Built With

Tech Stack

Highlighted Gems


πŸš€ Live Demo

(back to top)


πŸ”‘ Key Features

  • It allows you to create, edit and delete posts.
  • create, edit and delete comments.
  • You can also like posts.
  • Great authentication by gem devise.
  • And flawless authorization by gem cancancan.
  • API Endpoints.

πŸ’» Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

To run this project you need:

  • Have Ruby installed. If you need to install Ruby, follow the instructions on the official page.

Setup

Clone this repository to your desired folder:

Example commands:

  • With SSH:
  cd my-folder
  git clone [email protected]:ITurres/blog_app.git
  • With HTTPS:
  cd my-folder
  git clone https://github.com/ITurres/blog_app.git
  • With GitHub CLI:
  cd my-folder
  gh repo clone ITurres/blog_app

Install

Go to the project directory:

 cd blog_app

Before running the program, verify that you have Ruby on Rails installed on your OS by running the following command:

 rails --version

It should show you the version of Ruby On Rails ​​installed. If this does not happen and only an error message is displayed, you should verify your installation or install Ruby on Rails from scratch.

Download and Install Ruby on Rails

Once you have verified that you have Ruby on Rails installed, run the following command to install the necessary gems:

 bundle install

After installing the gems, run the following command to create the database:

 rails db:create

Then run the following command to migrate the database:

 rails db:migrate

If you want to populate the database with sample data, run the following command:

 rails db:seed

Usage

Run the following command inside the project folder to start the application:

 rails s

This will start the application on your local server. You can now open your browser and go to http://localhost:3000/ to see the application running.

Run tests

To execute the tests, run the following command inside the project folder (root):

 bundle exec rspec

(back to top)


πŸ‘₯ Authors

πŸ‘€ Arthur Iturres

πŸ‘€ Demes Ameneshoa

(back to top)


πŸ”­ Future Features

  • Creating a data model.
  • Processing data in models.
  • Validations and Model specs.
  • Controllers.
  • Controllers specs.
  • Views.
  • Forms.
  • Integration specs for Views and fixing n+1 problems.
  • Add Devise.
  • Add authorization rules (CanCanCan).
  • Add API endpoints.
  • API documentation.

(back to top)


🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)


⭐️ Show your support

Give a ⭐ if you liked this project!

(back to top)


πŸ™ Acknowledgments

I thank the Code Reviewers for their advice and time, and to @demesameneshoa, who has been a great and professional teammate πŸ†

(back to top)


πŸ“ License

This project is MIT licensed.

(back to top)


About

πŸ’Ž RoR blog website / API. fully functional website that list posts to empower readers to interact with them by adding comments and liking them.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published