Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/iturres/blog_app

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

postgresql rails-application ror-api ruby-app ruby-on-rails

Last synced: about 19 hours ago
JSON representation

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

Awesome Lists containing this project

README

        


logo

Blog App


---

# πŸ“— Table of Contents

- [πŸ“– About the Project](#about-project)
- [πŸ›  Built With](#built-with)
- [Tech Stack](#tech-stack)
- [πŸš€ Live Demo](#live-demo)
- [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](#support)
- [πŸ™ Acknowledgements](#acknowledgements)
- [πŸ“ License](#license)

---

# πŸ“– 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

- [Devise](https://github.com/heartcombo/devise/wiki)
- [Cancancan](https://github.com/CanCanCommunity/cancancan)

---

## πŸš€ Live Demo

- [Blog App - Live Demo Link](https://blog-app-m4k8.onrender.com/)

(back to top)

---

### :key: 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](https://www.ruby-lang.org/en/documentation/installation/).

### Setup

Clone this repository to your desired folder:

Example commands:

- With SSH:

```bash
cd my-folder
git clone [email protected]:ITurres/blog_app.git
```

- With HTTPS:

```bash
cd my-folder
git clone https://github.com/ITurres/blog_app.git
```

- With GitHub CLI:

```bash
cd my-folder
gh repo clone ITurres/blog_app
```

### Install

Go to the project directory:

```bash
cd blog_app
```

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

```bash
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](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:

```bash
bundle install
```

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

```bash
rails db:create
```

Then run the following command to migrate the database:

```bash
rails db:migrate
```

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

```bash
rails db:seed
```

### Usage

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

```bash
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):

```bash
bundle exec rspec
```

(back to top)

---

## πŸ‘₯ Authors

πŸ‘€ **Arthur Iturres**

- GitHub: [@ITurres](https://github.com/ITurres)
- LinkedIn: [Arthur Emanuel G. Iturres](https://www.linkedin.com/in/arturoemanuelguerraiturres/)
- Angellist / Wellfound: [Arturo (Arthur) Emanuel Guerra Iturres](https://wellfound.com/u/arturo-arthur-emanuel-guerra-iturres)
- Youtube: [Arturo Emanuel Guerra Iturres - Youtube Channel](https://www.youtube.com/channel/UC6GFUFHOtBS9mOuI8EJ6q4g)
- Portfolio: [Arthur Iturres - Portfolio](https://iturres.github.io/iturres-reactive-portfolio/)

πŸ‘€ **Demes Ameneshoa**

- GitHub: [@demesameneshoa](https://github.com/demesameneshoa)
- LinkedIn: [@demesameneshoa](https://www.linkedin.com/in/demesameneshoa/)

(back to top)

---

## πŸ”­ Future Features

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

(back to top)

---

## 🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](https://github.com/ITurres/blog_app/issues).

(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](./LICENSE) licensed.

(back to top)

---