Skip to content

Is a clasic blog website that shows the list of posts and empower readers to interact with them by adding comments and liking posts.

License

Notifications You must be signed in to change notification settings

AndreaM2429/BlogApp

Repository files navigation

Blog App

📗 Table of Contents

📖 Blog App

Blog App is the classic example of a blog website. This is a fully functional website that shows the list of posts and empower readers to interact with them by adding comments and liking posts.

🛠 Built With

Tech Stack

Ruby
Rails
Database
RSpec
Linters

Key Features

  • Migration files that create a database based on a diagram

  • Models for each of the tables in the database

  • Methods that updates counters

  • Methods that alows to select recent comments and posts

  • RSpec unit test for the validations, associations, methods, requests

  • Routes and controllers

  • Views

  • Forms to add a comment and post

  • Add and delete a like

  • Integration specs for the views using Capybara

  • Pagination with kaminari gem

  • Devise gem

  • Letter_opener

(back to top)

💻 Getting Started

This repository includes files with Ruby lenguage.

Prerequisites

In order to run this project you need to have install:

  • Ruby check this to install it.
  • Rails check this to install it.
  • Postgresql check this to install it.

Setup

Clone this repository to your desired folder:

  cd my-folder
  git clone https://github.com/AndreaM2429/BlogApp

Usage

You need to open the terminal and and navigate to the clone repository, run the commands to create the database and start the app:

  rails db:create
  rails db:migrate
  rails s

Navigate to http://localhost:3000 and see the functional app.

You can test the app from the terminal with:

  rails c

Try to run this commands and check the changes into your database.

  # Create users
  first_user = User.create(name: 'Tom', photo: 'https://unsplash.com/photos/F_-0BxGuVvo', bio: 'Teacher from Mexico.')
  second_user = User.create(name: 'Lilly', photo: 'https://unsplash.com/photos/F_-0BxGuVvo', bio: 'Teacher from Poland.')

  # Create a post from one user
  first_post = Post.create(author: first_user, title: 'Hello', text: 'This is my first post')

  # Create a comment for the post
  Comment.create(post: first_post, author: second_user, text: 'Hi Tom!' )

  # Create a like for the post
  Like.create(user: first_user, post: first_post)

To check the linters you can use the command:

  rubocop

To fix the linter use:

  rubocop --A

Tests

To run the test use the command:

  bundle exec rspec

Or just rspec, additional you can specify the path of one specific file if you don't want to run all the tests.

(back to top)

👥 Author

👤 Andrea Manuel

👤 Javier Grau

(back to top)

🔭 Future Features

  • 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

If you like this project you could clone the repo and work with it or do the changes in a new branch. Also you could let a message with your thoughts.

(back to top)

🙏 Acknowledgments

I would like to thank Microverse for providing the necessary resources for this project.

(back to top)

📝 License

This project is MIT licensed.

(back to top)

About

Is a clasic blog website that shows the list of posts and empower readers to interact with them by adding comments and liking posts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published