node-writing-code

Guide Fastify backend development with Zod validation, Prisma or Drizzle, JWT, and Docker.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Abdullahmohammadaref/acar --skill node-writing-code-abdullahmohammadaref
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: node-writing-code
Source: https://github.com/Abdullahmohammadaref/acar/tree/main/.agents/skills/node-writing-code
Command: npx skills add https://github.com/Abdullahmohammadaref/acar --skill node-writing-code-abdullahmohammadaref

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing and maintaining production-ready Node.js backends is hard without clear patterns for architecture, validation, authentication, and deployment. This Skill provides a compact, reference-driven guide covering Fastify API patterns, Zod validation, Prisma/Drizzle database access, authentication and authorization (JWT, RBAC, ABAC), error handling, and Docker deployment.

Core Features & Use Cases

  • API architecture with plugin-based design, organized routes, and lifecycle hooks
  • Validation and type safety with Zod across HTTP boundaries
  • Database access patterns using Prisma and Drizzle, including migrations and queries
  • Authentication & authorization using JWT, RBAC, and ABAC
  • Docker deployment patterns and production-oriented best practices
  • Reference guides and examples to accelerate adoption

Quick Start

Create a minimal Fastify app skeleton following the patterns in the references and run a sample route to observe plugins, validation, and auth in action.

Frequently Asked Questions about node-writing-code

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

FAQPage Schema
How do I structure a production-ready Fastify backend with plugin-based routing?

Structure a production-ready Fastify backend by organizing API routes into plugins, leveraging lifecycle hooks, and enforcing modular architectural boundaries. This approach isolates service domains, simplifies ongoing maintenance, and accelerates team collaboration across complex Node.js deployments.

What is the best way to implement Zod validation across HTTP boundaries in Node.js?

The best way to implement Zod validation is to apply schemas directly at Fastify HTTP request boundaries to validate incoming payloads. This ensures end-to-end type safety, prevents invalid data from reaching core logic, and standardizes API error responses.

How do I set up JWT authentication and RBAC in a Node.js API?

Set up JWT authentication and RBAC by integrating token validation within Fastify plugins and mapping user roles to specific route access controls. This secures API endpoints, enforces granular authorization policies, and protects sensitive backend resources effectively.

Does this Node.js backend guide support both Prisma and Drizzle for database access?

Yes, this Node.js backend guide supports both Prisma and Drizzle for database access. It provides reference patterns for type-safe queries, schema migrations, and structured data access layers, allowing teams to choose their preferred ORM while maintaining strict type safety.

What Docker deployment patterns should I use for Node.js API services?

Use Docker deployment patterns that containerize Node.js API services with optimized production images, environment variable management, and configured health checks. These production-oriented best practices ensure scalable, reliable, and portable backend deployments across different environments.