DauQuangThanh

backend-design

2
2
# Install this skill:
npx skills add DauQuangThanh/hanoi-rainbow --skill "backend-design"

Install specific skill from multi-skill repository

# Description

Designs comprehensive backend systems including RESTful APIs, microservices, database architecture, authentication/authorization, caching strategies, message queues, and scalability patterns. Produces API specifications, database schemas, architecture diagrams, and implementation guides. Use when designing backend services, APIs, data models, distributed systems, authentication flows, or when users mention backend architecture, API design, database design, microservices, or server-side development.

# SKILL.md


name: backend-design
description: Designs comprehensive backend systems including RESTful APIs, microservices, database architecture, authentication/authorization, caching strategies, message queues, and scalability patterns. Produces API specifications, database schemas, architecture diagrams, and implementation guides. Use when designing backend services, APIs, data models, distributed systems, authentication flows, or when users mention backend architecture, API design, database design, microservices, or server-side development.


Backend Design

Workflow

Follow this systematic design process:

  1. Requirements Analysis
  2. Gather functional requirements (features, operations)
  3. Define non-functional requirements (performance, scalability, availability)
  4. Identify constraints (budget, timeline, technology, compliance)

  5. Architecture Selection

  6. Choose architecture pattern (monolith, microservices, serverless)
  7. Select technology stack based on requirements
  8. Define service boundaries and responsibilities

  9. API Design

  10. Design RESTful endpoints with proper resource modeling
  11. Define request/response schemas and contracts
  12. Plan versioning strategy and documentation
  13. See api-design-guide.md for REST/GraphQL/gRPC patterns

  14. Database Design

  15. Model entities and relationships
  16. Design schema with normalization
  17. Plan indexing and partitioning strategies
  18. See database-design.md for relational and NoSQL patterns

  19. Security Design

  20. Design authentication flow (OAuth 2.0, JWT)
  21. Plan authorization model (RBAC, ABAC)
  22. Define data encryption and protection strategy

  23. Scalability & Performance

  24. Design caching strategy (Redis, CDN)
  25. Plan load balancing and auto-scaling
  26. Define asynchronous processing with message queues

  27. Documentation

  28. Create API specifications (OpenAPI/Swagger)
  29. Document architecture decisions with Mermaid diagrams
  30. Provide implementation guidelines and roadmap

Output Structure

Present your backend design with these sections:

  1. System Overview - High-level architecture, components, technology stack
  2. API Specification - Endpoints, schemas, authentication, OpenAPI docs
  3. Database Design - ERD, schema, indexes, migration plan
  4. Architecture Decisions - Service decomposition, communication patterns, consistency model
  5. Security Implementation - Authentication/authorization flows, encryption
  6. Scalability Plan - Load balancing, caching, database scaling, auto-scaling
  7. Deployment Architecture - Containers, infrastructure, CI/CD, monitoring
  8. Implementation Roadmap - Phases, milestones, dependencies, risks

Core Principles

  • API-first approach - Design and document APIs before implementation
  • Security by design - Build authentication, authorization, and encryption from the start
  • Design for scalability - Plan for growth with caching, load balancing, and horizontal scaling
  • Plan for failure - Include error handling, retries, circuit breakers, and graceful degradation
  • Document thoroughly - Create clear API specs, Mermaid architecture diagrams, and implementation guides

Reference Files

Load additional resources based on specific needs:

  • Detailed Design Process: See backend-design-process.md for comprehensive step-by-step workflow with examples for API design, database modeling, authentication flows, and microservices patterns

  • API Design Guide: See api-design-guide.md when designing RESTful APIs, GraphQL schemas, or gRPC services - includes resource modeling, status codes, versioning strategies, and documentation

  • Database Design: See database-design.md for detailed guidance on relational and NoSQL database design, normalization, indexing, partitioning, and replication strategies

  • Best Practices: See best-practices.md for API design, database optimization, security hardening, performance tuning, and reliability patterns

  • Common Patterns: See common-patterns.md for code examples of repository pattern, service layer, dependency injection, and other architectural patterns

  • Example Projects: See examples.md for complete architecture examples including e-commerce systems, real-time chat applications, and microservices implementations

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.