/Rails-Blog-App

This is a basic Blog website that allows users to create, edit, comment and delete posts, keeping data in a database. This project implements both authorization and authentication in order to provide extended functionality to logged in and authorized users.

Primary LanguageRubyMIT LicenseMIT

Rails Blog App

📗 Table of Contents

📖 Rails Blog App

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

📖 Rails Blog App : Creating a data model.

In this section of project, I have used migration files to build your schema.

📖 Rails Blog App : Processing data in models.

In this section of project, I have set up models. To start with, we have tables for Users, Posts, Comments, and Likes, which means we need a model for each one. We've already set the foreign key in the table schema but be sure to write it here too!

📖 Rails Blog App : Validations and model specs.

In this section of project, I have added validations to the models and create specs for them.

📖 Rails Blog App : Controllers

In this section of project, I have created all controllers and views for your Blog app. I didn't process any data yet, I have also add simple placeholders for views with plain HTML.

📖 Rails Blog App : Controllers specs

In this section of project, I have set up tests on the controllers recently added to the Blog app.

📖 Rails Blog App : Views

In this section of project, I have added the Views associated with the Models and Controllers which I have already created for this Blog App.

📖 Rails Blog App : Add Forms

In this section of project, I have added the forms for create new post and add comments in the rails Blog App.

📖 Rails Blog App : Integration specs for Views and fixing n+1 problems.

In this section of project, I have create integration tests for all of the views used in the project. Be sure to cover the user stories (or user workflows) that you want users to experience while taking into consideration the possible errors your users may cause.

📖 Rails Blog App : Add Devise.

In this section of project, In this project, I have added the devise gem to the app and use it for the registration and login of users.

📖 Rails Blog App : Add authorization rules.

In this section of project, We have added authorization to the app using CanCanCan.

📖 Rails Blog App : Add API endpoints.

In this section of project, We have added some API endpoints to the Blog app. This will allow this app to be used in different ways, rather than just through your site - for example, a mobile app or a CLI application.

🛠 Built With

Tech Stack

BackEnd
Test
Database

Key Features

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

(back to top)

💻 Getting Started

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

Prerequisites

In order to run this project you need:

  • Ruby on Rail Knowledge
  • Object Oriented Programming(OOP) Knowledge
  • Vs Code
  • Github / Git Bash
  • install ruby
 sudo apt-get install ruby-full
  • install rails

      gem install rails
    
  • Install gems of rails

      bundle install
  • install postgresql

      sudo apt-get install postgresql postgresql-contrib libpq-dev

Setup

Clone this repository to your desired folder:

  git clone git@github.com:MudasirSherwani/Rails-Blog-App.git
  cd Rails-Blog-App

Prepare the database:

  • create database
  rails db:create
  rails db:migrate

Usage

To run the project, execute the following command:

  rails server

Run tests

To run tests, run the following command:

  Rspec

(back to top)

👥 Authors

👤 Mudasir Sherwani

👤 Pierre Celestin Moussa

(back to top)

🔭 Future Features

  • REST Full API

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project give me a star.

(back to top)

🙏 Acknowledgments

I would like to thanks Microverse to guide me to complete this project.

(back to top)

📝 License

This project is MIT licensed.

(back to top)