From Rails to Phoenix: An AI-Driven Development Journey

My personal journey transitioning from Ruby on Rails to Phoenix Framework, driven by the rise of AI-powered development tools like Tidewave.ai.

From Rails to Phoenix: An AI-Driven Development Journey
Photo by Marek Piwnicki / Unsplash

After years of working with Ruby on Rails, I recently made the decision to transition my personal projects to Phoenix Framework. This wasn't a decision driven by Rails being inadequate—it remains an excellent framework. Instead, it was motivated by the evolving landscape of AI-powered development and how different frameworks align with this new paradigm.

In this post, I'll share the specific reasons behind my transition and how the emergence of AI development tools like Tidewave.ai fundamentally changed my perspective on framework selection.

The Rails Journey: From Hotwire to React and Beyond

Starting with Hotwire

Initially, I was drawn to Rails' Hotwire approach. The promise of building modern, interactive web applications while staying within the Rails ecosystem was compelling. Hotwire offers rapid development capabilities and maintains the elegance that Rails is known for.

However, I found myself hitting walls when dealing with more complex interactions. My familiarity with Rails wasn't deep enough to navigate these challenges efficiently. While Hotwire is powerful, it requires a solid understanding of Rails conventions and patterns to leverage effectively.

The React Transition

As I detailed in my previous post about moving from Hotwire to Vite and React, this led me to explore Rails + Inertia.js + React. The primary drivers were:

Rich Component Ecosystem: My weakness with CSS made React's abundant UI libraries (particularly Shadcn UI) incredibly valuable. The ecosystem provided polished, accessible components that eliminated hours of custom styling work.

AI-Powered Development: AI assistants became remarkably proficient at generating React components with live previews. This transformed my development workflow from a multi-step process (generate, copy, refresh, iterate) to a streamlined experience where I could refine components in real-time before copying finalized code.

Modern Development Experience: Vite's hot module replacement, on-demand compilation, and instant server starts provided a dramatically improved developer experience compared to traditional Rails asset handling.

Growing React Fatigue

While the Rails + React combination solved my immediate UI challenges and improved AI integration, after working with this stack for an extended period, I grew tired of React's development patterns. The constant context switching between backend Rails logic and frontend React components, managing state across boundaries, and the overall complexity of the setup started to feel burdensome for my personal projects.

The deployment complexity also increased significantly—managing Node.js dependencies, asset building pipelines, and proper caching configurations added overhead that felt disproportionate for my simpler personal projects.

Why Phoenix LiveView Changed Everything

Simplicity That Actually Works

Phoenix LiveView presented a revelation: real-time, interactive web applications without the complexity of a separate frontend framework. Unlike my experience with Hotwire, LiveView's mental model clicked immediately.

The concept is straightforward—server-rendered HTML that updates in real-time through WebSocket connections. There's no complex state management, no build tools for the frontend, and no context switching between different paradigms. You write Elixir, and you get a modern web application.

Built-in Styling Solution

Phoenix 1.8 (currently in RC) ships with Tailwind CSS and DaisyUI out of the box. While I'm not entirely fond of DaisyUI's aesthetic choices, having a complete styling solution included means I can focus on building features rather than configuring tools.

This default setup eliminates the decision fatigue around styling approaches and provides a solid foundation for rapid prototyping. For personal projects where time is precious, this convenience is invaluable.

The AI Revolution: Why Framework Choice Matters More Than Ever

Here's where my journey took an unexpected turn. While I had successfully addressed my UI challenges with React and achieved better AI integration, the emergence of specialized AI development tools fundamentally changed my perspective on framework selection.

The Tidewave.ai Game Changer

The most significant factor in my transition was the emergence of Tidewave.ai. This AI-powered development platform can generate substantial portions of application code, handle complex business logic, and even create entire features based on natural language descriptions.

For one of my personal projects, 99% of the code was generated through Tidewave. This isn't just about code completion or suggestions—it's about generating complete, working implementations of features that would typically take hours or days to build manually.

Framework Compatibility with AI Tools

While Tidewave supports Rails, and my previous React setup had already improved AI integration compared to pure Hotwire, I found that Phoenix's simpler mental model produces even better results when working with AI code generation.

The key difference lies in complexity and cognitive overhead:

React + Rails setup: Despite better AI integration than Hotwire, still required managing state across backend/frontend boundaries, complex build processes, and multiple paradigms.

