backend-patterns

Guide Node.js and Next.js backend architecture with pattern-based design decisions.

Updated Jul 28, 2024
One-click install
npx skills add https://github.com/fredericvahrenhorst/share-app --skill backend-patterns-fredericvahrenhorst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-patterns
Source: https://github.com/fredericvahrenhorst/share-app/tree/main/.cursor/skills/backend-patterns
Command: npx skills add https://github.com/fredericvahrenhorst/share-app --skill backend-patterns-fredericvahrenhorst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Backend architecture patterns and best practices to design, implement, and evolve robust server-side systems.

Core Features & Use Cases

  • Pattern catalog for API design, data access, caching, error handling, and authentication in Node.js/Express/Next.js.
  • Practical templates and code snippets demonstrating how to apply patterns in real projects.
  • Use Case: Architect a scalable markets API with RESTful routes, a repository/service layer, centralized error handling, and robust logging.

Quick Start

Review the patterns and apply the recommended templates to your Node.js/Express/Next.js API projects.

Frequently Asked Questions about backend-patterns

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

FAQPage Schema
How do I structure a scalable Node.js backend with a repository and service layer?

Structure scalable Node.js backends by separating data access from business logic using repository and service layers. This pattern enforces modular architecture, ensuring maintainability across Express routes and Next.js API workloads.

What are the best practices for API design and error handling in Next.js API routes?

Best practices for API design and error handling in Next.js API routes involve centralized error handling and modular architecture patterns. Applying these ensures robust server-side workloads with clear structural requirements and maintainable code.

When do I need caching and authentication patterns for Node.js Express APIs?

Implement caching and authentication patterns for Node.js Express APIs when scaling server-side workloads. These patterns provide decision criteria for managing data retrieval and securing routes across typical backend systems.

Can I use these backend architecture patterns for a new markets API project?

Yes, you can apply these backend architecture patterns to architect a scalable markets API. They provide practical templates for RESTful routes, repository and service layering, centralized error handling, and robust logging.