Guides Node.js, Next.js, and NestJS work with stack-aware architecture and verification checkpoints. Use when building, reviewing, or refactoring TypeScript services and web apps.
Keep this skill focused on choices an agent still needs to make: fit the change to the existing stack, keep boundaries clean, and verify the repo-native lifecycle commands. Do not turn it into a framework textbook.
Use this skill when the task needs stack selection or architecture judgment, not when repo-wide TypeScript rules already answer the question.
| Situation | Focus |
|---|---|
| Existing Node.js service | Preserve the current framework and package manager first |
| Next.js change | Server/client boundaries, route conventions, data fetching, cache behavior |
| NestJS change | Feature modules, provider boundaries, DTO validation, controller thinness |
| Greenfield TypeScript app | Choose the smallest stack that fits the requirements and deployment target |
| Concern | Default |
|---|---|
| Type safety | Strict TypeScript, explicit boundary types, minimal any |
| Request handling | Thin route/controller layer -> service/domain layer -> data layer |
| Validation | Request params, bodies, env, and external responses validated early |
| Errors | Central formatting/logging; do not leak internals to clients |
| Async work | No sync I/O on hot paths; parallelize only independent work |
| Security | Secrets in env, parameterized DB access, verified auth tokens, rate limits where exposed |
| Stack | High-signal checks |
|---|---|
| Next.js | Server components by default; opt into client components only for interactivity |
| Next.js | Use route handlers or server actions with validation and explicit caching choices |
| NestJS | Group by feature, keep controllers thin, validate DTOs at the edge |
| Shared contracts | Centralize schemas/types when UI and API evolve together |
premium-frontend-ui for UI/UX and component polish.workflow-development for CI/CD and deployment wiring.docker-expert when containerization or image hygiene is part of the task.