veta-app-routing

Apply Veta App Router conventions to add Next.js App Router routes and layouts.

1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/marcogonzalo/studio-manager --skill veta-app-routing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: veta-app-routing
Source: https://github.com/marcogonzalo/studio-manager/tree/main/.agents/skills/veta-app-routing
Command: npx skills add https://github.com/marcogonzalo/studio-manager --skill veta-app-routing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents broken navigation, unexpected 404s, and incorrect access control when adding or modifying Next.js App Router routes and layouts in the repo.

Core Features & Use Cases

  • Public marketing routing conventions: Place SEO-visible pages under src/app/[locale]/(marketing)/... and keep them aligned with i18n/locale structure.
  • Auth and private routing separation: Use src/app/[locale]/(auth)/... for sign-in/sign-up/callback flows and keep authenticated app pages under src/app/veta-app/....
  • Supabase session protection & middleware alignment: Ensure unauthenticated users are redirected correctly via veta-app/**/layout.tsx and that public paths remain accessible through src/lib/supabase/middleware.ts (including PUBLIC_ROUTES and locale handling).
  • SEO/non-index handling for dev-only pages: Mark dev-only segments with robots: { index: false, follow: false } and exclude them from src/app/sitemap.ts.

Quick Start

Tell me whether the new route should be public (marketing/auth) or private (/veta-app), then I’ll place it in the correct src/app/ segment and specify the needed layout, redirects, and middleware/sitemap/robots adjustments.

Frequently Asked Questions about veta-app-routing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add authenticated routes in Next.js App Router without breaking Supabase middleware?

To add authenticated routes in Next.js, place them under the `/veta-app` directory and configure `veta-app/**/layout.tsx` to redirect unauthenticated users, while ensuring `src/lib/supabase/middleware.ts` keeps public paths accessible through `PUBLIC_ROUTES`.

What's the best way to structure public marketing routes for SEO in Next.js with i18n locales?

Public marketing routes in Next.js should be placed under `src/app/[locale]/(marketing)/...` to align with i18n locale structure, ensuring SEO-visible pages are correctly localized and accessible without authentication barriers.

Why does my Next.js App Router route return a 404 after adding a new page?

A 404 in Next.js App Router often occurs when a new route is placed in the wrong directory segment, bypassing the required locale structure or layout-level redirects, which breaks the expected routing conventions and middleware alignment.

How do I exclude development-only pages from the Next.js sitemap and prevent search engine indexing?

To exclude development-only pages from search engine indexing, mark the route segment with `robots: { index: false, follow: false }` and remove the URL from `src/app/sitemap.ts` to keep them out of the generated sitemap.

Where should I place auth entry flows like sign-in and sign-up in a Next.js App Router project?

Auth entry flows like sign-in, sign-up, and callbacks should be placed under `src/app/[locale]/(auth)/...` to separate them from private `/veta-app` routes and maintain correct locale handling and access control.

Can I use this routing convention for a Next.js app that does not use Supabase for authentication?

These routing conventions are designed around Supabase middleware for session protection and access control, so adapting them to a different authentication provider would require replacing the middleware logic in `src/lib/supabase/middleware.ts`.