<?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: Catalin Pit</title>
    <description>The latest articles on DEV Community by Catalin Pit (@catalinpit).</description>
    <link>https://dev.to/catalinpit</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1106405%2F0533a4f8-d710-4744-9898-6c1ec7d989c6.jpg</url>
      <title>DEV Community: Catalin Pit</title>
      <link>https://dev.to/catalinpit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/catalinpit"/>
    <language>en</language>
    <item>
      <title>I Landed 4 Jobs and Earned $25K+ with Technical Writing</title>
      <dc:creator>Catalin Pit</dc:creator>
      <pubDate>Thu, 10 Oct 2024 15:09:37 +0000</pubDate>
      <link>https://dev.to/catalinpit/i-landed-4-jobs-and-earned-25k-with-technical-writing-o0h</link>
      <guid>https://dev.to/catalinpit/i-landed-4-jobs-and-earned-25k-with-technical-writing-o0h</guid>
      <description>&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;My Technical Writing Journey&lt;/li&gt;
&lt;li&gt;The Results of Technical Writing&lt;/li&gt;
&lt;li&gt;You Can Learn It Too&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  My Technical Writing Journey
&lt;/h2&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fin21put84rpi9heq54j8.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fin21put84rpi9heq54j8.jpg" alt="The power of technical writing" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a final-year university student preparing to enter the industry, I knew I had to differentiate myself from other candidates in a competitive job market. That's when the idea struck me: what if I combined two activities I enjoy, programming and writing?&lt;/p&gt;

&lt;p&gt;Combining programming and writing would bring three significant benefits. First of all, publishing my code online would help me consolidate the information in my brain. They say that "to teach is to learn twice". Secondly, others can find my code and hopefully learn something from it (or give me feedback to improve my skills). Lastly, it would showcase my thinking process and soft skills, such as communication skills, to prospective employers.&lt;/p&gt;

&lt;p&gt;With this goal and benefits in mind, I began my journey into technical writing by launching this website &lt;a href="https://catalins.tech/" rel="noopener noreferrer"&gt;catalins.tech&lt;/a&gt;. The image from the Internet Archive shows the very first posts that I published.&lt;/p&gt;

&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%2Fcatalins.tech%2Fcontent%2Fimages%2F2024%2F10%2Fcatalins-tech-in-2019.webp" 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%2Fcatalins.tech%2Fcontent%2Fimages%2F2024%2F10%2Fcatalins-tech-in-2019.webp" alt="I Landed 4 Jobs and Earned $25K+ with Technical Writing" width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As an aside, the excerpt from the bottom of my blog validates the things I've been saying about my passion for coding and writing:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before commenting&lt;/p&gt;

&lt;p&gt;This blog serves as my online notebook. Its purpose is not to teach other people because my solutions might not be the best ones, as I am a Computer Science student.&lt;/p&gt;

&lt;p&gt;I use this blog to explain my solutions to programming challenges. Occasionally, I am writing how I have developed/added different features in my projects. The blog allows me to come at a later time and see why I did things the way I did. It also helps me to track my programming progress.&lt;/p&gt;

&lt;p&gt;Thus, I combine two things I like: to write and to code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Initially, my goal was to share my solutions to interview questions and coding challenges.&lt;/p&gt;

&lt;p&gt;But as I continued publishing content, I increasingly enjoyed the dopamine rush of pressing the "publish" button. This made me go beyond coding challenges and interview questions. I began writing about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;My software development career, including topics like interview preparation and dealing with impostor syndrome, for example&lt;/li&gt;
&lt;li&gt;The side projects I built in my free time&lt;/li&gt;
&lt;li&gt;Career guidance for fellow developers&lt;/li&gt;
&lt;li&gt;Useful resources for developers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I kept writing about everything related to technology and a career in this industry. As I published more articles, my work started gaining traction and getting noticed.&lt;/p&gt;

&lt;p&gt;Tech publications like FreeCodeCamp and SitePoint, to name a few, invited me to publish on their platforms. These opportunities marked an important milestone in my technical writing journey. When I started writing, it was to stand out in job applications and reinforce the concepts I was learning. I never thought I'd publish on sites with hundreds of thousands, maybe even millions, of monthly readers, especially considering that English is my second language. It felt good and validated my writing skills.&lt;/p&gt;

&lt;p&gt;Collaborating with these publications changed the trajectory of my journey. It helped me expand my reach, build credibility within the tech community, and level up my writing skills. Having to adapt to various style guides and working alongside other talented writers helped me improve my writing tenfold.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Results of Technical Writing
&lt;/h2&gt;

&lt;p&gt;But it gets even better.&lt;/p&gt;

&lt;p&gt;Consistently publishing on my site and contributing to popular tech publications eventually led to my first paid technical writing gigs. I went from a random guy publishing on the internet to being paid to write technical articles.&lt;/p&gt;

&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%2Fcatalins.tech%2Fcontent%2Fimages%2F2024%2F10%2F_image.webp" 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%2Fcatalins.tech%2Fcontent%2Fimages%2F2024%2F10%2F_image.webp" alt="I Landed 4 Jobs and Earned $25K+ with Technical Writing" width="700" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to my memory, these were my first earnings from technical writing. As far as I can recall, the $1,170 represents the total amount for four articles. When the money hit my bank account, I was over the moon!&lt;/p&gt;

&lt;p&gt;After landing my first paid technical articles, finding these opportunities became easier and easier. Companies and publications started reaching out to me after discovering my work online, and people began recommending me to others. At one point, I earned more from these side gigs than my regular salary. Fast forward to today, and &lt;a href="https://technicalwriting.online/?ref=catalins.tech#earnings" rel="noopener noreferrer"&gt;technical writing has helped me earn more than $25,000&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Don't get me wrong. I'm not trying to brag or show off here. I want to show that technical writing can be a lucrative and beneficial skill. I had no idea until I got into it myself.&lt;/p&gt;

&lt;p&gt;But that's not at all. Sure, earning a generous income on the side is nice, but technical writing has also played a huge role in landing jobs. No exaggeration. It played a big part in landing 2 &lt;a href="https://catalins.tech/why-i-switched-back-from-devrel-to-engineering/#:~:text=A%20short%20note%20on%20DevRel" rel="noopener noreferrer"&gt;Developer Relations (DevRel)&lt;/a&gt; jobs and 2 engineering roles.&lt;/p&gt;

&lt;p&gt;I'm not going to talk about all those roles, but here's an example with the &lt;a href="https://catalins.tech/hasura-ecommerce-backend/" rel="noopener noreferrer"&gt;interview assignment&lt;/a&gt; for my DevRel role at Hasura.&lt;/p&gt;

&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%2Fcatalins.tech%2Fcontent%2Fimages%2F2024%2F10%2Finterview-exercise.webp" 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%2Fcatalins.tech%2Fcontent%2Fimages%2F2024%2F10%2Finterview-exercise.webp" alt="I Landed 4 Jobs and Earned $25K+ with Technical Writing" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, here's the announcement from when I joined Hashnode, where my writing played a bigger role since it is a blogging platform, and I am a big advocate for writing as a developer.&lt;/p&gt;

&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%2Fcatalins.tech%2Fcontent%2Fimages%2F2024%2F10%2Fhashnode-joining.webp" 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%2Fcatalins.tech%2Fcontent%2Fimages%2F2024%2F10%2Fhashnode-joining.webp" alt="I Landed 4 Jobs and Earned $25K+ with Technical Writing" width="800" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may say that technical writing is relevant for Developer Relations (DevRel) roles since they involve creating and publishing content online. However, my experience has shown that technical writing also played an important role in helping me land engineering roles.&lt;/p&gt;

&lt;p&gt;Many developers tend to focus only on their coding skills while neglecting soft skills such as communication. However, coding is just one aspect of software development. In reality, you likely spend a good percentage of your working hours communicating with various stakeholders, including clients, team members, managers, and others. You also document your code and processes, write changelogs, and create documentation, among other tasks.&lt;/p&gt;

&lt;p&gt;Communication is a very important skill, yet many engineers often overlook it. You know this is true if you've worked in a team of more than a few people.&lt;/p&gt;

&lt;p&gt;Having understood that, I took a different route than most engineers. Instead of focusing solely on my technical skills, I split my time and priorities in a way that allowed me to work on my soft skills. I started this site and published articles about the projects I was working on, the technologies and concepts I was learning, and the challenges I faced as an engineer. I also shared my experiences, insights, and lessons learned. In fewer words, I wrote about anything and everything related to tech and my tech career.&lt;/p&gt;

&lt;p&gt;When it came to finding new jobs and interviewing with companies, my technical writing skills and portfolio helped me stand out from the other candidates. They not only showcased my technical expertise but also my ability to communicate. They served as concrete examples of my thought process, work ethic, ability to articulate ideas and expertise. Instead of having to "sell" myself to potential employers, they did most of the work for me.&lt;/p&gt;

&lt;p&gt;I'm not trying to show off or brag, and I'll stop here so I don't become annoying. The bottom line is that my technical writing skills, and this site subsequently, opened doors to many opportunities, propelled my career forward, and helped me grow as an engineer.&lt;/p&gt;

&lt;p&gt;These experiences made me realize the potential writing can have in one's career.&lt;/p&gt;

&lt;h2&gt;
  
  
  You Can Learn It Too
&lt;/h2&gt;

&lt;p&gt;One of the best things about technical writing is that it has a low entry barrier and is also a low-friction activity. You can start a website like this and begin publishing articles right away.&lt;/p&gt;

&lt;p&gt;You can write about the projects you're working on, the technologies and concepts you're learning, or the challenges you're facing as an engineer. The idea is to start writing and keep writing consistently. As you write more, you'll naturally improve your writing skills and find your voice.&lt;/p&gt;

