Skip to content
Back to skills

Nextjs Architect

ASecurity

Build production Next.js applications with App Router, Server Components, server actions, ISR, and full-stack patterns.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 6, 2026
ai-agentsgoreactnextjsapidatabasefrontendfullstack

Works with

  • cursor
  • cli
  • api

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add AtulPurohit/Antigravity-Awesome-Skills --skill nextjs-architect --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nextjs Architect?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nextjs Architect
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/atulpurohit-nextjs-architect/badge)](https://www.skillsdirectory.com/skills/atulpurohit-nextjs-architect)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nextjs-architect
description: "Build production Next.js applications with App Router, Server Components, server actions, ISR, and full-stack patterns."
category: frontend
tags: [nextjs, react, ssr, ssg, app-router, fullstack]
complexity: advanced
risk: low
compatibility: [claude-code, antigravity, gemini-cli, cursor, copilot, codex-cli, autohand, kiro]
source: antigravity-official
version: "1.0.0"
date_added: "2026-07-10"
last_updated: "2026-07-10"
---

# Next.js Architect

## Purpose
Build performant, SEO-friendly Next.js applications using the App Router, Server Components, and modern data fetching patterns.

## App Router Structure
```
app/
├── (marketing)/              # Route group (no layout prefix)
│   ├── layout.tsx
│   ├── page.tsx
│   └── pricing/page.tsx
├── (dashboard)/
│   ├── layout.tsx            # Dashboard layout (auth-protected)
│   └── dashboard/
│       └── page.tsx
├── api/
│   └── webhooks/
│       └── stripe/route.ts
└── layout.tsx                # Root layout
```

## Server Components (Default)
```tsx
// app/posts/page.tsx - Runs on server, zero JS bundle
export default async function PostsPage({
  searchParams,
}: {
  searchParams: { page?: string };
}) {
  // Direct database access - no API needed
  const posts = await db.query.posts.findMany({
    where: eq(posts.status, 'published'),
    limit: 20,
    offset: (Number(searchParams.page ?? 1) - 1) * 20,
  });

  return (
    <div>
      {posts.map(post => <PostCard key={post.id} post={post} />)}
    </div>
  );
}

// Generate static metadata
export async function generateMetadata({ params }: { params: { id: string } }) {
  const post = await getPost(params.id);
  return {
    title: post.title,
    description: post.excerpt,
    openGraph: { images: [post.coverImage] },
  };
}
```

## Server Actions
```tsx
// app/actions/posts.ts
'use server';
import { revalidatePath } from 'next/cache';

export async function createPost(formData: FormData) {
  const session = await auth();
  if (!session) throw new Error('Unauthorized');

  const post = await db.insert(posts).values({
    title: formData.get('title') as string,
    body: formData.get('body') as string,
    authorId: session.user.id,
  }).returning();

  revalidatePath('/posts');
  redirect(`/posts/${post[0].id}`);
}

// In component
<form action={createPost}>
  <input name="title" required />
  <textarea name="body" required />
  <SubmitButton />
</form>
```

## Caching & Revalidation
```tsx
// Cached fetch with ISR
const data = await fetch('https://api.example.com/posts', {
  next: { revalidate: 3600 },  // Revalidate every hour
});

// On-demand revalidation
import { revalidateTag } from 'next/cache';

export async function updatePost(id: string) {
  await db.update(posts).set({ title: newTitle }).where(eq(posts.id, id));
  revalidateTag(`post-${id}`);  // Purge specific cache
}
```

## Outputs
1. App Router structure design
2. Server Component implementation
3. Server Actions for mutations
4. Authentication with NextAuth/Auth.js
5. Caching and revalidation strategy
6. Deployment configuration (Vercel/self-hosted)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.