DEV Community

Cover image for Built a Blog App with Rails & PostgreSQL – Looking for Code Review!
SOHAM CHAVAN
SOHAM CHAVAN

Posted on

Built a Blog App with Rails & PostgreSQL – Looking for Code Review!

 Hey DEV community! šŸ‘‹

I've been working on a Blog Application built with Ruby on Rails to practice backend architecture, clean code standards, and Rails idioms.

I'm sharing the repository to get feedback, code reviews, and suggestions on how to make the codebase cleaner and more scalable.

šŸš€ Tech Stack & Features

  • Backend: Ruby on Rails 7, PostgreSQL
  • Features: User authentication, post publishing, commenting system, dynamic permissions

šŸ› ļø GitHub Repository

Blog-App

A robust blogging platform built with Ruby on Rails and PostgreSQL.

Tech stack

  • Ruby (>= 3.x)
  • Rails (>= 8.x)
  • PostgreSQL
  • JavaScript (importmap / optional Node build tooling)
  • TailwindCSS, Stimulus, Devise, Stripe

Quickstart (local development)

  1. Clone the repo
git clone https://github.com/sohamchavan07/Blog-App.git
cd Blog-App
Enter fullscreen mode Exit fullscreen mode
  1. Install dependencies
bundle install
bin/setup || (yarn install || npm install)
Enter fullscreen mode Exit fullscreen mode
  1. Environment

Copy example env and add required keys (Stripe keys, DB URL, secrets):

cp .env.example .env
# edit .env and add STRIPE_* and other secrets
Enter fullscreen mode Exit fullscreen mode
  1. Database
rails db:create db:migrate db:seed
Enter fullscreen mode Exit fullscreen mode
  1. Start the app
bin/dev
# or: rails server
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:3000

Tests

Run the test suite with:

bin/rails test
# or if using RSpec: bundle exec rspec
Enter fullscreen mode Exit fullscreen mode

Common commands

  • Install gems: bundle install
  • Install JS deps: yarn install or npm install
  • Run migrations: rails db:migrate
  • Seed: rails db:seed
  • Start dev server: bin/dev or rails server

Screenshots

Screenshot from 2026-07-29 20-51-16

Screenshot from 2026-07-29 20-47-48

Screenshot from 2026-07-29 20-37-04

Environment variables (examples)

  • DATABASE_URL or standard config/database.yml settings
  • RAILS_MASTER_KEY or config/master.key
  • …

šŸ” Where I'm Looking for Feedback

  1. Controller vs Model Boundaries: Are controllers thin enough, or am I leaning on the wrong layer for business logic?
  2. Database Performance: Any obvious N+1 queries or missing indexes on foreign keys?
  3. Rails Conventions: Code smells or areas where I can better follow "Convention over Configuration"?

I’d love any constructive feedback, refactoring ideas, or suggestions on what to build next. Drop your thoughts below!

Top comments (0)