&lt;p&gt;Here are a few tips to help you get started:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Pick a domain: The first step is buying a domain. By having a personal domain, you maintain complete ownership and control over your content, reap the full SEO benefits of your work, and build and promote your brand.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Choose a platform: There are many platforms available for starting a website or blog, such as WordPress, Medium, GitHub Pages, and Ghost, to name just a few. Or you can even build a custom site. Pick one that suits your needs and allows you to use your personal domain.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Personally, I have used Ghost for a while, and it's one of the best solutions for a personal site. I wrote about &lt;a href="https://catalins.tech/ghost-on-digitalocean-droplet/" rel="noopener noreferrer"&gt;how to get started with Ghost by self-hosting it on DigitalOcean&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Identify your topics: List topics you're passionate about or have experience with. These could be specific technologies, programming languages, tools, or even soft skills related to your career in tech. You can write about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your learnings. Did you learn something new? Write about it.&lt;/li&gt;
&lt;li&gt;Your expertise. Are you an expert in a specific area? Write about it.&lt;/li&gt;
&lt;li&gt;The issues you solve. Did you solve an issue? Write about it.&lt;/li&gt;
&lt;li&gt;Your experiences. Have you gone through an interview, got a job, or got promoted? Write about it.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Write, edit, and publish: Set aside dedicated time for writing. Start writing, and don't worry about anything else. Your main priority is to dump the ideas from your brain. Then, revise and edit your article until you're satisfied with the content. Finally, hit the publish button.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;It's important to remember that technical writing is a skill that improves with practice. The more you write, the better you'll become at writing. As you consistently publish articles, you'll build a valuable portfolio that showcases your technical writing skills.&lt;/p&gt;

&lt;p&gt;Regularly writing about technical topics will deepen your understanding of those topics. The process of researching, organizing, and articulating your ideas will reinforce your knowledge and help you identify and fill knowledge gaps.&lt;/p&gt;

&lt;p&gt;In addition to that, it will also improve your communication abilities. As you practice conveying and breaking down complex concepts, you'll become more effective at communication, which is an underrated and valuable skill in the tech industry.&lt;/p&gt;

&lt;p&gt;Lastly, a portfolio of technical articles can open doors to new opportunities. Your writing serves as concrete examples of your abilities and expertise. Potential employers or clients can discover your work and understand the value you can bring. Your articles can also establish you as a thought leader in your field, attracting invitations to speak at conferences or contribute to publications.&lt;/p&gt;

&lt;p&gt;The benefits you reap from technical writing will compound over time, propelling your career forward and opening up new opportunities.&lt;/p&gt;

&lt;p&gt;If you want to explore technical writing more in-depth, I recently released a &lt;a href="https://technicalwriting.online/?utm_source=techwritingjourney" rel="noopener noreferrer"&gt;technical writing course for developers&lt;/a&gt;. This course teaches you the technical writing basics, including how to structure your writing effectively, use appropriate language and tone, and incorporate visuals to enhance your message. You'll also learn various techniques for generating unlimited content ideas and establishing a solid reputation by publishing your content on high-quality, high-authority platforms and gaining exposure and credibility. But that's not all. The course explores many more topics, such as making money with technical writing and translating your articles into videos, to name a few.&lt;/p&gt;

&lt;p&gt;You may say, "Did I read until now just to have you sell me a course?". The answer is no. I've been writing about &lt;a href="https://catalins.tech/tag/technical-writing/" rel="noopener noreferrer"&gt;technical writing&lt;/a&gt; and &lt;a href="https://catalins.tech/tag/blogging/" rel="noopener noreferrer"&gt;blogging&lt;/a&gt; long &lt;a href="https://gitnation.com/contents/catalin-pit-each-time-i-learn-something-new-i-write-an-article-about-it?ref=catalins.tech" rel="noopener noreferrer"&gt;before having a course&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>writing</category>
      <category>career</category>
      <category>programming</category>
    </item>
    <item>
      <title>What you can learn from my 2023</title>
      <dc:creator>Catalin Pit</dc:creator>
      <pubDate>Fri, 29 Dec 2023 07:21:50 +0000</pubDate>
      <link>https://dev.to/catalinpit/what-you-can-learn-from-my-2023-bc8</link>
      <guid>https://dev.to/catalinpit/what-you-can-learn-from-my-2023-bc8</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/yTOzUKiA6vY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;When we plan for the future, we always prepare and hope for the best scenario. We never think about what could go wrong, so we never prepare for that.&lt;/p&gt;

&lt;p&gt;At the end of each year, we spend our time and energy setting grandiose objectives for the new year. We believe that in the next year, we'll be somehow different and achieve all our goals.&lt;/p&gt;

&lt;p&gt;And in December 2022, I did precisely that. I set objectives for 2023 and planned to do lots of big things. "2023 will be my year" - I told myself. And that's what you probably told yourself as well.&lt;/p&gt;

&lt;p&gt;But that's not how life works, and 2023 drove that point home. This year was a damn roller coaster!&lt;/p&gt;

&lt;p&gt;So, in this post, I'll talk about my turbulent 2023 and:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the main events from the year&lt;/li&gt;
&lt;li&gt;how things turned around&lt;/li&gt;
&lt;li&gt;what I learned&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Read it through to the end because I guarantee that it will entertain you, at the very least. At best, it motivates you to face life's difficulties and pursue your goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting the year with a bang
&lt;/h2&gt;

&lt;p&gt;2023 didn't take long to show me the first glimpse of what it would bring. &lt;/p&gt;

&lt;p&gt;It only took one month. In February, I received the dreaded message from my then-manager - "we need to talk," and a meeting was scheduled in my calendar. For some reason, I knew what was coming. Seeing the news in tech and some things that happened in the company, I felt it.&lt;/p&gt;

&lt;p&gt;And I was right about it. I was laid off right then and there. After that meeting, all my access and permissions were revoked. I was jobless.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Ftrmb40imroowh8ova55g.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.amazonaws.com%2Fuploads%2Farticles%2Ftrmb40imroowh8ova55g.png" alt="termination.png" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I felt a mix of emotions - relief and anxiety. &lt;/p&gt;

&lt;p&gt;I was relieved because I wanted to transition from DevRel to an engineering role anyway. But I didn't have the courage to take the leap.&lt;/p&gt;

&lt;p&gt;Anxiety because that means no income with a dependent family and 6 months' worth of savings. It was also my first time being laid off, and this situation made me super anxious with the uncertainty that came with it.&lt;/p&gt;

&lt;p&gt;However, looking back at the situation, I'm glad it happened the way it happened. I learned many things, which also resulted in me getting back into software development. But more on that later.&lt;/p&gt;

&lt;p&gt;Anyway, the year continued to go from bad to worse. My health anxiety came back in full force, among other things that happened. But I'll keep those private.&lt;/p&gt;

&lt;p&gt;By the start of the spring, I had no job, and my health had deteriorated. That is no good combo.&lt;/p&gt;

&lt;h2&gt;
  
  
  The turnaround
&lt;/h2&gt;

&lt;p&gt;Up to this point, you saw the "&lt;strong&gt;shit&lt;/strong&gt;astic" part of my 2023. But, thankfully, there is also the "shit*&lt;em&gt;astic&lt;/em&gt;*" part because things turned around wonderfully.&lt;/p&gt;

&lt;p&gt;As I mentioned, I wanted to make a change and transition back to an engineering role. After 2 years and a bit in DevRel, it was super tricky. I only received DevRel offers because companies were not keen on taking chances on someone who was out for such a long time.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;👀
I wrote a post about &amp;lt;a href="https://catalins.tech/why-i-switched-back-from-devrel-to-engineering/"&amp;gt;why I switched back from DevRel to Engineering&amp;lt;/a&amp;gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;So, I knew I had to do something different and get out of my comfort zone. That's when I decided to volunteer as a developer. Thankfully, there was an opportunity that doesn't come often.&lt;/p&gt;

&lt;p&gt;My good friend, &lt;a href="https://x.com/florinpop1705" rel="noopener noreferrer"&gt;Florin&lt;/a&gt;, is the founder of &lt;a href="http://drp.li/icodethis" rel="noopener noreferrer"&gt;iCodeThis&lt;/a&gt;, a platform for people to learn coding or improve their existing skills.&lt;/p&gt;

&lt;p&gt;Since it was a new company, I knew they would need all the help possible. But I also knew there was no way they could pay me. First because of my salary expectations and second because they weren't making money at that point.&lt;/p&gt;

&lt;p&gt;Then I thought - what if I ask them to allow me to contribute to the platform? It's a win-win situation. They get free work, and I get to practice and gain experience in a real-world company environment.&lt;/p&gt;

&lt;p&gt;Thankfully, Florin and the rest of the team accepted, and I started the "job". Even though I wasn't employed, I treated it like my full-time job. I knew it was an opportunity I couldn't miss or screw. My future depended on it, more or less (no exaggeration).&lt;/p&gt;

&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%2Fcatalins.tech%2Fcontent%2Fimages%2F2023%2F12%2Ficodethis-contribution.webp" 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%2Fcatalins.tech%2Fcontent%2Fimages%2F2023%2F12%2Ficodethis-contribution.webp" alt="A screenshot showing my first contribution for iCodeThis on GitHub" width="800" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On 15 March, I opened my first pull request for iCodeThis. I continued volunteering until the beginning of September when I started my job as a full-stack developer at &lt;a href="https://documen.so/sign" rel="noopener noreferrer"&gt;Documenso&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If it weren't for iCodeThis, I wouldn't be here or have the job at Documenso. I improved my technical skills in 8 months, more than in the past 2 and a half years. That experience allowed me to revive my passion for coding and get my developer career back on track.&lt;/p&gt;

&lt;p&gt;In the end, getting laid off led here, so I'm glad everything happened the way it happened.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about the other problems?
&lt;/h3&gt;

