<?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: devnaimeddevansh-svg</title>
    <description>The latest articles on DEV Community by devnaimeddevansh-svg (@devnaimeddevanshsvg).</description>
    <link>https://dev.to/devnaimeddevanshsvg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4080805%2F2c60d06b-65cc-4d74-b33c-9b2fbc948ef1.png</url>
      <title>DEV Community: devnaimeddevansh-svg</title>
      <link>https://dev.to/devnaimeddevanshsvg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devnaimeddevanshsvg"/>
    <language>en</language>
    <item>
      <title>I shipped a full-stack AI SaaS in a weekend with Cursor. Here is everything that broke.</title>
      <dc:creator>devnaimeddevansh-svg</dc:creator>
      <pubDate>Mon, 17 Aug 2026 03:30:36 +0000</pubDate>
      <link>https://dev.to/devnaimeddevanshsvg/i-shipped-a-full-stack-ai-saas-in-a-weekend-with-cursor-here-is-everything-that-broke-3if</link>
      <guid>https://dev.to/devnaimeddevanshsvg/i-shipped-a-full-stack-ai-saas-in-a-weekend-with-cursor-here-is-everything-that-broke-3if</guid>
      <description>&lt;p&gt;I spent a weekend building &lt;strong&gt;NexusOS&lt;/strong&gt; — an AI workspace with research, document Q&amp;amp;A, AI agents and tasks — almost entirely by directing Cursor rather than writing code myself.&lt;/p&gt;

&lt;p&gt;It works. It's live. But the gap between "the AI wrote the code" and "it runs in production" was where all the real work happened. Here's what actually broke.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The build passed locally and died on Vercel
&lt;/h2&gt;

&lt;p&gt;First deploy failed instantly:&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;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;DATABASE_URL environment variable is required&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nl"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Failed&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;collect&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="sr"&gt;/api/&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;account&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next.js evaluates API routes at build time. Prisma wanted a live database &lt;em&gt;during the build&lt;/em&gt;, not just at runtime. Locally there was a Docker Postgres running, so it never surfaced.&lt;/p&gt;

&lt;p&gt;Fix: provision the database before the first deploy, not after.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Tables didn't exist, and nothing told me
&lt;/h2&gt;

&lt;p&gt;Second deploy built fine, then every request 500'd:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PrismaClientKnownRequestError: 
The table `public.users` does not exist in the current database.
Code: P2021
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The database was connected. Migrations had simply never run against it. A green build meant nothing.&lt;/p&gt;

&lt;p&gt;Fix — put migrations in the build script:&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="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"prisma generate &amp;amp;&amp;amp; prisma migrate deploy &amp;amp;&amp;amp; next build"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also needed &lt;code&gt;prisma/migrations/migration_lock.toml&lt;/code&gt;, which doesn't exist until you run &lt;code&gt;migrate dev&lt;/code&gt; at least once. Without it &lt;code&gt;migrate deploy&lt;/code&gt; silently does nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Swapping OpenAI for Groq took one line
&lt;/h2&gt;

&lt;p&gt;I didn't want to pay for OpenAI during development. Groq is OpenAI-API-compatible, so the SDK works unchanged — you only redirect the base URL:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&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;OpenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&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;GROQ_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;baseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.groq.com/openai/v1&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One caveat: &lt;strong&gt;Groq has no embeddings endpoint.&lt;/strong&gt; Anything doing RAG or vector memory needs a separate embeddings provider.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The bug I nearly shipped
&lt;/h2&gt;

&lt;p&gt;The research feature returned confident, well-structured reports. They looked great.&lt;/p&gt;

&lt;p&gt;Then I read the sources section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sources: [n/a, AI knowledge only]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No web search key was configured, so the model was answering from training data and formatting it like researched output. It never lied — it said so plainly — but nobody reads the sources section when the answer looks authoritative.&lt;/p&gt;

&lt;p&gt;After connecting a search API, the same query returned real citations with URLs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is the failure mode I'd watch for in any AI product.&lt;/strong&gt; Plausible output is not verified output, and users assume anything formatted like a citation is one.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. pgvector on serverless Postgres
&lt;/h2&gt;

&lt;p&gt;Vector search needs the extension enabled inside a migration, not manually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;EXTENSION&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Neon and Supabase both support it. Run it manually and your next fresh deploy breaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Webhooks: verify before trusting
&lt;/h2&gt;

&lt;p&gt;For Stripe, never update subscription state from a frontend redirect. Verify the signature server-side:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;stripe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webhooks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;constructEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;rawBody&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;signature&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;STRIPE_WEBHOOK_SECRET&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Quick way to confirm it's working — POST an unsigned payload at your endpoint. You want a 400:&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="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"Missing signature"&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;A 200 means anyone can forge a "payment succeeded" event.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell someone starting
&lt;/h2&gt;

&lt;p&gt;AI writes the code fast. It doesn't provision your database, run migrations, configure environment variables per environment, or notice that your research feature is quietly hallucinating. That's still yours.&lt;/p&gt;

&lt;p&gt;Budget your time for infrastructure and verification, not for writing code.&lt;/p&gt;




&lt;p&gt;The app is live and needs no signup — it creates a guest workspace when you open it:&lt;br&gt;
👉 &lt;a href="https://all-in-one-data-analises-workspace.vercel.app" rel="noopener noreferrer"&gt;https://all-in-one-data-analises-workspace.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pre-registration for launch updates (first 500 get Pro free for a month):&lt;br&gt;
👉 &lt;a href="https://nexusos-landing-page.vercel.app/" rel="noopener noreferrer"&gt;https://nexusos-landing-page.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to answer questions about any of the above.&lt;/p&gt;

</description>
      <category>ai</category>
    </item>
  </channel>
</rss>
