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)
- 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 |
| 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
# 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=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# 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/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
- 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