moai-lang-typescript

Configure strict TypeScript full-stack projects with Next.js, tRPC, and Zod.

Updated Nov 24, 2025
One-click install
npx skills add https://github.com/jg-chalk-io/Nora-LiveKit --skill moai-lang-typescript-jg-chalk-io
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-lang-typescript
Source: https://github.com/jg-chalk-io/Nora-LiveKit/tree/main/.claude/skills/moai-lang-typescript
Command: npx skills add https://github.com/jg-chalk-io/Nora-LiveKit --skill moai-lang-typescript-jg-chalk-io

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides production-grade patterns for TypeScript with strong typing, API contracts, and type-safe UI patterns.

Core Features & Use Cases

  • Type Safety: TS 5.x, tRPC, Zod.
  • Full-Stack Patterns: Next.js, React, API routes, and server actions.
  • Quality Guidance: Vitest for unit tests and type checks.

Quick Start

Start a new TS project with strict types and a sample API route.

Frequently Asked Questions about moai-lang-typescript

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

FAQPage Schema
How do I set up end-to-end type safety in a full-stack TypeScript application?

End-to-end type safety combines TypeScript 5.9 with tRPC for API contracts and Zod for runtime validation, eliminating the need for code generation. Next.js 16 and React 19 enforce types across server components, server actions, and client code, catching errors at compile time and runtime.

Can I use tRPC with Next.js server actions for type-safe APIs?

Yes. tRPC 11 integrates with Next.js 16 server actions to create type-safe API routes without separate schema definitions. Zod validates inputs at runtime, ensuring both TypeScript and runtime safety across the full stack.

What's the best way to enforce strict typing in React with TypeScript?

Strict typing in React 19 with TypeScript 5.9 combines tRPC for server communication, Zod for validation schemas, and React Server Components for type-aware rendering. This approach prevents type mismatches between client and server boundaries.

Do I need code generation to achieve type safety between frontend and backend?

No. tRPC 11 with Zod provides end-to-end type safety without code generation by sharing TypeScript types directly. The API contract is validated at runtime by Zod and enforced at compile time by TypeScript.

How do I validate API responses at runtime in a Next.js application?

Zod 3.23 validates API responses and request payloads at runtime, catching invalid data before it reaches your application logic. Combined with tRPC, it ensures both TypeScript compile-time and runtime safety for all API interactions.

What testing tools work with strict TypeScript in modern Next.js projects?

Vitest provides unit testing and type checking for TypeScript 5.9 projects. It integrates with Next.js 16, React 19, and Turbopack, enabling fast test cycles while maintaining strict type safety across server and client code.