Phoenix LiveView: Offers a single paradigm where everything lives in Elixir. AI tools can reason about the entire feature in one context without needing to understand cross-boundary state management or build configurations.

LiveView's declarative nature and Elixir's functional programming paradigms seem to align exceptionally well with how AI tools understand and generate code. The explicit state management and clear component boundaries make it easier for AI to reason about intended functionality compared to the distributed state management often required in React applications.

The New Development Paradigm

AI-powered development tools are fundamentally changing how we think about framework selection. Previously, I might choose a framework based on:

  • Personal familiarity
  • Community size
  • Available libraries
  • Performance characteristics

Now, I also consider:

  • How well the framework's patterns translate to AI code generation
  • How explicit and declarative the framework's conventions are
  • How easily AI can understand and extend existing codebases

The Practical Benefits

Faster Iteration Cycles

With Phoenix LiveView and AI assistance, I can iterate on ideas incredibly quickly. The combination of:

  • No frontend build step
  • Real-time updates through LiveView
  • AI-generated feature implementations

Creates a development experience that feels almost magical. I can describe a feature in natural language, get a working implementation, and see it running in the browser within minutes.

Reduced Cognitive Load

The simplicity of having everything in one language (Elixir) and one paradigm (LiveView) significantly reduces cognitive overhead compared to both my previous setups:

Hotwire: Required deep Rails knowledge for complex interactions
Rails + React: Eliminated CSS challenges but introduced context switching between backend and frontend concerns, state synchronization issues, and complex build configurations
Phoenix LiveView: Single language, single paradigm, no build step, no state synchronization complexity

This progression shows how each step addressed previous pain points while introducing new ones, until Phoenix LiveView finally provided a solution that minimized overall complexity.

Better AI Integration

AI tools seem to perform better when working with Phoenix LiveView code. The explicit state management, clear component boundaries, and functional programming patterns provide better context for AI systems to understand intent and generate appropriate code.

Challenges and Trade-offs

Learning Curve

Transitioning to Elixir and Phoenix required learning new concepts like the Actor model, pattern matching, and functional programming principles. However, I found these concepts more intuitive than mastering Rails' vast convention-over-configuration approach.

Ecosystem Maturity

Rails has a more mature ecosystem with solutions for virtually every problem. Phoenix's ecosystem, while growing rapidly, doesn't have the same breadth. However, for most web application needs, Phoenix provides excellent built-in solutions.

Team Considerations

This transition makes sense for personal projects where I have full control over technology choices. For team projects, factors like existing expertise, hiring considerations, and long-term maintenance become more important.

Looking Forward

The AI-First Development Era

We're entering an era where development frameworks will be evaluated not just on their technical merits, but on how well they integrate with AI development tools. Frameworks with clear, explicit patterns and minimal "magic" are likely to perform better in this new paradigm.

Phoenix's Advantages

Phoenix LiveView seems particularly well-positioned for this shift:

  • Clear, explicit patterns that AI can understand
  • Minimal context switching between technologies
  • Built-in real-time capabilities
  • Strong conventions without excessive complexity

Continuous Evolution

As AI tools continue to evolve, I expect the criteria for framework selection to keep changing. What matters today might be different from what matters in two years. The key is remaining adaptable and focusing on tools that enhance productivity rather than create complexity.

Conclusion

My transition from Rails to Phoenix represents an evolution through multiple stages: Hotwire → Rails + React → Phoenix LiveView. Each transition addressed specific pain points from the previous setup:

  • Hotwire to React: Solved CSS/UI challenges and improved AI integration
  • React to Phoenix: Eliminated complexity while maintaining AI benefits and adding superior real-time capabilities

This wasn't a single leap but a progressive journey where each step taught me valuable lessons about what matters most in modern development workflows.

My previous experience with Rails and React demonstrated that AI integration and rich UI components could solve real development challenges. However, the emergence of specialized AI tools like Tidewave.ai showed that framework choice now extends beyond traditional concerns to include AI compatibility and cognitive simplicity.

Phoenix LiveView feels like the culmination of this journey—offering the AI benefits I discovered with React, the real-time capabilities I wanted from Hotwire, and the simplicity that makes both human and AI development more effective. The framework's explicit patterns, functional programming foundations, and minimal complexity make it an ideal partner for AI-assisted development.

As we move into this new era of AI-powered software development, the frameworks that win won't just be those with the best technical features, but those that amplify our ability to work effectively with AI tools. For my personal projects, Phoenix has proven to be exactly that kind of framework.