nodejs-backend

Solid

Node.js backend patterns: layered architecture, TypeScript, validation, error handling, security, observability, logging, metrics, deployment. Use when building REST APIs, REST endpoints, middleware, Express/Fastify/Hono/NestJS/Koa servers, tRPC procedures, Bun servers, or server-side TypeScript.

API & Backend 39 stars 8 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
53
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Node.js Backend **Verify before implementing**: For framework-specific APIs (Express 5, Fastify 5, Node.js 22+ built-ins), look up current docs via Context7 (`query-docs`) before writing code. Training data may lag current releases. ## Framework Selection | Context | Choose | Why | |---------|--------|-----| | Edge/Serverless | Hono | Zero-dep, fastest cold starts | | Performance API | Fastify | Higher throughput than Express, built-in schema validation | | Enterprise/team | NestJS | DI, decorators, structured conventions | | Legacy/ecosystem | Express | Most middleware, widest adoption | Ask user: deployment target, cold start needs, team experience, existing codebase. ## Architecture ``` src/ ├── routes/ # HTTP: parse request, call service, format response ├── middleware/ # Auth, validation, rate limiting, logging ├── services/ # Business logic (no HTTP types) ├── repositories/ # Data access only (queries, ORM) ├── config/ # Env, DB pool, constants └── types/ # Shared TypeScript interfaces ``` - Routes never contain business logic - Services never import Request/Response - Repositories never throw HTTP errors - Dependencies point inward only (Clean Architecture rule): routes -> services -> repositories. Never the reverse. - For scripts/prototypes: single file is fine -- ask "will this grow?" ## TypeScript Rules - Use `import type { }` for type-only imports -- eliminates runtime overhead - Prefer `interface` for object s...

Details

Author
iliaal
Repository
iliaal/ai-skills
Created
6 months ago
Last Updated
1 weeks ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category