All you need is Rails (Engines): Compartmentalising your Monolith
summary
Claims a lean Rails engine pattern: drop the gemspec and dummy app, keep a single lib/engine file plus app/, and Rails auto-loads models/controllers/routes so the example MusicUniverse app boots and models appear in the console. Notes the generator initially creates 80 files; the stripped approach removes that noise. Uses the Packwerk gem by Shopify to enforce package privacy and declared dependencies, keeps one single database and test helper, mounts engines under app routes, and shows the modules are extractable later if operational needs demand.
AI-written summary · about
chapters (17)
- 0:00Rails engines introduction
- 3:08Rails conventions at scale
- 7:19Code design principles
- 8:43Monoliths becoming unmanageable
- 11:11Rails engines complexity
- 13:38Leaner Rails engines
- 16:28Minimal Rails engine structure
- 19:38Modular Rails app with engines
- 22:48Nested engines structure
- 23:08Models migrations setup
- 25:14Testing and routes in engines
- 27:43Modular structure importance
- 30:31Packwerk dependency management
- 31:59Packwerk privacy interfaces
- 34:05Packwerk dependency rules
- 36:34Modular apps to microservices
- 37:15Future of modular Rails








