Engineering· 2 min read

Why Raw Vibe Coding Breaks at 15,000 Lines (And How a 68-Line Config Fixes It)

Prompting an LLM from scratch produces 15,000 lines of fragile glue code, leaky endpoints, and broken auth. Here is how declarative collections, RBAC, and durable jobs keep AI-built apps maintainable in production.

GlyphStudio Cover: Why Raw Vibe Coding Breaks at 15,000 Lines (And How a 68-Line Config Fixes It)
2 min listen

Key takeaways

  • LLMs excel at declarative schemas and business rules, not repetitive plumbing. Asking an agent to hand-roll auth, table filters, and job queues wastes context window and introduces security bugs.
  • Default-secure Local & REST APIs prevent data leaks. FrogBot enforces collection and field access control by default unless explicitly overridden.
  • 68 lines of config replace 15,000 lines of bespoke glue. When your schema changes, your Admin UI, Kanban board, REST API, and TypeScript types update automatically.

Where raw vibe-coded apps fail in production

When teams try to replace an internal CRM or operations tool using a browser prompt builder or a raw Next.js starter, the failure rarely happens in the first ten minutes. It happens in week two:

  1. Inconsistent authorization: One API route checks the user's session; another server action forgets to filter by organizationId.
  2. UI drift on every schema change: Adding a single status or dueDate field requires editing six React components, three forms, and two API routes.
  3. No durable background execution: Long-running PDF imports, Stripe syncs, and Slack approvals time out inside serverless HTTP handlers.

The 68-line config pattern

FrogBot solves this by separating what changes per app (your data model, access rules, agent instructions, and custom views) from what must never break (authentication, database migrations, Admin UI, job retries, and OAuth token refresh).

import { buildConfig, type CollectionConfig, type AgentConfig } from 'frogbot';
const Deals: CollectionConfig = {
  slug: 'deals',
  admin: { useAsTitle: 'company' },
  access: {
    read: ({ req }) => Boolean(req.user),
    update: ({ req }) => req.user?.role === 'admin',
  },
  fields: [
    { name: 'company', type: 'text', required: true },
    { name: 'amount', type: 'number', required: true },
    { name: 'stage', type: 'select', options: ['Lead', 'Proposal', 'Won'] },
  ],
};
const dealDesk: AgentConfig = {
  slug: 'deal-desk',
  model: 'anthropic/claude-sonnet-4-5',
  instructions: 'Help reps triage deals and pause for approval on discounts over 15%.',
};
export default buildConfig({
  collections: [Deals],
  agents: [dealDesk],
});

Built for coding agents first

Every FrogBot project includes a local agent skill (skills/frogbot/SKILL.md) designed for Claude Code, Cursor, Codex, and OpenCode. Because the surface area is compact and strongly typed, your coding agent writes valid collections, hooks, and jobs on the first pass—without hallucinating brittle infrastructure code.

Keep reading

View all blog →