home / skills / hyperb1iss / hyperskills / fullstack

fullstack skill

/skills/fullstack

This skill helps you build modern web apps with React and Next.js using server-first patterns, optimistic UI, and efficient data handling.

npx playbooks add skill hyperb1iss/hyperskills --skill fullstack

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.8 KB
---
name: fullstack
description: Use this skill when building web applications, React components, Next.js apps, APIs, databases, or doing rapid prototyping. Activates on mentions of React, Next.js, TypeScript, Node.js, Express, Fastify, PostgreSQL, MongoDB, Prisma, Drizzle, tRPC, REST API, GraphQL, authentication, server components, client components, SSR, SSG, ISR, or general web development.
---

# Fullstack Development

Build modern web applications with React 19, Next.js 15+, and server-first architecture.

## Quick Reference

### React 19 + Next.js 15 Patterns

**Server Components (Default)**

```tsx
// app/page.tsx - Server Component by default
export default async function Page() {
  const data = await db.query("SELECT * FROM posts"); // Direct DB access
  return <PostList posts={data} />;
}
```

**Client Components (Opt-in)**

```tsx
"use client";
// Only for interactivity: useState, useEffect, event handlers
export function LikeButton({ postId }) {
  const [liked, setLiked] = useState(false);
  return <button onClick={() => setLiked(!liked)}>Like</button>;
}
```

**Server Actions**

```tsx
"use server";
export async function createPost(formData: FormData) {
  const title = formData.get("title");
  await db.insert(posts).values({ title });
  revalidatePath("/posts");
}
```

### React Compiler (Auto-Memoization)

Enable in `next.config.js`:

```js
module.exports = {
  experimental: {
    reactCompiler: true,
  },
};
```

**No more manual memoization** - the compiler handles `useMemo`, `useCallback`, `React.memo` automatically.

### State Management Stack

| Need                | Solution              |
| ------------------- | --------------------- |
| Server state        | TanStack Query        |
| Global client state | Zustand               |
| Atomic state        | Jotai                 |
| Form state          | React Hook Form + Zod |
| URL state           | nuqs                  |

**TanStack Query for Server State**

```tsx
const { data, isLoading } = useQuery({
  queryKey: ["posts"],
  queryFn: () => fetch("/api/posts").then((r) => r.json()),
});
```

**Zustand for Client State**

```tsx
const useStore = create((set) => ({
  theme: "dark",
  setTheme: (theme) => set({ theme }),
}));
```

### Component Libraries (2026)

**Recommended Stack:**

- **shadcn/ui** - Copy-paste components, full control
- **Base UI** - Unstyled primitives (replacing Radix)
- **Tailwind CSS v4** - Utility-first styling

### Database Patterns

**Drizzle ORM** (Type-safe, lightweight)

```tsx
const posts = await db.select().from(postsTable).where(eq(postsTable.authorId, userId));
```

**Prisma** (DX-focused, migrations)

```tsx
const posts = await prisma.post.findMany({ where: { authorId: userId } });
```

### Performance Imperatives

1. **Eliminate waterfalls** - Use `Promise.all()` for parallel fetches
2. **Stream with Suspense** - Progressive rendering
3. **Minimize 'use client'** - Every directive increases bundle
4. **Use Route Segment Config** - `dynamic`, `revalidate` options

### Core Web Vitals Targets

- **LCP** < 2.5s (Largest Contentful Paint)
- **INP** < 200ms (Interaction to Next Paint)
- **CLS** < 0.1 (Cumulative Layout Shift)

## Agents

- **frontend-developer** - React, styling, components, performance
- **backend-architect** - APIs, auth, system design
- **rapid-prototyper** - MVPs in days, not weeks
- **database-specialist** - Schema, queries, migrations, optimization

## Deep Dives

- [references/react-19-patterns.md](references/react-19-patterns.md)
- [references/nextjs-app-router.md](references/nextjs-app-router.md)
- [references/state-management.md](references/state-management.md)
- [references/database-patterns.md](references/database-patterns.md)

## Examples

- [examples/nextjs-app-starter/](examples/nextjs-app-starter/)
- [examples/trpc-stack/](examples/trpc-stack/)
- [examples/auth-patterns/](examples/auth-patterns/)

Overview

This skill helps build modern fullstack web applications using React (server and client components), Next.js, TypeScript, Node.js, and common databases and ORMs. It focuses on practical patterns for server-first architecture, performance, state management, and database access. Use it to design APIs, auth flows, component patterns, and rapid prototypes that scale.

How this skill works

The skill inspects context for mentions of React, Next.js, TypeScript, Node/Express/Fastify, databases (Postgres/Mongo), ORMs (Prisma/Drizzle), and API styles (REST, GraphQL, tRPC). It recommends concrete code patterns: server components as default, opt-in client components, server actions for mutations, and compiler-driven memoization. It also suggests state stacks (TanStack Query, Zustand, Jotai), component libraries, and performance tactics like eliminating waterfalls and streaming with Suspense.

When to use it

  • Scaffolding a Next.js app with server-first architecture and direct DB access.
  • Designing API layers (REST, GraphQL, tRPC) and authentication flows.
  • Optimizing performance: reducing waterfalls, streaming, and minimizing client bundles.
  • Choosing state management and form validation patterns for complex UIs.
  • Selecting an ORM and crafting safe, type-safe DB queries and migrations.

Best practices

  • Prefer server components by default; add "use client" only for interactivity to shrink bundles.
  • Parallelize independent IO with Promise.all to avoid waterfall fetches.
  • Use TanStack Query for server state and Zustand/Jotai for client state to separate concerns.
  • Adopt type-safe ORMs (Drizzle or Prisma) and keep DB access patterns centralized.
  • Aim for LCP < 2.5s, INP < 200ms, CLS < 0.1 and measure with real-user metrics.

Example use cases

  • Build a blog with server-rendered post lists, client Like buttons, and server actions for posting.
  • Create an authenticated SaaS app: Next.js app router, tRPC API layer, Prisma migrations, and Role-based auth.
  • Rapid prototype an MVP with shadcn/ui + Tailwind, Zustand for small client state, and TanStack Query for data.
  • Migrate a monolithic API to route segments with ISR/SSR configuration and streamed rendering via Suspense.

FAQ

When should I use server components vs client components?

Default to server components for data fetching and rendering. Use client components only for interactivity (hooks, event handlers) to minimize client bundle size.

Which ORM should I pick: Drizzle or Prisma?

Choose Drizzle for lightweight, type-safe queries and minimal runtime. Choose Prisma for richer DX, migrations, and broader community tooling.