{"slug": "i-shipped-a-full-stack-ai-saas-in-a-weekend-with-cursor-here-is-everything-that", "title": "I shipped a full-stack AI SaaS in a weekend with Cursor. Here is everything that broke.", "summary": "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.", "body_md": "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.\n\nIt 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.\n\nFirst deploy failed instantly:\n\n```\nthrow new Error(\"DATABASE_URL environment variable is required\");\nError: Failed to collect page data for /api/auth/account\n```\n\nNext.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.\n\nFix: provision the database before the first deploy, not after.\n\nSecond deploy built fine, then every request 500'd:\n\n```\nPrismaClientKnownRequestError: \nThe table `public.users` does not exist in the current database.\nCode: P2021\n```\n\nThe database was connected. Migrations had simply never run against it. A green build meant nothing.\n\nFix — put migrations in the build script:\n\n```\n\"build\": \"prisma generate && prisma migrate deploy && next build\"\n```\n\nAlso needed `prisma/migrations/migration_lock.toml`\n\n, which doesn't exist until you run `migrate dev`\n\nat least once. Without it `migrate deploy`\n\nsilently does nothing.\n\nI 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:\n\n``` js\nconst client = new OpenAI({\n  apiKey: process.env.GROQ_API_KEY,\n  baseURL: \"https://api.groq.com/openai/v1\",\n});\n```\n\nOne caveat: **Groq has no embeddings endpoint.** Anything doing RAG or vector memory needs a separate embeddings provider.\n\nThe research feature returned confident, well-structured reports. They looked great.\n\nThen I read the sources section:\n\n```\nSources: [n/a, AI knowledge only]\n```\n\nNo 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.\n\nAfter connecting a search API, the same query returned real citations with URLs.\n\n**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.\n\nVector search needs the extension enabled inside a migration, not manually:\n\n```\nCREATE EXTENSION IF NOT EXISTS vector;\n```\n\nNeon and Supabase both support it. Run it manually and your next fresh deploy breaks.\n\nFor Stripe, never update subscription state from a frontend redirect. Verify the signature server-side:\n\n``` js\nconst event = stripe.webhooks.constructEvent(\n  rawBody, signature, process.env.STRIPE_WEBHOOK_SECRET\n);\n```\n\nQuick way to confirm it's working — POST an unsigned payload at your endpoint. You want a 400:\n\n```\n{\"error\":\"Missing signature\"}\n```\n\nA 200 means anyone can forge a \"payment succeeded\" event.\n\nAI 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.\n\nBudget your time for infrastructure and verification, not for writing code.\n\nThe app is live and needs no signup — it creates a guest workspace when you open it:\n\n👉 [https://all-in-one-data-analises-workspace.vercel.app](https://all-in-one-data-analises-workspace.vercel.app)\n\nPre-registration for launch updates (first 500 get Pro free for a month):\n\n👉 [https://nexusos-landing-page.vercel.app/](https://nexusos-landing-page.vercel.app/)\n\nHappy to answer questions about any of the above.", "url": "https://wpnews.pro/news/i-shipped-a-full-stack-ai-saas-in-a-weekend-with-cursor-here-is-everything-that", "canonical_source": "https://dev.to/devnaimeddevanshsvg/i-shipped-a-full-stack-ai-saas-in-a-weekend-with-cursor-here-is-everything-that-broke-3if", "published_at": "2026-08-17 03:30:36+00:00", "updated_at": "2026-08-17 04:42:45.182861+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-products", "developer-tools", "ai-agents", "ai-infrastructure"], "entities": ["NexusOS", "Cursor", "Prisma", "Groq", "OpenAI", "Stripe", "Neon", "Supabase"], "alternates": {"html": "https://wpnews.pro/news/i-shipped-a-full-stack-ai-saas-in-a-weekend-with-cursor-here-is-everything-that", "markdown": "https://wpnews.pro/news/i-shipped-a-full-stack-ai-saas-in-a-weekend-with-cursor-here-is-everything-that.md", "text": "https://wpnews.pro/news/i-shipped-a-full-stack-ai-saas-in-a-weekend-with-cursor-here-is-everything-that.txt", "jsonld": "https://wpnews.pro/news/i-shipped-a-full-stack-ai-saas-in-a-weekend-with-cursor-here-is-everything-that.jsonld"}}