"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.
Backend
Frontend
- 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
To get a local copy up and running, follow these steps.
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)
Clone this repository to your desired folder by using this 👇️ command :
git clone https://github.com/NitBravoA92/blog-app.git
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
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.
To execute the tests, run the following command inside the project folder:
rspec
👤 Nitcelis Bravo
- GitHub: Nitcelis Bravo
- Twitter: @softwareDevOne
- LinkedIn: Nitcelis Bravo Alcala
👤 Cesar Herrera
- GitHub: @CesarHerr
- LinkedIn: Cesarherr
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
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
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!
I thank Microverse for this fantastic opportunity, and the code reviewers for their advice and time.
This project is MIT licensed.