<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amine EL ALAOUI MRANI</title>
    <description>The latest articles on DEV Community by Amine EL ALAOUI MRANI (@mranidev).</description>
    <link>https://dev.to/mranidev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3721811%2F39c15269-9324-4472-bd18-2dafbcc8e271.png</url>
      <title>DEV Community: Amine EL ALAOUI MRANI</title>
      <link>https://dev.to/mranidev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mranidev"/>
    <language>en</language>
    <item>
      <title>From Framer to React</title>
      <dc:creator>Amine EL ALAOUI MRANI</dc:creator>
      <pubDate>Sun, 02 Aug 2026 16:09:07 +0000</pubDate>
      <link>https://dev.to/mranidev/from-framer-to-react-27p1</link>
      <guid>https://dev.to/mranidev/from-framer-to-react-27p1</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbmfnr87n5aol4hbwkjnl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbmfnr87n5aol4hbwkjnl.png" alt=" " width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Framer has become one of the most popular tools for designing and publishing modern websites. Its visual editor, responsive layout system, and component-based architecture allow designers and developers to build beautiful experiences quickly.&lt;/p&gt;

&lt;p&gt;As AI-assisted development has evolved, a new workflow has emerged: instead of manually rebuilding a design, developers want AI to inspect the design structure and generate production-ready React code.&lt;/p&gt;

&lt;p&gt;Framer's Model Context Protocol (MCP) server is a major step in that direction. It exposes a project's internal structure, allowing AI assistants to inspect pages, components, layouts, typography, assets, and design tokens. With APIs such as &lt;code&gt;getProjectXml&lt;/code&gt; and &lt;code&gt;getNodeXml&lt;/code&gt;, an AI can understand a Framer project far beyond what a screenshot can provide.&lt;/p&gt;

&lt;p&gt;However, there is still a gap between understanding a project and owning its code.&lt;/p&gt;

&lt;p&gt;Today, exporting React components relies on Framer's official export functionality, which requires a paid subscription. While this works well, it creates a dependency on a proprietary export pipeline. At the same time, the design information required to recreate the application is already accessible through the MCP server.&lt;/p&gt;

&lt;p&gt;This raises an interesting question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If AI can already understand the complete structure of a Framer project, do we really need a dedicated code exporter?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The answer is increasingly &lt;strong&gt;no&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Large language models are now capable of transforming structured design data into clean, maintainable React applications. Instead of treating AI as a code completion tool, we can use it as a compiler that translates Framer's design tree into reusable React components.&lt;/p&gt;

&lt;p&gt;This project explores that idea.&lt;/p&gt;

&lt;p&gt;Our goal is not to replace Framer or reverse engineer its internal implementation. Instead, we want to build an open-source MCP plugin that extracts the information already available through Framer's public MCP interface and converts it into a developer-friendly React project.&lt;/p&gt;

&lt;p&gt;Rather than producing opaque generated code, the plugin will focus on generating readable, modular, and customizable components that developers can easily integrate into existing React, Vite, or Next.js applications.&lt;/p&gt;

&lt;p&gt;By making the entire workflow open source, we hope to give developers full ownership of their UI, encourage community contributions, and demonstrate how AI and open protocols can work together to bridge the gap between visual design tools and modern frontend development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Problem
&lt;/h2&gt;

&lt;p&gt;A Framer project isn't just a collection of rectangles and text. Behind every element is a complex object containing layout information, styling, animations, constraints, interactions, assets, and references to other components.&lt;/p&gt;

&lt;p&gt;Internally, a simple button might contain dozens of properties, including:&lt;/p&gt;

&lt;p&gt;Position&lt;br&gt;
Size&lt;br&gt;
Padding&lt;br&gt;
Border radius&lt;br&gt;
Colors&lt;br&gt;
Typography&lt;br&gt;
Variants&lt;br&gt;
Component references&lt;br&gt;
Hover interactions&lt;br&gt;
Responsive constraints&lt;br&gt;
Animation settings&lt;/p&gt;

&lt;p&gt;Many of these objects reference one another, forming a graph of interconnected data. This structure is ideal for Framer's rendering engine, but it isn't suitable for an AI model to consume directly.&lt;/p&gt;