&lt;p&gt;Besides getting a developer job, I managed to solve most of my problems. Most notably, I learned a lot about managing my anxiety and got it under control.&lt;/p&gt;

&lt;p&gt;We could say that I managed to turn things around 180 degrees.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⚠️
If you deal with any type of problems, especially mental health ones, I strongly advise you to seek professional help. 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Not Only Doom and Gloom
&lt;/h2&gt;

&lt;p&gt;Although unpleasant events happened in my life, this period was also great. It allowed me to spend more time with my family, relax, and try different things and ventures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Content Creation
&lt;/h3&gt;

&lt;p&gt;One such example is content creation.&lt;/p&gt;

&lt;p&gt;Ever since I started creating content on the internet, I wanted to become a full-time creator. I imagined it would allow me to have the perfect life - make good money, work on my own terms, and so on. &lt;/p&gt;

&lt;p&gt;However, I quickly learned during this period that being a full-time creator is not for me. At least, not at this stage in my life. For one, relying on income from sponsored content didn't feel right. I'm no hypocrite and do sponsorships, especially for companies and products I like. However, depending on these sponsorships for my livelihood and potentially being forced to do them so I could put food on the table wasn't very appealing to me.&lt;/p&gt;

&lt;p&gt;Besides that, I still need to get more experience as a developer and content creator before I can do it full-time. Although, I don't want to do it anymore in the foreseeable future.&lt;/p&gt;

&lt;h3&gt;
  
  
  Time Off
&lt;/h3&gt;

&lt;p&gt;These 8 months without a job allowed me to take a much-needed break from full-time commitments. I welcomed it with open hands because my past years were all about grinding after work to build my &lt;a href="https://drp.li/yt-channel" rel="noopener noreferrer"&gt;YouTube channel&lt;/a&gt;, &lt;a href="https://drp.li/my-blog" rel="noopener noreferrer"&gt;my blog&lt;/a&gt;, and my &lt;a href="https://drp.li/x" rel="noopener noreferrer"&gt;social media profile&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Even better, I was able to spend a lot of time with my wife and travel to different places. We could never do that since I always worked full-time and was grinding to build side things.&lt;/p&gt;

&lt;p&gt;In hindsight, this period of 8 months without full-time commitments really did me well. As I said, it allowed me to relax, spend time with my wife, and try different venues. &lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learnt
&lt;/h2&gt;

&lt;p&gt;The most important thing I learned during this period is that both good and bad periods eventually pass. Knowing that, it helps me to stay grounded when going through either period - don't get cocky when things go well, and don't despair when going through a rough period.&lt;/p&gt;

&lt;p&gt;I also learned that your dreams don't always translate well to reality. I always wanted to be a full-time content creator. But after I tried it this year, I decided it was not what I wanted to do. At least for the time being. I still have a lot of skills to improve and learn before jumping to full-time content creation again.&lt;/p&gt;

&lt;p&gt;Losing my job also opened my eyes to the privilege and blessings I had. I always appreciated what I had, but I was also a bit superficial at the same time. Maybe you could even say I was feeling a bit entitled. However, getting laid off woke me up to the reality. And I'm forever grateful for that. I'm now 100% thankful for everything I have - my job, opportunities, and so on - and I'm making the most of every opportunity.&lt;/p&gt;

&lt;p&gt;Having all this free time also allowed me to work on myself as a person as well. I had the opportunity to work on my health anxiety and learn ways to manage it and keep it under control.&lt;/p&gt;

&lt;p&gt;Lastly, this experience taught me that events might feel disastrous initially, but they can be a blessing in disguise. Losing a job while having a family depending on you surely doesn't feel like a blessing. But looking back, it was one big blessing because it allowed me to jump back to the field I love - engineering. If I hadn't lost my job, I don't know if I would have had the guts to transition back.&lt;/p&gt;

&lt;p&gt;I would say that I learned important lessons the hard way this year. What looked like a disastrous year in the beginning turned out to be a great year.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I've said anything that needs to be said in the post. But if there are 2 things that I'd like you to remember from this post, are these:&lt;/p&gt;

&lt;p&gt;1) All periods pass eventually - both the good and bad ones.&lt;br&gt;
2) Things can look ugly at first, but they can turn out to be good for you.&lt;/p&gt;

&lt;p&gt;Keep them in mind!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you enjoyed this post, &lt;a href="https://catalins.tech/newsletter/" rel="noopener noreferrer"&gt;subscribe to the blog&lt;/a&gt; to receive the articles straight to your inbox.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>developer</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Build A Stunning Generative AI App with a React IDE</title>
      <dc:creator>Catalin Pit</dc:creator>
      <pubDate>Mon, 20 Nov 2023 09:04:36 +0000</pubDate>
      <link>https://dev.to/catalinpit/build-a-stunning-generative-ai-app-with-a-react-ide-3n1e</link>
      <guid>https://dev.to/catalinpit/build-a-stunning-generative-ai-app-with-a-react-ide-3n1e</guid>
      <description>&lt;p&gt;If you've ever wondered how AI applications generate images from user prompts, you've come to the right place.&lt;/p&gt;

&lt;p&gt;In this article, you will learn how these tools work by building an AI application to generate images.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create the application
&lt;/h2&gt;

&lt;p&gt;We'll start by creating a React + TypeScript application using Vite. Run the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm create vite@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll then have to answer three questions so Vite understands how to configure your project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✔ Project name: aimages
✔ Select a framework: › React
✔ Select a variant: › TypeScript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lastly, you need to install and configure TailwindCSS. &lt;/p&gt;

&lt;p&gt;Run the 2 commands below (in that order). The first command installs &lt;code&gt;tailwindcss&lt;/code&gt; and its peer dependencies. The second command generates the &lt;code&gt;tailwind.config.js&lt;/code&gt; and &lt;code&gt;postcss.config.js&lt;/code&gt; files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -D tailwindcss postcss autoprefixer

