backend_core

Enforces Node.js and TypeScript strict-mode project structure for backend applications.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill backend-core-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend_core
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/backend_core
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill backend-core-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zod.

What problem does it solve? Backend projects often grow into inconsistent structures with untyped code, scattered configuration, and fragile startup logic. This Skill provides a verified set of Node.js/TypeScript core principles covering strict mode, feature-first project layout, and environment validation so backend codebases stay maintainable. ## Core Features & Use Cases - TypeScript Strict Mode Rules: Enforces strict, noImplicitAny, and strictNullChecks, banning any in favor of typed payloads or unknown. - Feature-First Project Structure: Organizes code by modules (auth, users) with controllers, services, repositories, and DTOs instead of technical-role folders. - Environment Validation: Validates environment variables at startup using Zod schemas, including typed transforms and minimum-length secrets. - Phased Workflow: Guides foundation, core utilities (logger, async wrapper, linter), and hardening (graceful shutdown, health checks) with verification checkpoints. - Use Case: When scaffolding a new NestJS or Fastify service, apply this Skill to set up the folder structure, strict tsconfig, and Zod-based env parsing before writing business logic. ## Quick Start Ask the agent to scaffold a Node.js TypeScript backend with strict mode, feature-first structure, and validated environment variables.

Frequently Asked Questions about backend_core

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

FAQPage Schema
How do I structure a Node.js TypeScript backend project?

Use a feature-first layout where each module (auth, users) contains its own controller, service, repository, and DTO files. Keep shared middleware, guards, and utilities in a shared folder, and separate infrastructure concerns like database, cache, and logger.

How to enable TypeScript strict mode in a Node.js project?

Set strict, noImplicitAny, strictNullChecks, and noImplicitReturns to true in tsconfig compilerOptions. Avoid the any type entirely; use typed interfaces for known data and unknown for unvalidated input.

How do I validate environment variables in Node.js?

Define a Zod schema describing each variable with types and constraints, then parse process.env at startup. This fails fast on missing or invalid values and provides typed access, such as transforming PORT to a number and requiring JWT_SECRET to be at least 32 characters.

Which frameworks work with this backend structure?

The structure targets Node.js 20+ with TypeScript and applies to NestJS, Fastify, and Express. The feature-first module layout maps naturally to NestJS modules and works equally well with Fastify or Express route organization.

Why should a Node.js app handle graceful shutdown?

Listening for SIGTERM and SIGINT lets the process close database connections and finish in-flight requests before exiting. Without it, deployments and crashes can drop requests or leave connections hanging, especially under process managers like PM2 or Docker.