cd /news/artificial-intelligence/i-shipped-a-full-stack-ai-saas-in-a-… · home topics artificial-intelligence article
[ARTICLE · art-99369] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

I shipped a full-stack AI SaaS in a weekend with Cursor. Here is everything that broke.

A developer built NexusOS, an AI workspace with research, document Q&A, and AI agents, in a weekend using Cursor. The project encountered production issues including missing database migrations, build-time environment variable errors, and a research feature that hallucinated sources without a web search API. The developer emphasizes that AI-generated code requires careful infrastructure setup and verification.

read3 min views1 publishedAug 17, 2026

I spent a weekend building NexusOS — an AI workspace with research, document Q&A, AI agents and tasks — almost entirely by directing Cursor rather than writing code myself.

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.

First deploy failed instantly:

throw new Error("DATABASE_URL environment variable is required");
Error: Failed to collect page data for /api/auth/account

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

Fix: provision the database before the first deploy, not after.

Second deploy built fine, then every request 500'd:

PrismaClientKnownRequestError: 
The table `public.users` does not exist in the current database.
Code: P2021

The database was connected. Migrations had simply never run against it. A green build meant nothing.

Fix — put migrations in the build script:

"build": "prisma generate && prisma migrate deploy && next build"

Also needed prisma/migrations/migration_lock.toml

, which doesn't exist until you run migrate dev

at least once. Without it migrate deploy

silently does nothing.

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:

const client = new OpenAI({
  apiKey: process.env.GROQ_API_KEY,
  baseURL: "https://api.groq.com/openai/v1",
});

One caveat: Groq has no embeddings endpoint. Anything doing RAG or vector memory needs a separate embeddings provider.

The research feature returned confident, well-structured reports. They looked great.

Then I read the sources section:

Sources: [n/a, AI knowledge only]

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.

After connecting a search API, the same query returned real citations with URLs.

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

Vector search needs the extension enabled inside a migration, not manually:

CREATE EXTENSION IF NOT EXISTS vector;

Neon and Supabase both support it. Run it manually and your next fresh deploy breaks.

For Stripe, never update subscription state from a frontend redirect. Verify the signature server-side:

const event = stripe.webhooks.constructEvent(
  rawBody, signature, process.env.STRIPE_WEBHOOK_SECRET
);

Quick way to confirm it's working — POST an unsigned payload at your endpoint. You want a 400:

{"error":"Missing signature"}

A 200 means anyone can forge a "payment succeeded" event.

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.

Budget your time for infrastructure and verification, not for writing code.

The app is live and needs no signup — it creates a guest workspace when you open it:

👉 https://all-in-one-data-analises-workspace.vercel.app

Pre-registration for launch updates (first 500 get Pro free for a month):

👉 https://nexusos-landing-page.vercel.app/

Happy to answer questions about any of the above.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @nexusos 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-shipped-a-full-sta…] indexed:0 read:3min 2026-08-17 ·