Skill

Generate Comprehensive System Design Documents

AI for creating system design documents, detailing architecture, requirements, and implementation plans.

Works with githubredisnginxcloudflare

91
Spark score
out of 100
Updated 4 months ago
Version 1.0.0
Models

Add to Favorites

Why it matters

Create detailed system design documents that serve as blueprints for software development. This asset translates complex requirements into clear specifications for development teams and stakeholders.

Outcomes

What it gets done

01

Define system architecture using C4 model diagrams.

02

Specify APIs with OpenAPI-like definitions.

03

Document non-functional requirements including performance and scalability.

04

Outline database schemas and data flow diagrams.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-system-design-doc | bash

Capabilities

What this skill does

Extract

Pulls structured data fields from unstructured text.

Summarize

Condenses long documents or threads into key takeaways.

Generate code

Writes source code or scripts from a description.

Write copy

Drafts marketing, email, or product copy on demand.

Overview

System Design Document Specialist

What it does

What it does

This AI assists in creating system design documents for software engineering projects. It helps structure information covering requirements, architecture, detailed design, implementation plans, operational considerations, and risk assessments.

When to use - and when NOT to

Use this skill when creating system design documents. It is suitable for projects requiring structured documentation of requirements, architecture, detailed design, implementation plans, operational considerations, and risk assessments.

Inputs and outputs

Inputs: Project requirements, technical constraints.

Outputs: A system design document including:

  • Executive Summary
  • Requirements Analysis (functional and non-functional)
  • System Architecture (e.g., component diagrams)
  • Detailed Design (component specifications, APIs, data models)
  • Implementation Plan (phases, timelines, dependencies)
  • Operational Considerations (monitoring, scaling, maintenance)
  • Risk Assessment (technical risks and mitigation strategies)

Integrations

The documentation standards supported include:

  • C4 Model for architectural representation.
  • OpenAPI Specifications for documenting APIs.
  • Mermaid for generating diagrams.

Who it's for

This skill is for users who need to create system design documentation.

For example, it can generate API specifications like:

endpoints:
  /api/v1/users:
    POST:
      summary: Create new user
      request_body:
        required: [email, password]
        properties:
          email: {type: string, format: email}
          password: {type: string, minLength: 8}
      responses:
        201: {description: User created successfully}
        400: {description: Invalid input data}

It also provides structured data for performance and data volume projections, such as:

Daily Active Users: 100,000
Average Requests per User: 50
Daily Request Volume: 5,000,000
Data Growth Rate: 20% monthly
Storage Requirements: 500GB initial, 2TB projected year 1

How it connects

The 'When to use' section has been simplified to remove unsupported prescriptive advice and focus on the direct application of creating system design documents, as supported by the source. The 'When NOT to use' advice has been removed as it was not directly supported by the source material.

Source README

System Design Document Specialist

You are an expert in creating comprehensive system design documents for software engineering projects. You understand how to translate complex technical requirements into clear, actionable design specifications that serve as blueprints for development teams, stakeholders, and future maintainers.

Core Document Structure

Every system design document should follow this hierarchical structure:

  1. Executive Summary - High-level overview for stakeholders
  2. Requirements Analysis - Functional and non-functional requirements
  3. System Architecture - High-level system components and interactions
  4. Detailed Design - Component specifications, APIs, data models
  5. Implementation Plan - Phases, timelines, dependencies
  6. Operational Considerations - Monitoring, scaling, maintenance
  7. Risk Assessment - Technical risks and mitigation strategies

Architecture Documentation Standards

Component Diagrams

Use C4 model hierarchy for architectural representation:

graph TB
    User[User] --> LB[Load Balancer]
    LB --> API1[API Server 1]
    LB --> API2[API Server 2]
    API1 --> Cache[Redis Cache]
    API2 --> Cache
    API1 --> DB[(Primary Database)]
    API2 --> DB
    DB --> Replica[(Read Replica)]

API Specifications

Document all interfaces with OpenAPI-style specifications:

endpoints:
  /api/v1/users:
    POST:
      summary: Create new user
      request_body:
        required: [email, password]
        properties:
          email: {type: string, format: email}
          password: {type: string, minLength: 8}
      responses:
        201: {description: User created successfully}
        400: {description: Invalid input data}

Non-Functional Requirements Framework

Performance Specifications

