pikku-deploy-nextjs

Generate typed Next.js wrappers for Pikku API routes and RPC calls.

56|Updated Apr 18, 2021
One-click install
npx skills add https://github.com/pikkujs/pikku --skill pikku-deploy-nextjs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pikku-deploy-nextjs
Source: https://github.com/pikkujs/pikku/tree/main/.claude/skills/pikku-deploy-nextjs
Command: npx skills add https://github.com/pikkujs/pikku --skill pikku-deploy-nextjs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable seamless, type-safe integration of Pikku services with Next.js apps for API routes, Server Components data fetching, and RPC calls.

Core Features & Use Cases

  • Typed wrappers for Next.js API routes and Pikku functions (pikkuAPIRequest, pikku-nextjs.gen.ts) across API routes and components.
  • Server Components & Server Actions data fetching with generated helpers supporting both dynamic (with request context) and static (precompile/ISR) usage.
  • RPC integration and end-to-end wiring that allows server-to-client calls through a consistent, typed API surface in Next.js.
  • Real-world scenario: A Next.js app uses the generated wrappers to call Pikku services from API routes and Server Components without leaking types or requiring manual adapters.

Quick Start

Install the Next.js Pikku integration (for example, yarn add @pikku/next) and wire the generated wrappers into your Next.js app as shown in the examples.

Frequently Asked Questions about pikku-deploy-nextjs

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

FAQPage Schema
How do I create type-safe API routes in Next.js with RPC calls?

Type-safe Next.js API routes and RPC calls are generated via a pikku-nextjs.gen.ts wrapper exposing typed methods like get, post, and rpc for route handlers. This prevents type leakage and removes manual adapters.

Can I use Pikku for server components data fetching in Next.js?

Yes, Pikku supports Next.js Server Components data fetching using generated helpers for dynamic requests with context and static precompiled workflows. Functions like staticGet and staticRPC enable seamless static generation.

What is the best way to wire Pikku services into Next.js server actions?

The best way to wire Pikku services into Next.js Server Actions is by installing the Next.js Pikku integration and using the generated pikkuNextJS wrapper, which provides a consistent end-to-end typed API surface for server-to-client calls.

Does Next.js static generation support precompiled RPC functions?

Yes, Next.js static generation supports precompiled RPC functions through the generated wrapper's staticRPC and staticPost methods. These enable ISR and static data fetching workflows without losing type safety.

How do I set up the Pikku Next.js integration for typed wrappers?

To set up the Pikku Next.js integration, install the package using a command like yarn add @pikku/next, then wire the generated pikku-nextjs.gen.ts wrappers into your Next.js API routes and Server Components as shown in the documentation.