<?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: anshuman-rai-27</title>
    <description>The latest articles on DEV Community by anshuman-rai-27 (@anshumanrai27).</description>
    <link>https://dev.to/anshumanrai27</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%2F1148466%2Ff333d014-1206-4a2a-80c5-b46cea6d548f.png</url>
      <title>DEV Community: anshuman-rai-27</title>
      <link>https://dev.to/anshumanrai27</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anshumanrai27"/>
    <language>en</language>
    <item>
      <title>Building a Stylish Expense Tracker with React, SVG Pie Charts, and the Tolgee Platform</title>
      <dc:creator>anshuman-rai-27</dc:creator>
      <pubDate>Thu, 31 Oct 2024 12:06:39 +0000</pubDate>
      <link>https://dev.to/anshumanrai27/building-a-stylish-expense-tracker-with-react-svg-pie-charts-and-the-tolgee-platform-5060</link>
      <guid>https://dev.to/anshumanrai27/building-a-stylish-expense-tracker-with-react-svg-pie-charts-and-the-tolgee-platform-5060</guid>
      <description>&lt;p&gt;:---&lt;/p&gt;

&lt;h1&gt;
  
  
  Building a Stylish Expense Tracker with React, SVG Pie Charts, and the Tolgee Platform
&lt;/h1&gt;

&lt;p&gt;Hello, Dev.to community! 👋&lt;/p&gt;

&lt;p&gt;I’m excited to share my latest project: a user-friendly &lt;strong&gt;Expense Tracker&lt;/strong&gt; built with &lt;strong&gt;React&lt;/strong&gt;. This app not only helps users manage their expenses but also provides insightful visualizations through dynamic &lt;strong&gt;SVG pie charts&lt;/strong&gt;. Moreover, I utilized the &lt;strong&gt;Tolgee Platform&lt;/strong&gt; for easy localization and internationalization. Let’s dive into the features, design choices, and the challenges I faced while developing it!&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Add and Manage Expenses&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Users can easily add new expenses by specifying the category, amount, note, and date. The app displays a list of expenses, making it simple to track spending habits.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Interactive Pie Chart Visualization&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of the standout features is the interactive pie chart that visualizes the percentage of expenses by category. Each slice represents a different category, providing a clear overview of where money is being spent.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Tolgee Platform for Localization&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I integrated the &lt;strong&gt;Tolgee Platform&lt;/strong&gt; to allow users to switch between different languages seamlessly. This enhances user experience and accessibility, making the app usable for a broader audience. Here’s a brief overview of how I set it up:&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useTolgee&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;@tolgee/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;const&lt;/span&gt; &lt;span class="nx"&gt;App&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="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;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLanguage&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useTolgee&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;changeLanguage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lang&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;setLanguage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lang&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;&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;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;t&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;expense_tracker&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;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;button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&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;changeLanguage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;English&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;button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&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;changeLanguage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;es&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Español&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="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Other components like Expense List and Pie Chart */&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;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. &lt;strong&gt;Stylish Design&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With a modern UI, the Expense Tracker is designed to be visually appealing and intuitive. I utilized &lt;strong&gt;Tailwind CSS&lt;/strong&gt; for rapid styling and responsive design.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ Technologies Used
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React&lt;/strong&gt;: For building the user interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SVG&lt;/strong&gt;: To create dynamic and responsive pie charts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS&lt;/strong&gt;: For styling and responsive layouts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lucide Icons&lt;/strong&gt;: For adding sleek icons to enhance the user experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tolgee Platform&lt;/strong&gt;: For easy localization and internationalization.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎨 Designing the Pie Chart
&lt;/h2&gt;

&lt;p&gt;Creating the pie chart was one of the most exciting parts of the project. I calculated the percentages for each expense category and rendered the chart using SVG paths. Here’s a simplified version of the SVG rendering logic:&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;const&lt;/span&gt; &lt;span class="nx"&gt;PieChart&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="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;cumulativePercentage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&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;&lt;/span&gt;&lt;span class="nt"&gt;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;"200"&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;"200"&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;"-1 -1 2 2"&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rotate(-90deg)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;categoryPercentages&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;category&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;percentage&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;index&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;startX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;startY&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;cumulativePercentage&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;cumulativePercentage&lt;/span&gt;&lt;span class="p"&gt;)];&lt;/span&gt;
        &lt;span class="nx"&gt;cumulativePercentage&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;percentage&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&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;endX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;endY&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;cumulativePercentage&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;cumulativePercentage&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;largeArcFlag&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;percentage&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;50&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="mi"&gt;0&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;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;
            &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`M &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;startX&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="nx"&gt;startY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; A 1 1 0 &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;largeArcFlag&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; 1 &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;endX&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="nx"&gt;endY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; L 0 0`&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`hsl(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;, 70%, 50%)`&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;);&lt;/span&gt;
      &lt;span class="p"&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;svg&lt;/span&gt;&lt;span class="p"&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;This code snippet dynamically creates each slice of the pie chart based on the expenses, providing users with a clear view of their spending habits.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌟 Design Choices
&lt;/h2&gt;

&lt;p&gt;To make the app visually appealing, I opted for a bright color palette that complements the dark mode. The gradient background creates an engaging atmosphere for users while maintaining readability.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎉 Getting Started
&lt;/h2&gt;

&lt;p&gt;If you're interested in trying out the Expense Tracker, you can find the source code on my &lt;a href="https://dev.toyour-repo-link"&gt;GitHub repository&lt;/a&gt;. Clone the repo, install the dependencies, and run the app locally!&lt;/p&gt;

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

&lt;p&gt;Building this Expense Tracker has been a fantastic experience, and I'm thrilled to share it with the community. The integration of the &lt;strong&gt;Tolgee Platform&lt;/strong&gt; for localization makes the app accessible to a wider audience. I hope this post inspires you to create your own projects and explore the possibilities with React and SVG.&lt;/p&gt;

&lt;p&gt;Feel free to share your thoughts, questions, or feedback in the comments below! Happy coding! 💻✨&lt;/p&gt;




</description>
    </item>
    <item>
      <title>CopilotKit</title>
      <dc:creator>anshuman-rai-27</dc:creator>
      <pubDate>Sat, 26 Oct 2024 18:17:47 +0000</pubDate>
      <link>https://dev.to/anshumanrai27/copilotkit-2e51</link>
      <guid>https://dev.to/anshumanrai27/copilotkit-2e51</guid>
      <description>&lt;p&gt;&lt;strong&gt;CopilotKit: Simplifying AI Integration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CopilotKit&lt;/strong&gt; is an open-source framework designed to make adding AI copilots to applications easy and fast. By using CopilotKit, developers can create interactive, AI-driven features to enhance user experience and automate tasks with minimal effort.&lt;/p&gt;




&lt;h3&gt;
  
  
  What is CopilotKit?
&lt;/h3&gt;

&lt;p&gt;CopilotKit provides developers with a toolkit to seamlessly integrate AI capabilities into their applications. Ideal for building apps that require real-time user interaction and feedback, CopilotKit enables the creation of custom AI chatbots, agents, and dynamic text areas.&lt;/p&gt;




&lt;h3&gt;
  
  
  Key Features of CopilotKit
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ease of Integration&lt;/strong&gt;: Implement AI copilots in hours instead of months, making it ideal for projects with tight deadlines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Components&lt;/strong&gt;: Offers essential UI components like input fields and action buttons that integrate seamlessly into existing apps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Data Handling&lt;/strong&gt;: Grounds AI copilots in application-specific, real-time data for more relevant and accurate responses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Source&lt;/strong&gt;: Encourages community collaboration, contributions, and innovation through its open-source model.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Getting Started with CopilotKit
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Installation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
To get started, install CopilotKit through npm or yarn:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @copilotkit/react-core
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Setting Up the Component&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Wrap your application or specific areas where you want copilot functionality with the &lt;code&gt;&amp;lt;CopilotKit /&amp;gt;&lt;/code&gt; component, providing context for all components and hooks within its scope.&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;CopilotKit&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;@copilotkit/react-core&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;&lt;strong&gt;3. Defining Custom Actions&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Define custom actions with CopilotKit hooks, allowing the copilot to process user queries and interact with external APIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Integrating with APIs&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Boost your copilot's capabilities by connecting it with APIs, such as OpenAI, for handling requests and responses based on user interactions.&lt;/p&gt;




&lt;h3&gt;
  
  
  Example Use Cases
&lt;/h3&gt;

&lt;p&gt;Here are a few practical applications for using CopilotKit in your projects:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;AI-Powered Resume Generator&lt;/strong&gt;: Guide users in generating resumes and cover letters based on their input.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Social Media Post Scheduler&lt;/strong&gt;: Automate social media posting with platform integrations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive To-Do List&lt;/strong&gt;: Build a task manager with AI-driven organization suggestions.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;CopilotKit is a powerful tool for developers who want to integrate AI features, offering a streamlined approach to building applications that respond intelligently and adapt to user needs in real time. By using CopilotKit, developers can bring innovative, AI-powered functionalities to their projects with ease.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building a Recipe Modifier Tool with Next.js, React, and CopilotKit</title>
      <dc:creator>anshuman-rai-27</dc:creator>
      <pubDate>Sat, 26 Oct 2024 17:30:47 +0000</pubDate>
      <link>https://dev.to/anshumanrai27/building-a-recipe-modifier-tool-with-nextjs-react-and-copilotkit-383j</link>
      <guid>https://dev.to/anshumanrai27/building-a-recipe-modifier-tool-with-nextjs-react-and-copilotkit-383j</guid>
      <description>&lt;p&gt;&lt;strong&gt;Title:&lt;/strong&gt; Building a Recipe Modifier Tool with Next.js, React, and CopilotKit&lt;/p&gt;

&lt;p&gt;Ever wondered how you could modify a recipe in just a few clicks? This project lets you generate instant recipe modifications based on different categories—whether you want to make it vegetarian, healthier, or simply add a twist. Here’s how it’s built with Next.js, React, and the AI power of CopilotKit!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Recipe Modifier Tool allows users to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter a recipe and request different modifications.&lt;/li&gt;
&lt;li&gt;Choose from options like "Modify Recipe," "Veg," "Non-Veg," or "Healthy Diet."&lt;/li&gt;
&lt;li&gt;View generated suggestions in a styled markdown format.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tech Stack&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js for server-side handling and API routes.&lt;/li&gt;
&lt;li&gt;React for building a dynamic UI.&lt;/li&gt;
&lt;li&gt;CopilotKit for integrating AI-driven actions.&lt;/li&gt;
&lt;li&gt;React Markdown to render suggestions in markdown format.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code Breakdown&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;RecipeModifier Component&lt;/p&gt;

&lt;p&gt;The RecipeModifier component uses &lt;code&gt;useCopilotReadable&lt;/code&gt; to make the recipe readable by CopilotKit and &lt;code&gt;useCopilotAction&lt;/code&gt; to trigger the modification process. When a user enters a recipe and selects a modifier, the app fetches an AI-generated response via the /api/getSuggestions endpoint.&lt;/p&gt;

&lt;p&gt;API Route (pages/api/getSuggestions.ts)&lt;/p&gt;

&lt;p&gt;The API route accepts the recipe and modifierType, sends a prompt to CopilotKit’s AI, and returns a suggestion based on the selected modification type.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;CopilotKit Integration makes it easy to add AI-driven actions to your app.&lt;/li&gt;
&lt;li&gt;React Markdown enables real-time formatted output, enhancing readability.&lt;/li&gt;
&lt;li&gt;Next.js API Routes are a great way to handle AI requests within your frontend.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Feel free to experiment with additional modifiers or try different models in CopilotKit. Let me know in the comments if you try it out or have suggestions! &lt;/p&gt;

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