<?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: Ketan Vishwakarma</title>
    <description>The latest articles on DEV Community by Ketan Vishwakarma (@ketan_vishwakarma_c77c54b).</description>
    <link>https://dev.to/ketan_vishwakarma_c77c54b</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%2F3838180%2Fc1727ae8-084d-48cf-aef6-f89c57e1394a.png</url>
      <title>DEV Community: Ketan Vishwakarma</title>
      <link>https://dev.to/ketan_vishwakarma_c77c54b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ketan_vishwakarma_c77c54b"/>
    <language>en</language>
    <item>
      <title>I stopped rewriting the same 95 lines of JavaScript and built this instead</title>
      <dc:creator>Ketan Vishwakarma</dc:creator>
      <pubDate>Sun, 22 Mar 2026 09:58:29 +0000</pubDate>
      <link>https://dev.to/ketan_vishwakarma_c77c54b/i-stopped-rewriting-the-same-95-lines-of-javascript-and-built-this-instead-5p3</link>
      <guid>https://dev.to/ketan_vishwakarma_c77c54b/i-stopped-rewriting-the-same-95-lines-of-javascript-and-built-this-instead-5p3</guid>
      <description>&lt;p&gt;Every Django project I've worked on had the same moment. Somewhere around week two, you're writing a data table. You write the fetch. You write the render. You wire up sorting. You add pagination. You handle the empty state and the error state. You add the delete button with a confirm dialog and a toast. You look at the file and it's 95 lines for something every web app needs.&lt;br&gt;
Then you do it again on the next project. Same 95 lines, different API URL.&lt;br&gt;
I did that enough times that I eventually just built a component for it. Then I built one for images. Then one for forms and more smart-elements.&lt;/p&gt;

&lt;p&gt;I spent the last few months turning all of that into declarative HTML Web Components. The idea is simple — instead of writing the logic, you describe what you want as attributes.&lt;br&gt;
A full data table with sorting, search, pagination, delete confirmation, toast notifications, and skeleton loading:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;smart-table&lt;/span&gt;
  &lt;span class="na"&gt;api-url=&lt;/span&gt;&lt;span class="s"&gt;"/api/users/"&lt;/span&gt;
  &lt;span class="na"&gt;response-map=&lt;/span&gt;&lt;span class="s"&gt;'{"dataPath":"results","totalPath":"count"}'&lt;/span&gt;
  &lt;span class="na"&gt;columns=&lt;/span&gt;&lt;span class="s"&gt;'[{"field":"name"},{"field":"status","type":"badge"}]'&lt;/span&gt;
  &lt;span class="na"&gt;delete-api-url=&lt;/span&gt;&lt;span class="s"&gt;"/api/users"&lt;/span&gt;
  &lt;span class="na"&gt;page-size=&lt;/span&gt;&lt;span class="s"&gt;"20"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/smart-table&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;18 components total. Some highlights:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;smart-chart&lt;/code&gt; — built on Chart.js and ApexCharts, supports WebSocket live streaming, drag-to-zoom, 6 palettes, export to PNG/CSV/JSON&lt;br&gt;
&lt;code&gt;smart-form&lt;/code&gt; — declarative AJAX form engine, handles CSRF automatically, maps field errors from DRF responses, refreshes tables on submit&lt;br&gt;
&lt;code&gt;smart-grid&lt;/code&gt; — dashboard layout with drag-to-reorder, resize handles, and localStorage persistence&lt;br&gt;
&lt;code&gt;smart-permission&lt;/code&gt; — reactive UI control system, add if="user.role === 'admin'" to any HTML element&lt;br&gt;
&lt;code&gt;smart-input&lt;/code&gt; — 8 input types (text, select, datepicker, file, switch, checkbox, radio, textarea), one API&lt;/p&gt;

&lt;p&gt;Works with Django, Flask, Rails, plain HTML. No build step, no npm, no framework opinion.&lt;br&gt;
Docs with live demos: &lt;a href="https://smartelements.in/" rel="noopener noreferrer"&gt;smartelements.in&lt;/a&gt;&lt;br&gt;
Github Repo: &lt;a href="https://github.com/Ketan-coder/smartelementsfiles" rel="noopener noreferrer"&gt;Github-SmartElements&lt;/a&gt;&lt;br&gt;
Happy to answer questions about how any of it works.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>python</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
