Back to Dictionary
Backend

API Route

A server-side endpoint defined right in your Next.js project — no separate backend needed.

The Full Picture

Next.js API routes (in App Router: route.ts files) let you build your backend inside your frontend project. A file at `app/api/users/route.ts` becomes the endpoint `/api/users`. They handle GET, POST, PUT, DELETE requests and run server-side.

Vibe coders love this because there's no separate backend to deploy. The risk: AI tools often put sensitive logic (API keys, database queries) in client components instead of API routes, exposing secrets to the browser.

Was this helpful?

Want to go deeper? I write about the real gaps vibe coding leaves behind.