Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dlysenko
Copy link

@dlysenko dlysenko commented Dec 28, 2025

Summary

This PR fixes local development setup issues and adds comprehensive documentation for new developers.

Key changes:

  • Fix PostgreSQL version in Docker Compose files
  • Fix environment variable loading and naming
  • Add CLAUDE.md for AI-assisted development
  • Add detailed local development setup instructions to README

Changes

Fix: PostgreSQL version in Docker (25d9311)

  • Set explicit PostgreSQL 16-alpine version across all Docker Compose files
  • Ensures consistent database version between dev, test, and production

Files:

  • docker-compose.yaml
  • docker-compose.dev.yaml
  • docker-compose.test.yaml

Docs: Add CLAUDE.md and local setup instructions (c426920)

CLAUDE.md (new file)

  • Project overview and architecture explanation
  • Development commands (test, lint, build, database)
  • Submodule structure (core engine, editor)
  • Multi-tenant routing explanation
  • Key models and authorization patterns
  • Environment setup details

README.md

  • Added "Local Development Setup" section with step-by-step instructions
  • Prerequisites (Ruby 3.2.2, Bun, Docker)
  • Host configuration (blogbowl.test)
  • Database setup commands

config/environments/development.rb

  • Set asset_host to nil to fix CSS/JS loading on localhost

Fix: Environment variable loading (bd42745)

bin/dev

  • Changed --env /dev/null to --env .env to enable environment file loading
  • This was preventing Rails from reading configuration variables

.env.example

  • Fixed variable name: BASE_DOMAINPAGES_BASE_DOMAIN
  • Added DATABASE_URL with correct local development connection string
  • Removed unused DB_USERNAME, DB_PASSWORD, DB_HOST, DB_PORT variables

These fixes resolve:

  • "Domain is invalid" error when creating pages
  • Settings page crash (nil workspace_settings)
  • CSS/JS not loading in development

Test plan

  • Clone repo fresh with git clone --recurse-submodules
  • Copy .env.example to .env
  • Add 127.0.0.1 blogbowl.test to /etc/hosts
  • Run docker compose -f docker-compose.dev.yaml up -d
  • Run bundle install && bun install
  • Run RAILS_ENV=development bin/rails db:migrate db:seed
  • Run bin/dev
  • Verify login works at http://blogbowl.test:3000/sign_in
  • Verify Settings page loads without errors
  • Verify creating a new Page works without "Domain is invalid" error
  • Verify CSS/JS assets load correctly

- Add CLAUDE.md with project architecture, commands, and development guidance
- Update README.md with detailed local development setup steps
- Fix asset_host in development.rb to allow assets to load correctly on localhost
- Disable SSL verification in development environment for local testing
- Change bin/dev to load .env file instead of /dev/null
- Fix .env.example to use correct variable names:
  - PAGES_BASE_DOMAIN instead of BASE_DOMAIN
  - DATABASE_URL instead of separate DB_* variables

These fixes resolve issues with page creation ("Domain is invalid") and
settings page errors when running locally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant