Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/iturres/blog_app
- Owner: ITurres
- License: mit
- Created: 2023-11-28T21:29:22.000Z (10 months ago)
- Default Branch: development
- Last Pushed: 2024-02-16T02:07:43.000Z (7 months ago)
- Last Synced: 2024-09-23T22:32:35.240Z (1 day ago)
- Topics: postgresql, rails-application, ror-api, ruby-app, ruby-on-rails
- Language: Ruby
- Homepage: https://blog-app-m4k8.onrender.com/
- Size: 243 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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)---
- 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.
#### Highlighted Gems
- [Devise](https://github.com/heartcombo/devise/wiki)
- [Cancancan](https://github.com/CanCanCommunity/cancancan)
---
- [Blog App - Live Demo Link](https://blog-app-m4k8.onrender.com/)
---
- 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.
---
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
```
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
```
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.
To execute the tests, run the following command inside the project folder (root):
```bash
bundle exec rspec
```
---
π€ **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/)
---
- [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.
---
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://github.com/ITurres/blog_app/issues).
---
Give a β if you liked this project!
---
I thank the **Code Reviewers** for their advice and time, and to @demesameneshoa, who has been a great and professional teammate π
---
This project is [MIT](./LICENSE) licensed.
---