npx tailwindcss init -p
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now open the &lt;code&gt;tailwind.config.js&lt;/code&gt; file and modify the code as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/** @type {import('tailwindcss').Config} */
export default {
  content: [
    "./index.html",
    "./src/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code configures TailwindCSS, specifying which files the framework should scan for class usage. It's set to check the &lt;code&gt;index.html&lt;/code&gt; file and any JavaScript or TypeScript files in the &lt;code&gt;src&lt;/code&gt; directory. It also lets you customize the theme, colors, fonts, and many other things.&lt;/p&gt;

&lt;p&gt;Lastly, open &lt;code&gt;/src/styles.css&lt;/code&gt; and add the TailwindCSS directives at the top of the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@tailwind base;
@tailwind components;
@tailwind utilities;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You're done with the project configuration! Now, upload the project on GitHub before proceeding to the next stage. You'll see later why!&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with building user interfaces
&lt;/h2&gt;

&lt;p&gt;Before going further, let's highlight the main issues with building user interfaces.&lt;/p&gt;

&lt;p&gt;One of the main issues with building user interfaces is that you don't have live visual feedback when building them. You make the changes in your editor, save them, and preview them in the browser. Then, if you're not happy with the changes, you have to repeat the process.&lt;/p&gt;

&lt;p&gt;That results in a lot of switching between the IDE and the browser. While it might seem like a minor inconvenience, those seconds of waiting for the browser to refresh, plus the mental shift required, add up over time. Over the course of a day, this switching results in a substantial amount of wasted time.&lt;/p&gt;

&lt;p&gt;It also results in a break of flow. Every disruption (like switching between applications) breaks the flow, leading to longer task completion times and possibly more errors.&lt;/p&gt;

&lt;p&gt;On top of that, collaborating with others can be tedious and time-consuming. The usual way of collaborating involves working on the app, pushing the changes to GitHub, and deploying them. Only after that can the other collaborators check your work. That results in a substantial amount of time lost on unproductive things, such as waiting for the changes to deploy. So, the traditional approach can be quite cumbersome and inefficient.&lt;/p&gt;

&lt;p&gt;In this article, you'll see a complementary tool you can use with your favorite IDE to build user interfaces better and faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  A visual React IDE
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://codux.hopp.to/catalin" rel="noopener noreferrer"&gt;Codux&lt;/a&gt; is a free visual IDE for React + TypeScript applications. It enables you to work on the projects in real-time through a visual editor. All the changes you make to the component's properties, styles, and structure (JSX) are reflected automatically on the screen.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Important mention: Codux is &lt;strong&gt;not meant to replace&lt;/strong&gt; your favourite IDE. It's a complementary tool that you can use alongside your IDE.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can build and modify your interfaces using the panels and controllers provided by Codux. As the image shows, you can set CSS properties &amp;amp; classes and different element states, for example.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F5tbw9p7nifpt9kms7xnf.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.amazonaws.com%2Fuploads%2Farticles%2F5tbw9p7nifpt9kms7xnf.png" alt="Codux Interface" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And, of course, you also have the code editor at the bottom if you want to make specific changes by writing code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Whether you make the changes using the visual editor, the built-in code editor, or your usual IDE, they will always be in sync!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Codux also supports all the popular styling solutions such as CSS, Sass, CSS/Sass modules, Stylable, and TailwindCSS. The application we're building uses TailwindCSS, for example.&lt;/p&gt;

&lt;h3&gt;
  
  
  Component playground
&lt;/h3&gt;

&lt;p&gt;Another cool feature of Codux is the playground feature that enables you to share your work (components) with others.&lt;/p&gt;

&lt;p&gt;In the playground mode, people can view and edit your components without setting up a local development environment and the other prerequisites.&lt;/p&gt;

&lt;p&gt;Let's see it in action. At the beginning of the article, I mentioned that you must upload the project on GitHub. The reason is that the Playground requires your project to be hosted on GitHub.&lt;/p&gt;

&lt;p&gt;To share your board (or component), click the "Share" button on the right.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Mention: The shared board is public, which means anyone with the link can see it. Be careful.&lt;/em&gt;&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fe2pq1n40hoklj5f6aa6o.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fe2pq1n40hoklj5f6aa6o.jpg" alt="Share Project Codux" width="800" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Codux will then ask you to create a link name for the board. Choose a name and click the button "Create Link" (the first time you do it) and "Publish" (afterwards).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Mention: Each time you make a change, you need to click the "Update Link" button before sharing the board. Otherwise, your changes won't be applied &amp;amp; visible on the shared board.&lt;/em&gt;&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F2pj1iwbbepmeytki8zg8.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F2pj1iwbbepmeytki8zg8.jpg" alt="Share Project Codux - Customize Sharing Link" width="800" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can now copy the link and share it with other people. When they access the link, they'll see the online version of Codux (see the picture below).&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fftha98ytx61u7jg60km7.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fftha98ytx61u7jg60km7.jpg" alt="Shared Project Codux" width="800" height="599"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anyone with the link to the shared board can see it and make changes, including the text, colors, images, and even the code. That makes it an ideal tool for collaborating, where everyone can share &amp;amp; apply their feedback in a simple and direct way.&lt;/p&gt;

&lt;p&gt;This way, developers can focus on the work that matters rather than wasting valuable time pushing and pulling changes to/from each other.&lt;/p&gt;

&lt;p&gt;It's important to mention, though, that the changes on the shared board don't affect the original board and won't be applied to it. That would be a cool feature, though!&lt;/p&gt;

&lt;h2&gt;
  
  
  Add the project to Codux
&lt;/h2&gt;

&lt;p&gt;Let's continue by importing the project we created earlier into Codux. Click on the "Open Local Project" option and select the project folder.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fqzewxxiejs1jcyrwv9k3.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.amazonaws.com%2Fuploads%2Farticles%2Fqzewxxiejs1jcyrwv9k3.png" alt="Import a local project in Codux" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, Codux prompts you to run the configuration scripts, which install the required package to work on the project in this IDE.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fgfxxda7j6v5uqzhazz83.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.amazonaws.com%2Fuploads%2Farticles%2Fgfxxda7j6v5uqzhazz83.png" alt="Run the configuration scripts for a newly imported project in Codux" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the installation is done, click "Scan for components" so Codux imports all the components.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Figpqklqqv2r49wq9o3fs.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.amazonaws.com%2Fuploads%2Farticles%2Figpqklqqv2r49wq9o3fs.png" alt="Scan for the project components" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you can see all the available components in the sidebar. In our case, we only have one - App - since it's a new project.&lt;/p&gt;

&lt;p&gt;You can create new components by clicking the "+ New Component" button, but more on that later.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F7ydv78hot30mkgi0gzmu.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.amazonaws.com%2Fuploads%2Farticles%2F7ydv78hot30mkgi0gzmu.png" alt="Components page in Codux" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you might've observed, there are "components" and "boards". A "Board" is a concept introduced by Codux, and it represents a fixture for your components so that Codux can automatically render it and allow you to edit it visually.&lt;/p&gt;

&lt;p&gt;To create a "board", click on the component and then click the button "+ Create Board". That'll open a menu where you can set the starting point, the board name, and the board path.&lt;/p&gt;

&lt;p&gt;You can leave the default options and click "Create".&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fgx60cpr0sxf9cvjyf96s.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.amazonaws.com%2Fuploads%2Farticles%2Fgx60cpr0sxf9cvjyf96s.png" alt="Create a board based on a component in Codux" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this is the board view, where you can edit the components visually.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F9pd4m1g9f2rgdu8kk6ke.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.amazonaws.com%2Fuploads%2Farticles%2F9pd4m1g9f2rgdu8kk6ke.png" alt="The board view in Codux" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure TailwindCSS
&lt;/h2&gt;

&lt;p&gt;For TailwindCSS to work in Codux, you need to perform some customizations in addition to the Tailwind setup process you did at the beginning of the article.&lt;/p&gt;

&lt;p&gt;Create the &lt;code&gt;codux.config.js&lt;/code&gt; in the root folder of the project, and add the following object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"$schema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://wixplosives.github.io/codux-config-schema/codux.config.schema.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"boardGlobalSetup"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./src/_codux/board-global-setup.ts"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, create the &lt;code&gt;board-global-setup.ts&lt;/code&gt; in the &lt;code&gt;./src/_codux&lt;/code&gt; folder and add the following import:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../index.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Done! Now, you can see the TailwindCSS classes in the Codux IDE.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For more information about this configuration, check this &lt;a href="https://help.codux.com/kb/en/article/using-tailwind-css-with-codux#1.-configure-codux.config.json" rel="noopener noreferrer"&gt;link&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Build the app
&lt;/h2&gt;

&lt;p&gt;In the following sections, we'll start building the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create the &lt;code&gt;components&lt;/code&gt; folder
&lt;/h3&gt;

&lt;p&gt;Let's start by creating a &lt;code&gt;component&lt;/code&gt; folder for all the components. You can either do it from your IDE, terminal, or Codux. This is how you can do it from Codux:&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fsweas0yyw06h5u64mvvq.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.amazonaws.com%2Fuploads%2Farticles%2Fsweas0yyw06h5u64mvvq.png" alt="Create components in Codux" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click the highlighted icon to see the project files. After that, create the folder as you would create it on your machine. Right-click on the &lt;code&gt;src&lt;/code&gt; folder and click &lt;code&gt;New Folder&lt;/code&gt;.&lt;/p&gt;

&lt;h5&gt;
  
  
  Creating components from Codux
&lt;/h5&gt;

&lt;p&gt;If you want to create components using the interactive process from Codux, you need to set the components path. You can do that by adding this code in &lt;code&gt;codux.config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"$schema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://wixplosives.github.io/codux-config-schema/codux.config.schema.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"boardGlobalSetup"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./src/_codux/board-global-setup.ts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"newComponent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"componentsPath"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"src/components"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you can create components using the visual interface.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layout component
&lt;/h3&gt;

&lt;p&gt;Create the &lt;code&gt;Layout&lt;/code&gt; component in the &lt;code&gt;components&lt;/code&gt; folder. We'll use the layout on all the pages.&lt;/p&gt;

&lt;p&gt;You can follow the next steps using your usual IDE or Codux.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Tip 💡: You're fine either way because the code is automatically in sync between the two. Whether you use Codux or your editor, both will contain the same code without you having to do anything. That's neat!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now open the &lt;code&gt;Layout&lt;/code&gt; component and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;LayoutProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;children&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ReactNode&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Layout&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;LayoutProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;main&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;main&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Refactor &lt;code&gt;App.tsx&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Then go to the &lt;code&gt;App.tsx&lt;/code&gt; file and replace the content with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Layout&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./components/Layout&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./App.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;inputValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setInputValue&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;imageURL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setImageURL&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fetchImage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;http://localhost:3000/api/genimg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unexpected server response&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;statusText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;onInputChange&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ChangeEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLTextAreaElement&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;setInputValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleSubmit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;FormEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLFormElement&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputValue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nf"&gt;setImageURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;An unexpected error occurred&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Layout&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;section&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;PromptPix AI&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                Dive into the world of AI-driven creativity with PromptPix AI,
                where your words become vivid visuals. Simply input your idea,
                and watch as our advanced algorithms craft the image you
                envisioned.
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;form&lt;/span&gt; &lt;span class="na"&gt;onSubmit&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleSubmit&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt; &lt;span class="na"&gt;htmlFor&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"prompt"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Image prompt&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;label&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;textarea&lt;/span&gt;
                  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"prompt"&lt;/span&gt;
                  &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Enter your prompt"&lt;/span&gt;
                  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;inputValue&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                  &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;onInputChange&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;disabled&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;inputValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                Generate
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;form&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Your image is being generated...&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;
                        &lt;span class="na"&gt;xmlns&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt;
                        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"44"&lt;/span&gt;
                        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"44"&lt;/span&gt;
                        &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;
                        &lt;span class="na"&gt;strokeWidth&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;
                        &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;
                        &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
                        &lt;span class="na"&gt;strokeLinecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
                        &lt;span class="na"&gt;strokeLinejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;
                          &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
                          &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M0 0h24v24H0z"&lt;/span&gt;
                          &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M12 6l0 -3"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M16.25 7.75l2.15 -2.15"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M18 12l3 0"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M16.25 16.25l2.15 2.15"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M12 18l0 3"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M7.75 16.25l-2.15 2.15"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M6 12l-3 0"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M7.75 7.75l-2.15 -2.15"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

            &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;imageURL&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Find your generated image below&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt;
                  &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;imageURL&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                  &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                  &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
                  &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Generated image"&lt;/span&gt;
                &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

            &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;imageURL&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Your image will appear below&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;
                        &lt;span class="na"&gt;xmlns&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt;
                        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"44"&lt;/span&gt;
                        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"44"&lt;/span&gt;
                        &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;
                        &lt;span class="na"&gt;strokeWidth&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;
                        &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;
                        &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
                        &lt;span class="na"&gt;strokeLinecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
                        &lt;span class="na"&gt;strokeLinejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;
                          &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
                          &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M0 0h24v24H0z"&lt;/span&gt;
                          &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M15 8h.01"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M11.5 21h-5.5a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v5.5"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M20.2 20.2l1.8 1.8"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l2 2"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

            &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;section&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Layout&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This component contains the barebone application without any style applied.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fcpidy2jcyhwjpxz77n4n.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.amazonaws.com%2Fuploads%2Farticles%2Fcpidy2jcyhwjpxz77n4n.png" alt="The app preview in Codux" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Everything is in the &lt;code&gt;App&lt;/code&gt; file for illustrative purposes. It's easier to showcase the tool this way. You'll see the final application on GitHub.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Style the app with Codux
&lt;/h3&gt;

&lt;p&gt;Let's start by styling the &lt;code&gt;Layout&lt;/code&gt; component first. Double click &lt;code&gt;App&lt;/code&gt; in the &lt;code&gt;Elements&lt;/code&gt; tab (left-hand side column).&lt;/p&gt;

&lt;p&gt;That opens a new tree, where you should see the &lt;code&gt;Layout&lt;/code&gt; component. Double click on &lt;code&gt;Layout&lt;/code&gt;, and then select &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Elements&lt;/code&gt; tab shows you all the HTML elements from your code.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fjuj48c82av3a5bvb005d.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.amazonaws.com%2Fuploads%2Farticles%2Fjuj48c82av3a5bvb005d.png" alt="Main div" width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To add Tailwind classes to HTML elements, click the "Properties" icon from the right-hand side. Then, search for the "className" property.&lt;/p&gt;

&lt;p&gt;Once there, add the following Tailwind classes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flex min-h-screen flex-col justify-center items-center
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These classes set up a flex container with a minimum height equal to the viewport height, arrange its children in a column, and center them vertically and horizontally within the container.&lt;/p&gt;

&lt;p&gt;You should see the changes reflected immediately, both visually and in the code.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fy1mi4qbzy8ydxurc6c4m.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.amazonaws.com%2Fuploads%2Farticles%2Fy1mi4qbzy8ydxurc6c4m.png" alt="Applying Tailwind classes in Codux" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pretty cool, right?&lt;/p&gt;

&lt;p&gt;Now, let's switch to your favorite IDE to see how easy it is to use them together. Open the &lt;code&gt;index.css&lt;/code&gt; file and add this block:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="err"&gt;@apply&lt;/span&gt; &lt;span class="err"&gt;bg-gray-50;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  App component
&lt;/h3&gt;

&lt;p&gt;Continue by adding the following classes to the &lt;code&gt;section&lt;/code&gt; element from the &lt;code&gt;App&lt;/code&gt; component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;container flex flex-col gap-6 py-8 md:max-w-[64rem] md:py-12 lg:py-24
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These classes modify the section to be a flexible container with column direction, vertical gap between child elements of 6 units, vertical padding of 8 units (increased to 12 units on medium screens and 24 units on large screens), and a maximum width of 64rem on medium and larger screens.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fii3niyrebvvl2jaujq3u.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.amazonaws.com%2Fuploads%2Farticles%2Fii3niyrebvvl2jaujq3u.png" alt="Applying Tailwind classes in Codux" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, apply the following classes to the first &lt;code&gt;div&lt;/code&gt; element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bg-white shadow-md rounded border border-slate-200 p-14 text-center
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These TailwindCSS utility classes apply a white background, a medium shadow, rounded corners, a slate-colored border, padding on all sides of 14 units, and center-aligned text.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fcy8y3s8mzhh5ws6ktx26.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.amazonaws.com%2Fuploads%2Farticles%2Fcy8y3s8mzhh5ws6ktx26.png" alt="Applying Tailwind classes in Codux" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how the application looks up to this point.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F4t3iehb7iazlw7xjhpky.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.amazonaws.com%2Fuploads%2Farticles%2F4t3iehb7iazlw7xjhpky.png" alt="A screenshot of the Vite + React + TypeScript app built with Codux" width="800" height="582"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next steps are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stylize the heading + description&lt;/li&gt;
&lt;li&gt;stylize the form&lt;/li&gt;
&lt;li&gt;stylize the part where the image will appear&lt;/li&gt;
&lt;li&gt;create the API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's style the heading and description through your IDE (VS Code, in my case) to see the auto-sync in action.&lt;/p&gt;

&lt;p&gt;Replace the 2nd &lt;code&gt;div&lt;/code&gt; element with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"mx-auto flex w-full flex-col md:max-w-[58rem]"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"font-heading text-2xl mb-4 sm:text-4xl text-center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      PromptPix AI
   &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-sm sm:text-base text-center mb-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      Dive into the world of AI-driven creativity with PromptPix AI,
      where your words become vivid visuals. Simply input your idea,
      and watch as our advanced algorithms craft the image you
      envisioned.
   &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The screenshot below illustrates how your code should look: &lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F45helzyz24zvtzkvfw58.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.amazonaws.com%2Fuploads%2Farticles%2F45helzyz24zvtzkvfw58.png" alt="Cursor.sh screenshot of the code built with Codux" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you navigate back to Codux, you will see the changes applied in the visual area and the code editor from the bottom of the page.&lt;/p&gt;

&lt;p&gt;Similarly, all the changes made in Codux are available in your IDE.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Ftqxzr5485q5qfp2ejrf2.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.amazonaws.com%2Fuploads%2Farticles%2Ftqxzr5485q5qfp2ejrf2.png" alt="Codux screenshot" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As an exercise, add the following classes to these elements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;form&lt;/code&gt; element - &lt;code&gt;space-y-6&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;div&lt;/code&gt; element inside the form - &lt;code&gt;flex flex-col items-center gap-4&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;label&lt;/code&gt; element - &lt;code&gt;text-sm sm:text-base&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;textarea&lt;/code&gt; element - &lt;code&gt;border border-slate-200 rounded p-2 w-3/4 h-32 resize-none&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;button&lt;/code&gt; element:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`${
inputValue.length === 0
? "bg-white text-gray-800 font-semibold py-2 px-4 border border-slate-400 rounded shadow opacity-50 hover:opacity-50 cursor-not-allowed"
: "bg-white hover:bg-slate-100 text-gray-800 font-semibold py-2 px-4 border border-slate-400 rounded shadow"
}`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is how the application looks like with all the above classes applied:&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fcpoj8jv6l5spz6owx2k1.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.amazonaws.com%2Fuploads%2Farticles%2Fcpoj8jv6l5spz6owx2k1.png" alt="Screenshot of Codux running React, TypeScript and TailwindCSS" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looks pretty good already, right?&lt;/p&gt;

&lt;p&gt;The last step involves styling the part where the generated image will appear. We'll make the initial &lt;code&gt;div&lt;/code&gt; element (that's displayed before entering any prompt) a flex container with its children arranged in a column, centered horizontally, with a gap of 24px between each child and a top margin of 48px - &lt;code&gt;flex flex-col items-center gap-6 mt-12&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can add them as usual using the "className" field from Codux.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Ff43w9crk6n26eg08b9t1.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.amazonaws.com%2Fuploads%2Farticles%2Ff43w9crk6n26eg08b9t1.png" alt="Codux TailwindCSS classes" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apply the same Tailwind classes to the other 2 &lt;code&gt;div&lt;/code&gt; elements that display the loading state and the generated image.&lt;/p&gt;

&lt;p&gt;Lastly, stylize the &lt;code&gt;error&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{error &amp;amp;&amp;amp; (
&amp;lt;div className="text-center w-1/2 mx-auto bg-red-500 mt-2 rounded border border-red-800"&amp;gt;
   {error}
&amp;lt;/div&amp;gt;
)}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you're done with the user interface!&lt;/p&gt;

&lt;h3&gt;
  
  
  Codux offers much more
&lt;/h3&gt;

&lt;p&gt;In building this application, you mostly applied classes and visualized the results in real-time. However, Codux offers much more.&lt;/p&gt;

&lt;p&gt;With Codux, you can test your application on multiple viewports and make the changes live for each viewport.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F1akf9gnret1fowauu93e.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.amazonaws.com%2Fuploads%2Farticles%2F1akf9gnret1fowauu93e.png" alt="Codux responsiveness feature" width="728" height="1194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Besides that, we added the classes manually for each element. But you can also use the "Computed Styles" tab to stylize the elements. Instead of writing code manually, you can style elements interactively.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fa7bgi1iawe5y5r31g5lo.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.amazonaws.com%2Fuploads%2Farticles%2Fa7bgi1iawe5y5r31g5lo.png" alt="Codux computed styles" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A favorite feature of mine is the ability to open the code for a specific element. You can select the particular element, right-click on it, and open it in the code editor/IDE.&lt;/p&gt;

&lt;p&gt;The image illustrates how Codux highlights the relevant code for the selected element. Neat, right?&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fu50cg17khbwm16tcidrd.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.amazonaws.com%2Fuploads%2Farticles%2Fu50cg17khbwm16tcidrd.png" alt="Open code from Codux" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, there are lots of cool features in Codux. I encourage you to &lt;a href="https://codux.hopp.to/catalin" rel="noopener noreferrer"&gt;download it&lt;/a&gt; and explore it. It's free!&lt;/p&gt;

&lt;p&gt;Some valuable resources to help you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/e7lcUQyIxKM?si=vvT66TjqsclE8jYK" rel="noopener noreferrer"&gt;Build React Apps with Codux Visual IDE for Faster UI Workflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/fly6qAcBxi8" rel="noopener noreferrer"&gt;Learn How to Build a Standout Portfolio Website Using Codux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/_6k9Bqr0I0A" rel="noopener noreferrer"&gt;Craft a Real-Time Weather App From the Ground Up With Codux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/35oplanvybI" rel="noopener noreferrer"&gt;Learn All About Visual Component Styling, Including Class Creation and Shaping State, Variables and Computed Styles&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Backend Code for Generating the Image
&lt;/h2&gt;

&lt;p&gt;You are probably using a different programming language &amp;amp; framework than me. Instead of wasting your time taking you through a painful process of building the backend in a technology you're not interested in, I'll share the code for the API route straightaway.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Replicate&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;replicate&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;cors&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cors&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3030&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;cors&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;options&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/genimg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Pre-flight request. Reply successfully:&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/genimg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;replicate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Replicate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;REPLICATE_API_TOKEN&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;replicate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;stability-ai/stable-diffusion:a00d0b7dcbb9c3fbb34ba87d2d5b46c56969c84a628bf778a7fdaec30b1b99c5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;image_dimensions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1024x1024&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;num_inference_steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;num_outputs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;guideance_scale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;7.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;prompt_strength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;scheduler&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;KarrasDPM&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Failed to generate image. Error:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Failed to generate image&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/genimg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;405&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Method Not Allowed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Server running at http://localhost:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This TypeScript code sets up an Express server that listens on port 3030 and has CORS enabled. It defines three routes, all for the path "/api/genimg". The OPTIONS route is for handling pre-flight CORS requests. The POST route accepts a JSON body with a "value" property, uses it as a prompt to generate an image using the Replicate API, and returns the result. If there's an error during this process, it logs it and returns a 500 status code with a failure message. The ALL route is a catch-all that returns a 405 status code, indicating that the method used is not allowed. The server listens on the specified port and logs a message to the console when it's running.&lt;/p&gt;

&lt;p&gt;This way, you can adapt the code to your programming language &amp;amp; framework of your choice.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: You can check the whole application code (both server and client) by accessing this &lt;a href="https://github.com/catalinpit/aimages" rel="noopener noreferrer"&gt;GitHub link&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  An ending note
&lt;/h2&gt;

&lt;p&gt;Building applications comes with challenges that can slow down the development process and make collaboration difficult. One of the main challenges is the constant need to switch between different tools. That takes up considerable time and can break your concentration and flow. Moreover, collaborating with others is cumbersome, often requiring several steps before others can test your work.&lt;/p&gt;

&lt;p&gt;This is where Codux steps in to make the whole process smoother and more efficient. Codux enables you to visualize changes as you make them without constantly switching between multiple tools. Moreover, it offers a visual user interface that makes it easier to build applications by allowing you to create things with a couple of clicks. But perhaps most importantly, it allows for real-time collaboration, enabling people to work together seamlessly.&lt;/p&gt;

&lt;p&gt;Before closing, I want to mention again that Codux is not here to replace your IDE and other tools you might use. Think of Codux as another tool in your developer toolbox.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The article was originally published on my blog - &lt;a href="https://catalins.tech" rel="noopener noreferrer"&gt;catalins.tech&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>programming</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Why I Switched Back From DevRel to Engineering</title>
      <dc:creator>Catalin Pit</dc:creator>
      <pubDate>Mon, 06 Nov 2023 09:18:23 +0000</pubDate>
      <link>https://dev.to/catalinpit/why-i-switched-back-from-devrel-to-engineering-566f</link>
      <guid>https://dev.to/catalinpit/why-i-switched-back-from-devrel-to-engineering-566f</guid>
      <description>&lt;p&gt;Developer Relations - well-paid &amp;amp; fancy job that involves lots of traveling, speaking at conferences, interacting with developers regularly, and creating content. What's not to like? Why would anyone go back to coding?&lt;/p&gt;

&lt;p&gt;You'll see why in this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  A short note on DevRel
&lt;/h2&gt;

&lt;p&gt;In the last 2 years, I worked in the Developer Relations (DevRel) field as a Developer Advocate (DA).&lt;/p&gt;

&lt;p&gt;I don't think there is an official definition for a "Developer Advocate", but you can think of it as the bridge between the company and the community. A DA represents the company to the community and the community to the company. But that's not all. The DA must balance the interests and needs of both and make sure they are both happy.&lt;/p&gt;

&lt;p&gt;Some of the day-to-day activities of a developer advocate are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;create demo applications to showcase the company's product&lt;/li&gt;
&lt;li&gt;produce written, video, and social media content to educate users about the company's product&lt;/li&gt;
&lt;li&gt;engage with the community&lt;/li&gt;
&lt;li&gt;pass the feedback from the community to the company&lt;/li&gt;
&lt;li&gt;provide support to the community&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are just a couple of examples (rather than an exhaustive list) so you get a brief idea of what a DA might do in a day. Also, there are DA roles focusing on different tasks from that list (DA focusing on video creation, DA focusing on social media management, and so on). It's really challenging and not advisable for one DA to do all those tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  How did I become a Developer Advocate
&lt;/h2&gt;

&lt;p&gt;Now that you briefly understand what a DA is and what it involves, let's talk about how I became one.&lt;/p&gt;

&lt;p&gt;To do that, we need to rewind to the beginning of my developer career. I was preparing to enter the field during my last university year and knew it would be tough. So, I thought of how to differentiate myself from the other candidates.&lt;/p&gt;

&lt;p&gt;One idea that popped into my mind was to start a technical blog. Writing is my biggest passion, and I had (non-technical) blogs since my teenage years. So, it made sense. I decided to write about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;programming concepts and other related stuff I learn&lt;/li&gt;
&lt;li&gt;issues, bugs, and errors I solve&lt;/li&gt;
&lt;li&gt;my existing knowledge&lt;/li&gt;
&lt;li&gt;my experiences&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ok, enough talk about how I started my blog. What has that to do with me being a developer advocate? That blog kickstarted my content creation journey, which got me into DevRel. I went from writing blog articles to creating videos and being active on social media.&lt;/p&gt;

&lt;p&gt;And now, let's dive into why I wanted to switch back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I went back to engineering
&lt;/h2&gt;

&lt;p&gt;A little disclaimer before going further. This article might feel a tad negative because I'm talking only about what I didn't like about DevRel. Working in DevRel can also be great, and many people enjoy it. Also, I will probably work in DevRel again in the future, but my main focus now is growing my engineering skills.&lt;/p&gt;

&lt;p&gt;Lastly, this article is not a dig at the companies I worked at. They were great, and I enjoyed working at both companies. In this article, I talk about what I don't like about DevRel in general.&lt;/p&gt;

&lt;p&gt;With that out of the way, let's continue.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lack of coding
&lt;/h3&gt;

&lt;p&gt;The main reason was the lack of coding. In these 2 years as a DA, I did little to no coding. Even on the rare occasions when I coded, I built super basic applications. &lt;/p&gt;

&lt;p&gt;It still sounds weird to me that, as a DA, you might not code at all. The title literally contains "developer", yet you don't code at all or minimally. Also, how can you relate to developers and advocate for them if you don't code yourself?&lt;/p&gt;

&lt;p&gt;As a result, not only that I wasn't progressing. But even worse, my skills were regressing! The more time I spent in DevRel, the worse my coding skills became.&lt;/p&gt;

&lt;p&gt;I knew that if I didn't do something about it quickly, it would eventually be nearly impossible to transition back to an engineering role.&lt;/p&gt;

&lt;p&gt;It took me 6-7 months, but I  eventually I did it.&lt;/p&gt;

&lt;h3&gt;
  
  
  High demands and no clear expectations
&lt;/h3&gt;

&lt;p&gt;Another important reason was that many companies have high demands and expect one person to do the work of an entire department.&lt;/p&gt;

&lt;p&gt;You'll often see job ads looking for a person who creates videos, who also writes articles, who also manages social media, who also does sales calls, who also travels to conferences, who also manages the community. And the list goes on and on and on.&lt;/p&gt;

&lt;p&gt;That's a lot of work, and whoever takes such a job will most likely end up super burnt out.&lt;/p&gt;

&lt;p&gt;Moreover, most companies don't have clear expectations, personal metrics, and a progression track. You don't know what's expected of you. You don't know how to measure your performance. And lastly, you don't know what are the next career levels and how to reach them.&lt;/p&gt;

&lt;p&gt;For someone like me, who likes clarity, that's too much ambiguity. I prefer clear goals, objects, and a progression ladder.&lt;/p&gt;

&lt;h3&gt;
  
  
  Difficult to measure results
&lt;/h3&gt;

&lt;p&gt;DevRel work is a head-scratcher when measuring its impact. The work done by developer advocates often takes time to show results, and there's no clear formula for measuring success. &lt;/p&gt;

&lt;p&gt;DevRel folks wear many hats, from event organizing to content creation, and it's not like everything contributes equally to the big picture. Plus, the impact is usually visible immediately; it's more about keeping developers happy and loyal, which can be hard to put numbers on. &lt;/p&gt;

&lt;p&gt;As a result, it's complicated to measure its impact.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unfulfilling work
&lt;/h3&gt;

&lt;p&gt;To me, the ideal DevRel role involves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Working on the product as a developer&lt;/li&gt;
&lt;li&gt;Building cool things&lt;/li&gt;
&lt;li&gt;Showcasing that through video &amp;amp; written content&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unfortunately, I spent too much time managing social media accounts, writing listicles, and doing straight marketing.&lt;/p&gt;

&lt;p&gt;While those activities are fine and required in a company, they do not fulfill me. And they are not the activities I envision myself doing as a developer advocate.&lt;/p&gt;

&lt;h3&gt;
  
  
  No future for me
&lt;/h3&gt;

&lt;p&gt;I didn't see a future for myself in this type of role. Whenever I asked myself questions such as "where do I want to be in 5 years as a DA?", "how can I progress in this field?" or "what's the next step for me in DevRel?" I couldn't answer.&lt;/p&gt;

&lt;p&gt;The only 2 questions I could answer were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;do I want to continue in this field? Not in the short-term, because it would mean losing my coding skills altogether.&lt;/li&gt;
&lt;li&gt;what do I want to do next? To work as a software developer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was clear what I wanted, so I worked towards that. And here I am, working as an engineer again.&lt;/p&gt;

&lt;h2&gt;
  
  
  The end
&lt;/h2&gt;

&lt;p&gt;Working in Developer Relations (DevRel) can be a great experience for many people, and my article is not meant to deter you from pursuing a career in DevRel. If I find the appropriate role, I'll probably give it a go in a few years again.&lt;/p&gt;

&lt;p&gt;In my case, the lack of coding was the main reason that led me to switch back to engineering. I realized that I missed building things and that my skills were regressing fast. &lt;/p&gt;

&lt;p&gt;The transition was challenging because my experience led me to receive mostly DevRel job opportunities and little to no engineering positions. Nonetheless, I managed to transition back to a developer role and am now focused on growing my technical skills.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was originally published on my blog &lt;a href="https://catalins.tech" rel="noopener noreferrer"&gt;catalins.tech&lt;/a&gt;. I encourage you to keep an eye on it because that's where I post all my articles.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/x319l8BtCW8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>developer</category>
      <category>career</category>
    </item>
    <item>
      <title>Should New Developers Use AI Coding Tools?</title>
      <dc:creator>Catalin Pit</dc:creator>
      <pubDate>Wed, 02 Aug 2023 11:02:45 +0000</pubDate>
      <link>https://dev.to/catalinpit/should-new-developers-use-ai-coding-tools-2bfc</link>
      <guid>https://dev.to/catalinpit/should-new-developers-use-ai-coding-tools-2bfc</guid>
      <description>&lt;p&gt;AI coding tools like GitHub Copilot, ChatGPT and similar tools took the software development world by storm.&lt;/p&gt;

&lt;p&gt;Some developers love them, some dismiss them, and the rest are neutral.&lt;/p&gt;

&lt;p&gt;Personally, I enjoy using them, and I believe they can help developers of all levels, including new developers. However, there are some things to consider if you are a new developer.&lt;/p&gt;

&lt;p&gt;With this article, I want to answer whether new developers should use AI coding tools and how to make the most of them.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Mention: This article is also useful for experienced developers, but its focus is on people new to software development.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Should new developers use them?
&lt;/h2&gt;

&lt;p&gt;My short answer is yes. Developers should use any tool that makes them faster and better.&lt;/p&gt;

&lt;p&gt;I believe AI coding tools are one example of tools that help developers code faster than ever.&lt;/p&gt;

&lt;p&gt;But there is one crucial mention. These AI tools generate erroneous, incomplete, and inefficient code quite often. Also, they sometimes generate code that looks fine at first sight but has very subtle errors/inefficiencies. If you blindly trust them, you will get into trouble. By trouble, I mean that you will learn the wrong stuff and also build unreliable &amp;amp; insecure applications.&lt;/p&gt;

&lt;p&gt;So, what should you do then?&lt;/p&gt;

&lt;p&gt;Treat these AI tools like you treat any other resource on the internet. Would you copy &amp;amp; paste code from a website and blindly use it without understanding it? Do the same with these AI coding tools. They can be beneficial, but they can also be very dangerous if you misuse them.&lt;/p&gt;

&lt;p&gt;The idea is to use them but with caution.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use AI coding tools
&lt;/h2&gt;

&lt;p&gt;Since these tools were born, people have said they will replace developers.&lt;/p&gt;

&lt;p&gt;My opinion is that they are nowhere near replacing developers. And the more I use them, the more they reinforce that opinion. They're just not good enough to generate correct, efficient code at the moment — at least not complex code.&lt;/p&gt;

&lt;p&gt;But that does not mean they're not excellent tools. They're a great companion for coding.&lt;/p&gt;

&lt;p&gt;For now, they're handy for the following use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;removing the entry barrier &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No more "how to get started" questions. These AI tools are super valuable for giving you ideas on how to get started with a project or tool. Even if they do not generate the correct code, they give you pointers on how to get started.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ChWvlLYqyH0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The above GIF illustrates how &lt;a href="https://drp.li/openai-chatgpt" rel="noopener noreferrer"&gt;ChatGPT&lt;/a&gt; helps you to get started with Zod. It generates both the code and explanations, so you understand what the code does.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;speeding up development by generating boilerplate code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Writing the boilerplate code is one of the most tedious parts of the software development process. Thankfully, AI coding tools can help with that as well.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fbg2s46aqhoy9qn5tgjw0.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.amazonaws.com%2Fuploads%2Farticles%2Fbg2s46aqhoy9qn5tgjw0.png" alt="Cody AI generating boilerplate code" width="800" height="754"&gt;&lt;/a&gt;&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fryp61cfr5w44h26fmguo.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.amazonaws.com%2Fuploads%2Farticles%2Fryp61cfr5w44h26fmguo.png" alt="Cody AI explaining how to use ES module imports" width="800" height="754"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above pictures show &lt;a href="https://drp.li/cody-ai" rel="noopener noreferrer"&gt;Cody AI&lt;/a&gt; generating the boilerplate code for a Node.js and Express application. It also helps you configure the ES module imports in your project.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;finding/solving simple bugs and errors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These AI tools are also helpful for spotting bugs and errors. You can give them the code and ask them to find possible issues with your code. Then you can ask them to solve them but do not expect to get perfect answers. Use the solutions proposed to get an idea of how you could solve the issues.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;re-factoring simple code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also use them to get ideas on how you can refactor and improve your code. Sometimes, they make suggestions that are not obvious to you. It happened many times for me to get ideas from these tools that were not obvious to me.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;generating documentation and tests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's well known (unfortunately) that documentation and tests are not the highest priorities when developing software. With these tools, you can add your code as input and ask them to generate documentation and tests based on your code.&lt;/p&gt;

&lt;p&gt;These are some of the ways you can use AI coding tools to help you with coding. I emphasize again that you should not trust them blindly. Treat them as any other resource - only use the code if you understand it. &lt;/p&gt;

&lt;h2&gt;
  
  
  The AI coding tools I use
&lt;/h2&gt;

&lt;p&gt;At the moment of writing this article, I use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub Copilot&lt;/li&gt;
&lt;li&gt;OpenAI ChatGPT&lt;/li&gt;
&lt;li&gt;Sourcegraph Cody AI&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;We have a community for developers. Join us &lt;a href="https://drp.li/telegram" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;The article &lt;a href="https://catalins.tech/should-developers-use-ai-coding-tools/" rel="noopener noreferrer"&gt;Should New Developers Use AI Coding Tools?&lt;/a&gt; was originally published on my blog.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>developer</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Rethink Full-Stack Development: Is a Custom Backend the Best Choice?</title>
      <dc:creator>Catalin Pit</dc:creator>
      <pubDate>Thu, 22 Jun 2023 12:27:46 +0000</pubDate>
      <link>https://dev.to/catalinpit/rethink-full-stack-development-is-a-custom-backend-the-best-choice-145p</link>
      <guid>https://dev.to/catalinpit/rethink-full-stack-development-is-a-custom-backend-the-best-choice-145p</guid>
      <description>&lt;p&gt;This article covers the conventional way of building full-stack applications and why manually building your backend is not always the best choice. You'll see an alternative solution for your backend needs that can be used standalone or coupled with your custom-built backend.&lt;/p&gt;

&lt;h2&gt;
  
  
  The issues with the traditional backend
&lt;/h2&gt;

&lt;p&gt;The conventional approach to developing full-stack applications involves the tedious and time-consuming process of building the entire application from scratch.&lt;/p&gt;

&lt;p&gt;The backend development requires setting and configuring servers, implementing the business logic, and managing databases. Building and maintaining a complex backend from scratch would take substantial resources. So why reinvent the wheel when you can use an existing solution that you can tailor to your needs with code? But more on that later.&lt;/p&gt;

&lt;p&gt;It's important to mention that a custom-built backend might be the most appropriate solution in specific scenarios. However, in most cases, an existing solution that you can tailor to your needs through code is more than sufficient. It allows you to speed up the development process and move faster by automating the most tedious work. It also frees up resources so you can focus on business-critical tasks. Besides that, you do not need to choose one or the other. You can have the best of both worlds, as you will see later.&lt;/p&gt;

&lt;p&gt;The main pain points are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;complex and lengthy development process&lt;/li&gt;
&lt;li&gt;a substantial amount of resources required&lt;/li&gt;
&lt;li&gt;slow time-to-market&lt;/li&gt;
&lt;li&gt;maintenance required&lt;/li&gt;
&lt;li&gt;scalability and security are difficult&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Headless API solutions
&lt;/h2&gt;

&lt;p&gt;The alternative to custom-built backend applications are the Headless API solutions. A Headless API is an architectural design where the user interface (frontend) is decoupled from the business logic and data storage (backend). The backend exposes the data through an API. The frontend then uses the API to communicate with the backend.&lt;/p&gt;

&lt;p&gt;There are multiple advantages to this approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The obvious one is the &lt;strong&gt;faster development process&lt;/strong&gt;, since you only need to develop and focus on one part of the application - the frontend. The faster development process also enables you to reduce the time required to enter the market, which is essential in such a competitive landscape.&lt;/li&gt;
&lt;li&gt;Since you are using an existing solution for your backend, you &lt;strong&gt;save valuable resources&lt;/strong&gt; (finances and time) that you can use on other tasks that are more critical to the business.&lt;/li&gt;
&lt;li&gt;Another advantage is that you have &lt;strong&gt;complete freedom when choosing&lt;/strong&gt; which &lt;strong&gt;frontend technologies&lt;/strong&gt; to use since the application parts are decoupled.&lt;/li&gt;
&lt;li&gt;The Headless APIs are developed and maintained by teams of developers who focus exclusively on those APIs, which means these solutions might provide &lt;strong&gt;better security and scalability&lt;/strong&gt; than a custom-built solution.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But now you might ask: "Where do I find these APIs?".&lt;/p&gt;

&lt;p&gt;That's where Wix Headless comes into the picture. Wix recently released their Headless APIs, enabling developers to implement Wix's robust business solutions using composable APIs and SDK. You can use them with any tech stack across different platforms and devices. &lt;/p&gt;

&lt;p&gt;Some of the current available Headless APIs are as follows: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bookings - The "bookings" API enables you to integrate booking features into your app. It provides features like scheduling and managing appointments, syncing staff calendars, setting up automated reminders, and more.&lt;/li&gt;
&lt;li&gt;eCommerce - This API allows you to manage orders, inventory, shipping and finances from one central place. It provides secure payments, optimized checkouts and automated sales taxes.&lt;/li&gt;
&lt;li&gt;CMS - The CMS solution offers an API for creating and managing content.&lt;/li&gt;
&lt;li&gt;events - It allows you to build applications for hosting in-person or online events, sell tickets, manage guests, accept secure payments, and more.&lt;/li&gt;
&lt;li&gt;pricing plans - You can use this headless API to create a members-only platform and offer exclusive access.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can check all APIs &lt;a href="https://drp.li/wix-solutions" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It's important to emphasize that you do not need to choose between the Headless APIs and a custom-built backend. Instead, you can have the best of both worlds since the Headless APIs can be integrated with other internal or 3rd party services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Customize the APIs
&lt;/h2&gt;

&lt;p&gt;I do not believe in one-size-fits-all solutions. At one point, you will want to modify or extend the functionality through code. You can do that by using the &lt;a href="https://dev.wix.com/api/sdk/sdk-setup:-wix-headless/get-started" rel="noopener noreferrer"&gt;Wix Headless SDK&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can use the SDK by installing the required packages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@wix/api-client&lt;/code&gt; - the package is required to create the API client and to set up the OAuth. When you create the API client, you must provide the modules you want to use (e.g. the eCommerce Headless API).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@wix/{api-name}&lt;/code&gt; - the &lt;code&gt;api-name&lt;/code&gt; should be replaced with the name of the Headless API you need (e.g. "&lt;a class="mentioned-user" href="https://dev.to/wix"&gt;@wix&lt;/a&gt;/ecom", "&lt;a class="mentioned-user" href="https://dev.to/wix"&gt;@wix&lt;/a&gt;/pricing-plans", "&lt;a class="mentioned-user" href="https://dev.to/wix"&gt;@wix&lt;/a&gt;/bookings" and so on). These packages return the modules you pass to the API client configuration and the ones that allow you to interact with the chosen Headless API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's all you need to interact with the Headless APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Headless API Examples
&lt;/h2&gt;

&lt;p&gt;In this section, you will see various demos and their code. They are basic, and their sole purpose is to illustrate the basic usage of the Headless APIs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Headless CMS
&lt;/h3&gt;

&lt;p&gt;One of the available Headless APIs is the CMS API which provides a user-friendly dashboard for creating and managing content. Let's say we have a landing page for the following APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bookings&lt;/li&gt;
&lt;li&gt;eCommerce&lt;/li&gt;
&lt;li&gt;events &amp;amp; tickets&lt;/li&gt;
&lt;li&gt;subscriptions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The app makes a request to the CMS backend to fetch information such as the title, slug, and description for each Headless API (&lt;em&gt;see them at the bottom of the page&lt;/em&gt;). This is what the landing page looks like:&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F8ith84475d7obbzgyea9.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.amazonaws.com%2Fuploads%2Farticles%2F8ith84475d7obbzgyea9.png" alt="Wix Headless landing page" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here's the code that fetches the data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Link&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;next/link&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Cookies&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;js-cookie&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;OAuthStrategy&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@wix/api-client&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@wix/data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myWixClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;OAuthStrategy&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;clientId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;your-client-id&amp;gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;session&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Examples&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setExamples&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchExamples&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;examples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;myWixClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;queryDataItems&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;dataCollectionId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;examples&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;ascending&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;orderId&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;setExamples&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nf"&gt;fetchExamples&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;footer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;example&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Link&lt;/span&gt; &lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;section&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;-&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/span&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/section&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Link&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="p"&gt;))}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/footer&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first step involves adding all the required imports at the top of the file. The next step is to create and configure the Wix API client. It requires you to specify the modules you want to use (&lt;code&gt;items&lt;/code&gt; from the &lt;code&gt;@wix/data&lt;/code&gt; package in this case) and the &lt;code&gt;clientId&lt;/code&gt; for the &lt;code&gt;OAuth&lt;/code&gt; strategy.&lt;/p&gt;

&lt;p&gt;After that, you use the Wix client to fetch and display the data on the page. As the figure illustrates, it's a simple application. However, you can check a more complex application using the Headless CMS &lt;a href="https://github.com/wix/wix-cms-nextjs-template" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bookings API
&lt;/h3&gt;

&lt;p&gt;Another API available is the bookings API, which enables you to integrate booking features into your applications. For example, you can set up flexible booking features based on location and availability, schedule or manage appointments, sync staff calendars, set up automated reminders and more.&lt;/p&gt;

&lt;p&gt;The figure below illustrates an example using the bookings API, where users can select a service and a time slot.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F8dwlisp7tpxq9np2tnqb.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.amazonaws.com%2Fuploads%2Farticles%2F8dwlisp7tpxq9np2tnqb.png" alt="An example of the Wix booking headless API" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you choose a service and a time slot, you are redirected to a new page where you need to enter your details for the purchase. Once all the details are entered, you can add the purchase to the cart or book it straight away.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fhl9bfbnje86le2spcqq4.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.amazonaws.com%2Fuploads%2Farticles%2Fhl9bfbnje86le2spcqq4.png" alt="An example of the Wix booking headless API purchase page" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case, I clicked the "Add to Cart" button, which took me to the cart page. You can enter a promo code or add a note on this page. Once you are done, you can click the "Checkout" button to finalize the purchase.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2Fr8uabmemzhheyabbu3xk.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.amazonaws.com%2Fuploads%2Farticles%2Fr8uabmemzhheyabbu3xk.png" alt="An example of the Wix booking headless API cart page" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code is similar to the previous example in the sense that you need to create the Wix client and pass the appropriate modules. After that, it's the usual React code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Cookies&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;js-cookie&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;OAuthStrategy&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@wix/api-client&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;availabilityCalendar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;services&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@wix/bookings&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;redirects&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@wix/redirects&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myWixClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;services&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;availabilityCalendar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;redirects&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;OAuthStrategy&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;clientId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;your-client-id&amp;gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;session&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Booking&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;serviceList&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setServiceList&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;availabilityEntries&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setAvailabilityEntries&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchServices&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;serviceList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;myWixClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;queryServices&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;setServiceList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;serviceList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchAvailability&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;service&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;today&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tomorrow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;today&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;tomorrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setDate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tomorrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;availability&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;myWixClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;availabilityCalendar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;queryAvailability&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;serviceId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;service&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="na"&gt;startDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;today&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="na"&gt;endDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;tomorrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;timezone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;UTC&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nf"&gt;setAvailabilityEntries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;availability&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;availabilityEntries&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;createRedirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;slotAvailability&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;redirect&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;myWixClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redirects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createRedirectSession&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;bookingsCheckout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;slotAvailability&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;timezone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;UTC&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;callbacks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;postFlowUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redirectSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fullUrl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nf"&gt;fetchServices&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;main&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Choose&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;Service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h2&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;serviceList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;service&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;section&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;service&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;fetchAvailability&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;service&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;service&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/section&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;        &lt;span class="p"&gt;})}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Choose&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;Slot&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h2&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;availabilityEntries&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;section&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;startDate&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;createRedirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;startDate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toLocaleString&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/section&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;        &lt;span class="p"&gt;})}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/main&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even though the example application is quite basic, it demonstrates how valuable and powerful the headless APIs are. They provide many features out of the box without requiring you to do any backend work.&lt;/p&gt;

&lt;p&gt;Moreover, it provides a visual interface for managing the backend data. In this example, you can add, edit or remove services using the Wix dashboard. It also enables you to accept payments and manage orders. As a result, one is not required to be a developer to manage the backend.&lt;/p&gt;

&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.amazonaws.com%2Fuploads%2Farticles%2F19bb0rbljdly594vmtwq.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.amazonaws.com%2Fuploads%2Farticles%2F19bb0rbljdly594vmtwq.png" alt="Wix dashboard" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With that being said, you can check more complex applications using the Headless Bookings API here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/wix/wix-appointments-subscriptions-nextjs-template" rel="noopener noreferrer"&gt;Bookings app for a professional coach&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/wix/wix-classes-subscriptions-nextjs-template" rel="noopener noreferrer"&gt;Bookings app for a personal trainer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  More examples
&lt;/h3&gt;

&lt;p&gt;This article presented two example applications to illustrate the usage of the APIs. All the examples shown in this article, and some more, are available in &lt;a href="https://github.com/wix/wix-headless-example" rel="noopener noreferrer"&gt;this repository&lt;/a&gt;. Moreover, there are a handful of production-ready templates you can use as a starter. Check them out &lt;a href="https://www.wix.com/developers/headless/templates" rel="noopener noreferrer"&gt;here&lt;/a&gt;. They are more complex, and thus, they show how to build a production-ready application using these APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The Headless APIs are excellent alternatives to building custom backend applications from scratch. However, you do not always have to choose between the two solutions. If you already have a custom-built backend, you can integrate these APIs into your existing backend application without requiring a total overhaul.&lt;/p&gt;

&lt;p&gt;One of the most important benefits of using an existing solution is saving valuable resources such as finances and time. These resources can then be spent on more business-critical tasks.&lt;/p&gt;

&lt;p&gt;In addition to that, these Headless APIs reduce or even eliminate the complex and lengthy development cycles. As a result, your product can reach the market sooner. The faster the time-to-market, the better.&lt;/p&gt;

&lt;p&gt;Lastly, they are built and maintained by teams of experienced developers. They are made with scalability and security in mind. That means you do not have to worry when the business gets bigger and requires more resources &amp;amp; better security because they handle that for you.&lt;/p&gt;

&lt;p&gt;In conclusion, whatever approach you take, you can be assured that these APIs will provide many benefits and save valuable resources.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/JDode_bW9bw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The article was originally posted on my blog - &lt;a href="https://catalins.tech/headless-api/" rel="noopener noreferrer"&gt;Rethink Full-Stack Development: Is a Custom Backend the Best Choice?&lt;br&gt;
&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>backend</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
