<?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: Vivek G Sindagi</title>
    <description>The latest articles on DEV Community by Vivek G Sindagi (@itsviv0).</description>
    <link>https://dev.to/itsviv0</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%2F3302104%2F77ed93f3-b830-49ef-aa81-b7d09c777449.jpeg</url>
      <title>DEV Community: Vivek G Sindagi</title>
      <link>https://dev.to/itsviv0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/itsviv0"/>
    <language>en</language>
    <item>
      <title>Building and Testing My First API Project with Express, Supabase, and Keploy</title>
      <dc:creator>Vivek G Sindagi</dc:creator>
      <pubDate>Sat, 28 Jun 2025 05:19:48 +0000</pubDate>
      <link>https://dev.to/itsviv0/building-and-testing-my-first-api-project-with-express-supabase-and-keploy-8km</link>
      <guid>https://dev.to/itsviv0/building-and-testing-my-first-api-project-with-express-supabase-and-keploy-8km</guid>
      <description>&lt;p&gt;I had never developed and implemented a complete backend project until recently. I had occasionally written little Express.js scripts, but nothing that required building APIs, linking them to an actual database, putting them into use, and writing tests.&lt;/p&gt;

&lt;p&gt;"Build and host a real backend API with a live PostgreSQL database — and test it properly" was the challenge I set for myself.&lt;/p&gt;

&lt;p&gt;Warning: I succeeded. And without writing a single test by hand, I was able to achieve 100% test coverage with the help of a tool called Keploy.&lt;/p&gt;

&lt;p&gt;This is what I discovered.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚧 Starting from Zero: My Stack
&lt;/h2&gt;

&lt;p&gt;I wanted to build something simple but complete. So I created a Notes API — where users can create, read, update, and delete notes. Here's what I used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Express.js – To build RESTful API endpoints&lt;/li&gt;
&lt;li&gt;Supabase – As my PostgreSQL database in the cloud&lt;/li&gt;
&lt;li&gt;Vercel – To deploy my backend serverless functions&lt;/li&gt;
&lt;li&gt;Keploy – To auto-generate tests for my API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I named the project express-supabase-api, and hosted it on my subdomain:&lt;br&gt;
🔗 &lt;a href="https://express-supabase-api.vivs.live/api/notes" rel="noopener noreferrer"&gt;https://express-supabase-api.vivs.live/api/notes&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🤦‍♂️ The Testing Roadblock
&lt;/h2&gt;

&lt;p&gt;At first, I tried writing tests manually with Jest and Supertest. It worked… sort of.&lt;/p&gt;

&lt;p&gt;But I ran into issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How do I mock Supabase without messing up my real database?&lt;/li&gt;
&lt;li&gt;How do I avoid inserting and deleting real data on every test run?&lt;/li&gt;
&lt;li&gt;I kept rewriting boilerplate just to test basic routes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a beginner, it felt like I was spending more time writing test cases than writing actual logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤖 Discovering Keploy (and Getting 100% Coverage Instantly)
&lt;/h2&gt;

&lt;p&gt;Here's what I did:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ran my API on vercel&lt;/li&gt;
&lt;li&gt;Installed Keploy using their one-liner installer&lt;/li&gt;
&lt;li&gt;Used my API like a normal user (created a note, updated one, deleted another)&lt;/li&gt;
&lt;li&gt;Keploy captured all the traffic&lt;/li&gt;
&lt;li&gt;Boom — it generated test cases based on those real interactions&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  🙌 Final Thoughts: Every Beginner Should Try This
&lt;/h2&gt;

&lt;p&gt;If you’re building your first real backend project like I was — especially with Node.js and Express — I highly recommend trying Keploy.&lt;/p&gt;

&lt;p&gt;It doesn’t replace manual testing forever, but it gives you a huge head start and teaches you the value of testing without overwhelming you with complexity.&lt;/p&gt;

&lt;p&gt;🔗 Check out my API here: &lt;a href="https://express-supabase-api.vivs.live/api/notes" rel="noopener noreferrer"&gt;https://express-supabase-api.vivs.live/api/notes&lt;/a&gt;&lt;br&gt;
📦 Repo: &lt;a href="https://github.com/itsviv0/express-supabase-api" rel="noopener noreferrer"&gt;https://github.com/itsviv0/express-supabase-api&lt;/a&gt;&lt;/p&gt;

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