AI summary by TwinMind
Why Don't We Have A Laravel For JavaScript?
Theo - t3․gg
12m 36s
Rails Era and All-in-One Frameworks
- Rails revolutionized web development with Ruby
- Server and client integration through MVC paradigm
- Template-based approach with model-view-controller structure
- GitHub still powered almost entirely by Rails infrastructure
- Laravel as prime example of all-in-one framework
- "PHP framework for web artisans"
- Comprehensive ecosystem requiring page scroll in 3-column structure to see all options
- Built-in primitives for mail servers, push notifications, websockets
- LiveWire for dynamic front-end UI without leaving PHP
- Server-side powered UI with constant client-server interaction via websockets
Historical Context - Why All-in-One Worked
- Alternative to Rails was MEAN stack (MongoDB, Express, Angular, Node)
- "At least 2 of 4 components were mistakes, if not 3"
- Extremely modular but parts not built for compatibility
- Parts could be glued together but didn't always work well
- Pain points of modular approach in early days:
- Hard to implement/build around certain parts
- Feeling solution picked was wrong when new one emerged
- Constant catch-up and upgrade issues
- Laravel/Rails advantage: guaranteed "good enough" solution for every problem
JavaScript All-in-One Attempts
- Multiple attempts at Rails-like frameworks for JS:
- Blitz: Similar to Create T3 App but with own wrappers, less modularity
- Created by Brandon Bayer who missed Rails experience
- Built-in solutions for every problem but limited customization
- Did not particularly take off
- Adonis: TypeScript framework for web apps and API servers
- Focused on server-side, API creation
- Includes ecosystem of tools, DBs, ORMs, controllers
- Looks/feels like Ruby and Rails
- Redwood: Batteries-included React alternative to Next
- Built-in GraphQL server, Storybook integration
- Moving to server components and away from GraphQL
- Historically struggled with adoption - "don't know anybody shipping Redwood who isn't part of team"
- Blitz: Similar to Create T3 App but with own wrappers, less modularity
Create T3 App as Modular Alternative
- Community-built starting point with recommendations:
- Moved from Prisma to Drizzle (better experience)
- tRPC for client-server interactions (also server components now)
- Tailwind CSS (even Rails/Elixir communities agree)
- NextAuth for authentication
- TypeScript (vanilla JS rarely makes sense for application code)
- Next.js as core framework
- More modular approach - gives parts and lets you opt in/out
Why JavaScript Doesn't Need All-in-One
- React ecosystem saying: "If you're not using framework, you're building one"
- Any app dev can build exact framework they need
- Easy to swap pieces in/out and compose them
- JavaScript advantages:
- npm ecosystem
- React components, hooks
- Much easier to compose, change, swap, rewrite
- Pieces have gotten "really really good" over time
Ecosystem Strength Examples
- Database: Not happy with Prisma? Drizzle by "3 guys in Ukraine" - faster, smaller, easier to work with
- Frameworks: Don't like Next? Waku and Remix pushing React boundaries
- Frontend: Don't like React? Solid and Svelte are phenomenal alternatives
- Migration ease: Can start with Create React App, copy-paste components to new solutions
Addressing Startup/Service Concerns
- Concern: Startups forming around individual pieces (vs built into framework)
- Author's perspective: This is awesome, not problematic
- Authentication example:
- Self-host options: AuthJS, Lucia
- Service options: Clerk, Auth0 (Auth0 originally built around Rails community)
- Compliance, JWT creation, integrations complex enough to warrant services
- For every big company solving problem, "five open source alternatives made by developers like us"
- Can contribute, adopt, fork as needed
- Harder for companies to verticalize in monolithic frameworks like Rails/Laravel
Flexibility and Longevity
- Developers can stay on older versions if preferred
- Example: "devs happy shipping React 16, barely using Hooks"
- Don't have to keep up with constant changes
- Hard to "pick wrong" with solutions recommended online with docs <5 years old
- Can migrate between solutions relatively easily
Current T3 App Approach
- Still recommends 3-year-old approach by default:
- Pages router rendering
- Quick server-side template
- Client takeover with tRPC
- Good solution for client-heavy dynamic applications
- Example: Ping application hasn't been moved because current solution works well
- Can migrate when/if desired
Conclusion
- JavaScript ecosystem's modularity is strength, not weakness
- No other language has "so many great full-stack all-in-one solutions"
- No other language has "so many great pieces that we can compose"
- Ecosystem allows building custom solutions for specific needs
- "Long live JS and God bless the maintainers"
