A simple blog application built with Ruby on Rails, featuring user authentication, email notifications, and TailwindCSS styling for a modern and responsive UI.
- Features
- Tech Stack
- Prerequisites
- Installation & Setup
- Run Tests
- Running the Application
- Demo
- Key Changes & Development Log
- User Authentication - Login/registration with Devise, Edit Profile Information with avatar upload
- Blog Post Management - CRUD function in blog posts
- Feedback System - Users can leave feedback on blog posts except their own
- Email Notifications - Authors receive email notifications when feedback is submitted (via SendGrid Service API)
- Filtering & Pagination – Filter blog posts by author and feedback presence with Kaminari gem pagination
- Responsive Design - Built with Tailwind CSS for a modern, mobile-friendly interface
- Testing - Fully tested with passing RSpec specs
| Layer | Technology |
|---|---|
| Backend | Ruby on Rails 7.x |
| Database | PostgreSQL |
| Authentication | Devise |
| Emails | SendGrid API |
| Pagination | Kaminari Gem |
| Frontend | Tailwind CSS, Stimulus JS |
| Testing | RSpec, FactoryBot |
- Ruby
3.0or higher - Rails
7.0or higher - PostgreSQL
- Node.js
16or higher - Yarn or npm
- Git
git clone https://github.com/archejk/blog_post.git
- Navigate into the project directory
cd blog_spot
# install ruby gems
bundle install
# install js javascript packages
yarn install or npm install# create and setup db
rails db:create
rails db:migrate
# load data in the db (optional)
rails db:seed- Create
.envfile in the root directory and add these env variables:
# database credentials
DATABASE_USERNAME=your_username
DATABASE_PASSWORD=your_password
# Sendgrid email delivery service
SENDGRID_API_KEY=your_sendgrid_api_key- refer to the documentation on how to generate API key: https://www.twilio.com/docs/sendgrid/for-developers/sending-email/getting-started-smtp
- your_sendgrid_api_key or use this key from my test account:

# all tests (models, controllers, etc.)
bundle exec rspec
# run specific test files
bundle exec rspec spec/models
bundle exec rspec spec/controllers
bundle exec rspec spec/mailers
bundle exec rspec spec/services
bundle exec rspec spec/helpers
bundle exec rspec spec/requests- Start rails server
rails s- Start tailwind css watcher (in separate terminal)
rails tailwindcss:watch
# or
yarn build:css- Access the application
- Visit: http://localhost:3000
BlogPost.Demo.-.User.Authentication.Email.Notification.Feedback.System.mp4
BlogPost.filtering.and.pagination.webm
- Initial Commit: Create and setup Blog Post with feedback mailer
- UI Improvement: Integrated Tailwind CSS for responsive design
- Email Notifications: Set up email delivery via SendGrid service
- User Authentication: Integrated Devise for registration/login
- User Profiles: Avatar upload with Active Storage and profile management
- Bug Fix: Ensure delete button sends correct DELETE request with Turbo
- Test: Set up Unit Test Framework
- Feature: BlogPost Filtering & Pagination