Skip to content

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.

License

Notifications You must be signed in to change notification settings

NitBravoA92/blog-app

Repository files navigation

Blog App | Ruby on Rails Project

📗 Table of Contents


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

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

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

👤 Cesar Herrera

(back to top)


🔭 Future Features

Upcoming improvements:

  • Creating a data model
  • Processing data in models
  • Validations and model specs
  • Controllers
  • Views
  • Add Forms to create a new post and comments
  • Add the functionality to save likes
  • Add the integration tests using capybara gem
  • Authentication using devise gem
  • Authorization using CanCanCan gem
  • 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.

(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 licensed.

(back to top)


About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published