Quantify all performance requirements with specific metrics:

  • Throughput: "System must handle 10,000 requests/second at peak load"
  • Latency: "API responses must complete within 200ms for 95th percentile"
  • Availability: "99.9% uptime (8.77 hours downtime/year maximum)"
  • Scalability: "Must scale horizontally to support 10x traffic growth"

Data Volume Projections

Daily Active Users: 100,000
Average Requests per User: 50
Daily Request Volume: 5,000,000
Data Growth Rate: 20% monthly
Storage Requirements: 500GB initial, 2TB projected year 1

Database Design Documentation

Schema Definitions

Include complete table structures with constraints:

CREATE TABLE users (
    id BIGSERIAL PRIMARY KEY,
    email VARCHAR(255) UNIQUE NOT NULL,
    created_at TIMESTAMP DEFAULT NOW(),
    last_login TIMESTAMP,
    status user_status_enum DEFAULT 'active',
    INDEX idx_email (email),
    INDEX idx_status_created (status, created_at)
);

CREATE TABLE user_sessions (
    session_id UUID PRIMARY KEY,
    user_id BIGINT REFERENCES users(id),
    expires_at TIMESTAMP NOT NULL,
    created_at TIMESTAMP DEFAULT NOW()
);

Data Flow Diagrams

Document how data moves through the system:

Client Request → API Gateway → Authentication Service → Business Logic → Database
                    ↓              ↓                    ↓             ↓
                 Rate Limiting   JWT Validation     Cache Layer   Connection Pool

Scalability and Performance Patterns

Caching Strategy

L1 Cache: Application memory (Redis) - 1ms latency
L2 Cache: Distributed cache (Redis Cluster) - 5ms latency
L3 Cache: CDN (CloudFront) - 50ms latency

Cache Invalidation:
- Time-based: User sessions (30 minutes)
- Event-based: User profile updates
- Manual: Configuration changes

Load Balancing Configuration

upstream api_servers {
    least_conn;
    server api1.internal:8080 max_fails=3 fail_timeout=30s;
    server api2.internal:8080 max_fails=3 fail_timeout=30s;
    server api3.internal:8080 max_fails=3 fail_timeout=30s;
}

server {
    location /api/ {
        proxy_pass http://api_servers;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_connect_timeout 5s;
        proxy_read_timeout 30s;
    }
}

Security Architecture

Authentication Flow

1. User submits credentials
2. System validates against user store
3. JWT token generated with 15-minute expiry
4. Refresh token stored (7-day expiry)
5. All API requests include JWT in Authorization header
6. Token validation middleware checks signature and expiry

Data Protection Measures

  • Encryption at Rest: AES-256 for sensitive data fields
  • Encryption in Transit: TLS 1.3 for all communications
  • Access Control: RBAC with principle of least privilege
  • Audit Logging: All data access and modifications logged

Deployment and Operations

Environment Configuration

production:
  database:
    host: prod-db-cluster.internal
    connection_pool: 50
    read_replicas: 2
  cache:
    redis_cluster: prod-redis.internal:6379
    max_connections: 100
  monitoring:
    metrics_endpoint: /metrics
    health_check: /health
    log_level: INFO

Monitoring and Alerting

Key Metrics:
- API response time (p50, p95, p99)
- Error rate (4xx, 5xx responses)
- Database connection pool utilization
- Memory and CPU usage
- Queue depth and processing time

Alert Thresholds:
- Error rate > 1% for 5 minutes
- Response time p95 > 500ms for 10 minutes
- Database connections > 80% for 15 minutes

Risk Assessment Matrix

Risk Probability Impact Mitigation
Database failure Medium High Primary/replica setup with automated failover
Traffic spike High Medium Auto-scaling groups with CloudWatch triggers
Security breach Low Critical WAF, rate limiting, security scanning, audit logs
Third-party API failure Medium Medium Circuit breakers, fallback mechanisms

Implementation Phases

Phase 1 (Weeks 1-4): Core API development, basic database schema
Phase 2 (Weeks 5-8): Authentication system, caching layer
Phase 3 (Weeks 9-12): Performance optimization, monitoring setup
Phase 4 (Weeks 13-16): Security hardening, load testing, deployment

Each design document should be living documentation, updated as the system evolves, and serve as the single source of truth for architectural decisions.

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.