An open API service indexing awesome lists of open source software.

https://github.com/nitbravoa92/blog-app

Blog App is a website built with Ruby on Rails and PostgreSQL that allows users to create and publish posts, write comments, and like posts.
https://github.com/nitbravoa92/blog-app

mvc-architecture object-oriented-programming postgresql-database rspec ruby ruby-on-rails solid-principles

Last synced: 5 months ago
JSON representation

Blog App is a website built with Ruby on Rails and PostgreSQL that allows users to create and publish posts, write comments, and like posts.

Awesome Lists containing this project

README

        


Blog App | Ruby on Rails Project


# πŸ“— Table of Contents

- [πŸ“— Table of Contents](#-table-of-contents)
- [Blog App ](#blog-app-)
- [πŸ›  Built With ](#-built-with-)
- [Tech Stack ](#tech-stack-)
- [Key Features ](#key-features-)
- [πŸ’» Getting Started ](#-getting-started-)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [πŸ‘₯ Authors ](#-authors-)
- [πŸ”­ Future Features ](#-future-features-)
- [🀝 Contributing ](#-contributing-)
- [⭐️ Show your support ](#️-show-your-support-)
- [πŸ™ Acknowledgments ](#-acknowledgments-)
- [πŸ“ License ](#-license-)

---

# Blog App

**"Blog App"** is a website built with Ruby on Rails and PostgreSQL that allows users to create and publish posts, write comments, and like posts.

---

## πŸ›  Built With

### Tech Stack

Backend

Frontend

### Key Features


  • Ruby on Rails framework


  • Use Linters to check code quality

    • Rubocop

    • Stylelint



  • MVC architectural/design pattern

  • Data persistent in PostgreSQL

  • Test the application with rspec and capybara gems

  • Authentication system build with devise gem

  • Authorization rules using CanCanCan gem

  • RESTful API

  • Follow Microverse's list of best practices

(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:


  • A code editor (we recommend Visual Studio Code)



  • Git and a GitHub account



  • MailCatcher (This is optional)


### Setup

Clone this repository to your desired folder by using this πŸ‘‡οΈ command :

```
git clone https://github.com/NitBravoA92/blog-app.git
```

### Install

Go to the project directory:

```
cd blog-app
```

Before to run the program, verify that you have Ruby on Rails installed on your OS 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, then you should either verify your installation or install Ruby on Rails from scratch.

[Download and Install Ruby on Rails](https://guides.rubyonrails.org/getting_started.html)

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
```

**Note:** This is completely optional but if you want to test the functionality of sending confirmation email and password reset locally, it is recommended that you install the `MailCatcher` gem. This tool runs a super simple SMTP server which catches any message sent to it to display in a web interface.

To install it, it is as simple as running the following command in your terminal:

```
gem install mailcatcher
```

Once installed, run the following command to start the server:

```
mailcatcher
```

This will start the local SMTP server on port 1025. You can now open your browser and go to http://localhost:1080/ to see the messages sent to the SMTP server.

So when you register a new user in the application, a confirmation email will automatically be sent to the user which you can check in your mailcatcher inbox. Emails for password reset can also be verified in mailcacher.

If you want to know more about this gem, visit its official documentation: [Mailcacher](https://mailcatcher.me/)

### 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:

```
rspec
```

(back to top)

---

## πŸ‘₯ Authors

πŸ‘€ **Nitcelis Bravo**

- GitHub: [Nitcelis Bravo](https://github.com/NitBravoA92)
- Twitter: [@softwareDevOne](https://twitter.com/softwareDevOne)
- LinkedIn: [Nitcelis Bravo Alcala](https://www.linkedin.com/in/nitcelis-bravo-alcala-b65340158)

πŸ‘€ **Cesar Herrera**
- GitHub: [@CesarHerr](https://github.com/CesarHerr)
- LinkedIn: [Cesarherr](https://www.linkedin.com/in/cesarHerr/)

(back to top)

---

## πŸ”­ Future Features

Upcoming improvements:

- [x] Creating a data model
- [x] Processing data in models
- [x] Validations and model specs
- [x] Controllers
- [x] Views
- [x] Add Forms to create a new post and comments
- [x] Add the functionality to save likes
- [x] Add the integration tests using capybara gem
- [x] Authentication using devise gem
- [x] Authorization using CanCanCan gem
- [x] Add API endpoints for posts and comments
- [ ] Create the API documentation using rswag

(back to top)

---

## 🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](https://github.com/NitBravoA92/blog-app/issues).

(back to top)

---

## ⭐️ Show your support

If you like this project and know someone who might find it helpful, please share it.
Or give it a **star** ⭐️ if you like this project!

(back to top)

---

## πŸ™ Acknowledgments

I thank Microverse for this fantastic opportunity, and the code reviewers for their advice and time.

(back to top)

---

## πŸ“ License

This project is [MIT](./LICENSE) licensed.

(back to top)

---