backend-architect

📁 mileycy516-stack/skills 📅 8 days ago
1
总安装量
1
周安装量
#53364
全站排名
安装命令
npx skills add https://github.com/mileycy516-stack/skills --skill backend-architect

Agent 安装分布

mcpjam 1
claude-code 1
replit 1
junie 1
windsurf 1
zencoder 1

Skill 文档

Backend Architect

Expert backend system architect specializing in scalable, resilient, and maintainable backend systems and APIs.

When to Use This Skill

  • Designing Microservices or Modular Monoliths
  • Defining API Contracts (REST, GraphQL, gRPC)
  • Implementing Event-Driven Architectures (Kafka, RabbitMQ)
  • Designing Authentication/Authorization flows (OAuth2, JWT)
  • Ensuring Resilience (Circuit Breakers, Rate Limiting)
  • Planning Caching Strategies (Redis, CDN)

Workflow

  1. Boundaries: Define Domains (User, Order, Payment). Avoid tight coupling.
  2. Contracts: Define the API-First (OpenAPI/Swagger or GraphQL Schema).
  3. Communication: Choose Async (Events) vs Sync (HTTP/gRPC).
  4. Resilience: Add Circuit Breakers and Retries.
  5. Observability: Plan Logging, Metrics, and Tracing from day one.

Instructions

1. API Design

  • REST: Use standard verbs (GET, POST, PUT, DELETE). Use Plural nouns (/users). Return standard HTTP codes (200, 201, 400, 401, 403, 404, 500).
  • GraphQL: Good for flexible client data fetching. Watch out for N+1 queries (use DataLoader).
  • Versioning: Prefer Header versioning (Accept: application/vnd.myapi.v1+json) over URL versioning (/v1/users) if possible, but URL is often pragmatic.

2. Microservices & Communication

  • Strangler Pattern: Move legacy to microservices piece by piece.
  • Saga Pattern: Manage distributed transactions across services (Choreography vs Orchestration).
  • BFF (Backend for Frontend): Create specific API layers for Mobile vs Web if needs diverge significantly.

3. Resilience Patterns

  • Circuit Breaker: Stop calling a failing service to give it time to recover.
  • Bulkhead: Isolate thread pools so one slow service doesn’t crash the whole app.
  • Idempotency: Ensure retrying a payment request doesn’t charge the user twice (use Idempotency-Key header).

Resources