&lt;p&gt;The Role of an Intermediate Representation&lt;/p&gt;

&lt;p&gt;To make a design understandable, the project must first be serialized into a structured format such as XML or JSON.&lt;/p&gt;

&lt;p&gt;Instead of exposing internal application objects, the exporter produces a clean description of the design.&lt;/p&gt;

&lt;p&gt;For example, a heading might become:&lt;/p&gt;

&lt;p&gt;
    fontFamily="Inter"&lt;br&gt;
    fontSize="64"&lt;br&gt;
    fontWeight="700"&amp;gt;&lt;br&gt;
    Build Better Products&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Or in JSON:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "type": "Text",&lt;br&gt;
  "text": "Build Better Products",&lt;br&gt;
  "fontFamily": "Inter",&lt;br&gt;
  "fontSize": 64,&lt;br&gt;
  "fontWeight": 700&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Both formats describe exactly the same element, but in a way that an AI model can reason about.&lt;/p&gt;

&lt;p&gt;Why Structure Matters&lt;/p&gt;

&lt;p&gt;AI doesn't "see" a design the way humans do. Instead, it analyzes relationships between pieces of structured information.&lt;/p&gt;

&lt;p&gt;Consider this hierarchy:&lt;/p&gt;

&lt;p&gt;Hero Section&lt;br&gt;
├── Navigation&lt;br&gt;
├── Heading&lt;br&gt;
├── Description&lt;br&gt;
├── CTA Button&lt;br&gt;
└── Illustration&lt;/p&gt;

&lt;p&gt;This hierarchy immediately communicates intent.&lt;/p&gt;

&lt;p&gt;The AI understands that the button belongs inside the hero section, the navigation is a separate component, and the illustration is associated with the content rather than floating independently.&lt;/p&gt;

&lt;p&gt;Without this structure, the AI would have to infer relationships from thousands of unrelated properties, significantly reducing accuracy.&lt;/p&gt;

&lt;p&gt;XML vs. JSON&lt;/p&gt;

&lt;p&gt;Both XML and JSON represent the same information but serve slightly different purposes.&lt;/p&gt;

&lt;p&gt;XML&lt;/p&gt;

&lt;p&gt;XML mirrors the nested structure of a design very naturally.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
    Hello&lt;br&gt;
    Get Started&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Its similarities to HTML make it easy for developers to inspect and debug manually.&lt;/p&gt;

&lt;p&gt;However, XML becomes verbose as projects grow.&lt;/p&gt;

&lt;p&gt;JSON&lt;/p&gt;

&lt;p&gt;JSON is more compact and integrates seamlessly with JavaScript and TypeScript.&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "type": "Frame",&lt;br&gt;
  "children": [&lt;br&gt;
    {&lt;br&gt;
      "type": "Text",&lt;br&gt;
      "text": "Hello"&lt;br&gt;
    },&lt;br&gt;
    {&lt;br&gt;
      "type": "Button",&lt;br&gt;
      "text": "Get Started"&lt;br&gt;
    }&lt;br&gt;
  ]&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Because most frontend tooling already works with JSON, it is often the preferred choice for automated pipelines.&lt;/p&gt;

&lt;p&gt;Why Not Generate React Immediately?&lt;/p&gt;

&lt;p&gt;At first glance, it seems reasonable to ask AI to convert Framer directly into React.&lt;/p&gt;

&lt;p&gt;In reality, that requires solving several difficult problems simultaneously.&lt;/p&gt;

&lt;p&gt;The model must:&lt;/p&gt;

&lt;p&gt;Understand the design hierarchy.&lt;br&gt;
Infer layout intent.&lt;br&gt;
Decide between Flexbox, Grid, or absolute positioning.&lt;br&gt;
Extract reusable components.&lt;br&gt;
Preserve responsiveness.&lt;br&gt;
Generate clean React code.&lt;br&gt;
Produce maintainable styling.&lt;/p&gt;

&lt;p&gt;Combining all of these tasks into a single prompt often leads to inconsistent results.&lt;/p&gt;

&lt;p&gt;A staged workflow is far more reliable.&lt;/p&gt;

