Skip to content

docs: deploy databases/keys, admin setup guide, design next steps - #149

Merged
Davidslv merged 1 commit into
mainfrom
docs/deploy-admin-design-gaps
Sep 28, 2026
Merged

Davidslv merged 1 commit into
mainfrom
docs/deploy-admin-design-gaps

Conversation

@Davidslv

Copy link
Copy Markdown
Owner

Fills the three gaps I reported after the onboarding fix, plus two bugs found while doing it.

1. Deploying guide

  • New section on Rails 8's four production databases. DATABASE_URL only sets up primary, so db:prepare fails on a local socket for cache, queue and cable. I hit this running a generated app in Docker. The fix is CACHE_DATABASE_URL, QUEUE_DATABASE_URL and CABLE_DATABASE_URL, which I verified there.
  • New section on the Active Record encryption keys production needs, with a key-rotation warning.
  • The generated Kamal deploy.yml now lists the three extra database URLs.

2. Admin setup guide

New doc/how-to/SETTING_UP_ADMIN.md: install, the staff flag, what each kind of visitor sees, platform vs tenant mode, before_admin_action, ejecting, adding your own dashboard, and troubleshooting. It's linked from the site sidebar, the doc index, the README and Getting Started.

I checked every step in a generated app:

  • Signed out gets 302 and non-staff gets 403.
  • Following the custom-dashboard steps for a Project model: index, new, show and edit return 200, and it appears in the sidebar.
  • The before_admin_action IP example returns 403 from other IPs and 200 from 10.x.

3. Design generator message

bin/rails tailwindcss:build is now marked required, and the message names the error you get without it. It has a spec.

Bugs found while writing these

  • Admin with only some engines returned 500 everywhere. With core and auth only, the navigation loaded dashboards for missing models (uninitialized constant Accounts). Dashboards whose engine isn't installed are now hidden and return 404. Production eager loading passes. Has a spec.
  • The engine README's "add a dashboard" recipe was stale. It now includes self.model, the policies, the leading-slash route, and deleting Administrate's generated host controller, which bypasses the gate. The README also claimed theme_css_path restyles the admin. The setting is stored but never applied, so the README now says so.

Checks

  • rubocop: clean
  • unit suite: 1141 examples
  • integration suite: all 7 engine suites and 3 host examples green
  • docs-site build: 37 pages, including the new guide

- DEPLOYING: Rails 8's cache/queue/cable databases need their own URLs
  (db:prepare fails on a local socket otherwise, seen in Docker); the
  encryption keys production needs. Kamal template lists the URLs.
- New how-to: SETTING_UP_ADMIN.md; linked from the site sidebar, doc
  index, README, and Getting Started. Every step verified in a
  generated app, including a custom Project dashboard and the
  before_admin_action example.
- Admin fix found while writing it: with only core+auth installed every
  admin page 500'd (navigation touched Accounts/Billing models). Missing
  engines' dashboards are hidden and 404.
- Admin README: accurate custom-dashboard recipe; theme_css_path is
  documented as not applied yet (it is stored but unused).
- Design generator: tailwindcss:build is marked required.
@Davidslv
Davidslv merged commit 3b48a85 into main Sep 28, 2026
11 of 12 checks passed
@Davidslv
Davidslv deleted the docs/deploy-admin-design-gaps branch September 28, 2026 10:05
@Davidslv Davidslv mentioned this pull request Sep 28, 2026
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