Skip to content
Back to skills

Node Backend

ASecurity

Node.js backend development patterns for Express, NestJS, Fastify, and Hono. Use when implementing APIs, authentication, middleware, services, and server-side logic with Node.js and TypeScript. Provides project structure, code patterns, and best practices.

  • 13 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added February 7, 2026
developmenttypescriptangularnodeexpressapidatabasebackendsecurityperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add shahtuyakov/claude-setup --skill node-backend --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Node Backend?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Node Backend
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shahtuyakov-node-backend/badge)](https://www.skillsdirectory.com/skills/shahtuyakov-node-backend)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: node-backend
description: Node.js backend development patterns for Express, NestJS, Fastify, and Hono. Use when implementing APIs, authentication, middleware, services, and server-side logic with Node.js and TypeScript. Provides project structure, code patterns, and best practices.
---

# Node.js Backend

Patterns and best practices for Node.js backend development with TypeScript.

## Framework Selection

| Framework | Best For | Use When |
|-----------|----------|----------|
| Express | Simple APIs, flexibility | Quick setup, full control needed |
| NestJS | Enterprise, structured | Large teams, Angular-like structure |
| Fastify | Performance critical | High throughput, schema validation |
| Hono | Edge, lightweight | Cloudflare Workers, minimal overhead |

## Reference Files

| Topic | Load | Use When |
|-------|------|----------|
| Project structure | `references/project-structure.md` | Setting up new project or organizing code |
| Express patterns | `references/express-patterns.md` | Building with Express |
| NestJS patterns | `references/nestjs-patterns.md` | Building with NestJS |
| Auth implementation | `references/auth-patterns.md` | Implementing authentication |
| Error handling | `references/error-handling.md` | Setting up error handling |
| Validation | `references/validation.md` | Input validation patterns |

## Quick Start Patterns

### Express Basic Setup

```typescript
import express from 'express';
import cors from 'cors';
import helmet from 'helmet';
import { errorHandler } from './middleware/errorHandler';
import { routes } from './routes';

const app = express();

app.use(helmet());
app.use(cors());
app.use(express.json());

app.use('/api', routes);
app.use(errorHandler);

export { app };
```

### NestJS Module Pattern

```typescript
@Module({
  imports: [TypeOrmModule.forFeature([User])],
  controllers: [UsersController],
  providers: [UsersService],
  exports: [UsersService],
})
export class UsersModule {}
```

## TypeScript Configuration

```json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "outDir": "./dist",
    "rootDir": "./src",
    "declaration": true
  }
}
```

## Essential Packages

| Package | Purpose |
|---------|---------|
| `typescript` | Type safety |
| `zod` | Runtime validation |
| `bcrypt` | Password hashing |
| `jsonwebtoken` | JWT handling |
| `helmet` | Security headers |
| `cors` | CORS handling |
| `winston` / `pino` | Logging |
| `prisma` / `drizzle` | Database ORM |

## Code Quality Rules

1. **Always use TypeScript** - strict mode enabled
2. **Validate all inputs** - use Zod or class-validator
3. **Handle all errors** - never swallow exceptions
4. **Use async/await** - no callback hell
5. **Environment variables** - use dotenv, never hardcode secrets
6. **Logging** - structured logs with correlation IDs

Files in this skill

  • SKILL.md2.9 KB
  • references/auth-patterns.md10.8 KB
  • references/error-handling.md7.7 KB
  • references/express-patterns.md7.4 KB
  • references/nestjs-patterns.md9.6 KB
  • references/project-structure.md4.7 KB
  • references/validation.md7.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.