&lt;p&gt;Framer&lt;br&gt;
      ↓&lt;br&gt;
Structured XML or JSON&lt;br&gt;
      ↓&lt;br&gt;
Layout Analysis&lt;br&gt;
      ↓&lt;br&gt;
Component Extraction&lt;br&gt;
      ↓&lt;br&gt;
React Generation&lt;br&gt;
      ↓&lt;br&gt;
Optimization&lt;/p&gt;

&lt;p&gt;Each stage focuses on one responsibility, improving both accuracy and maintainability.&lt;/p&gt;

&lt;p&gt;Going Beyond XML&lt;/p&gt;

&lt;p&gt;While XML and JSON are excellent interchange formats, they still describe Framer's implementation rather than the designer's intent.&lt;/p&gt;

&lt;p&gt;A more advanced approach is to introduce a normalized Design Abstract Syntax Tree (Design AST).&lt;/p&gt;

&lt;p&gt;Instead of exporting low-level frames and coordinates, the exporter produces semantic elements.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "type": "HeroSection",&lt;br&gt;
  "layout": "stack",&lt;br&gt;
  "padding": 80,&lt;br&gt;
  "children": [&lt;br&gt;
    {&lt;br&gt;
      "type": "Heading",&lt;br&gt;
      "text": "Build Better Websites"&lt;br&gt;
    },&lt;br&gt;
    {&lt;br&gt;
      "type": "PrimaryButton",&lt;br&gt;
      "text": "Get Started"&lt;br&gt;
    }&lt;br&gt;
  ]&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Notice how this representation captures meaning instead of implementation details.&lt;/p&gt;

&lt;p&gt;Rather than telling the AI there is a rectangle positioned at specific coordinates, it communicates that this is a hero section containing a heading and a primary call-to-action button.&lt;/p&gt;

&lt;p&gt;This semantic representation is significantly easier for AI to transform into clean React components.&lt;/p&gt;

&lt;p&gt;The Complete AI Pipeline&lt;/p&gt;

&lt;p&gt;A modern Framer-to-code system typically follows this architecture:&lt;/p&gt;

&lt;p&gt;Framer Project&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
Framer MCP&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
Structured Export (XML/JSON)&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
Design AST&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
AI Layout Analysis&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
React Component Tree&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
Next.js + Tailwind CSS&lt;br&gt;
        │&lt;br&gt;
        ▼&lt;br&gt;
Production Application&lt;/p&gt;

&lt;p&gt;This pipeline separates extraction, analysis, and code generation into distinct stages, allowing each to be optimized independently.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;XML and JSON are not the final goal—they are the language that connects design tools with AI systems. By converting Framer's complex internal objects into structured, readable data, they provide the context AI needs to understand hierarchy, layout, styling, and component relationships.&lt;/p&gt;

&lt;p&gt;As AI-powered development continues to evolve, the most successful tools will likely move beyond raw XML and JSON toward richer semantic representations such as Design ASTs. These representations capture the intent behind a design, enabling AI to generate cleaner, more reusable, and production-ready code.&lt;/p&gt;

&lt;p&gt;The future of design-to-code is not about translating pixels into HTML. It is about translating design intent into software architecture.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building Scalable Laravel APIs from Scratch</title>
      <dc:creator>Amine EL ALAOUI MRANI</dc:creator>
      <pubDate>Sat, 04 Jul 2026 00:56:32 +0000</pubDate>
      <link>https://dev.to/mranidev/building-scalable-laravel-apis-from-scratch-4n0j</link>
      <guid>https://dev.to/mranidev/building-scalable-laravel-apis-from-scratch-4n0j</guid>
      <description>&lt;p&gt;A practical guide to designing clean, maintainable, and scalable API architecture using Laravel, covering routing, controllers, services, and best practices for real-world backend systems.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Hello World!</title>
      <dc:creator>Amine EL ALAOUI MRANI</dc:creator>
      <pubDate>Thu, 02 Jul 2026 16:23:00 +0000</pubDate>
      <link>https://dev.to/mranidev/hello-world-1fhj</link>
      <guid>https://dev.to/mranidev/hello-world-1fhj</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is amazing.&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
