📍 You are here: Main Guide → Templates → Design Template
- 📚 Learn Process: Design Phase Guide - How to use this template
- 📖 See Example: Complex System Design - Template in action
- 🧠 Decision Help: Decision Frameworks - How to make design choices
- ➡️ Next Template: Tasks Template - After design is done
Use this template to create comprehensive design documents that translate requirements into technical specifications.
- Feature Name: [Your Feature Name]
- Version: 1.0
- Date: [Current Date]
- Author: [Your Name]
- Reviewers: [List technical reviewers]
- Related Documents: [Link to requirements document]
[Provide a high-level summary of the design approach. Explain how this design addresses the requirements and fits into the overall system architecture. Keep this section concise but comprehensive.]
- [Primary goal 1]
- [Primary goal 2]
- [Primary goal 3]
- [Decision 1 and rationale]
- [Decision 2 and rationale]
- [Decision 3 and rationale]
[Describe how this feature fits into the broader system. Include external dependencies and integration points.]
graph TB
A[External System 1] --> B[Your Feature]
B --> C[Internal System 1]
B --> D[Internal System 2]
E[External System 2] --> B
[Describe the overall architectural approach and major components.]
graph LR
A[Component 1] --> B[Component 2]
B --> C[Component 3]
C --> D[Component 4]
| Layer | Technology | Rationale |
|---|---|---|
| Frontend | [Technology] | [Why chosen] |
| Backend | [Technology] | [Why chosen] |
| Database | [Technology] | [Why chosen] |
| Infrastructure | [Technology] | [Why chosen] |
Purpose: [What this component does]
Responsibilities:
- [Responsibility 1]
- [Responsibility 2]
- [Responsibility 3]
Interfaces:
- Input: [What it receives]
- Output: [What it produces]
- Dependencies: [What it depends on]
Implementation Notes:
- [Key implementation detail 1]
- [Key implementation detail 2]
Purpose: [What this component does]
Responsibilities:
- [Responsibility 1]
- [Responsibility 2]
Interfaces:
- Input: [What it receives]
- Output: [What it produces]
- Dependencies: [What it depends on]
Implementation Notes:
- [Key implementation detail 1]
- [Key implementation detail 2]
Purpose: [What this component does]
Responsibilities:
- [Responsibility 1]
- [Responsibility 2]
Interfaces:
- Input: [What it receives]
- Output: [What it produces]
- Dependencies: [What it depends on]
Implementation Notes:
- [Key implementation detail 1]
- [Key implementation detail 2]
interface EntityName {
id: string;
property1: string;
property2: number;
property3: boolean;
createdAt: Date;
updatedAt: Date;
}Validation Rules:
- [Validation rule 1]
- [Validation rule 2]
Relationships:
- [Relationship to other entities]
interface EntityName {
id: string;
property1: string;
property2: EntityName[];
status: 'active' | 'inactive' | 'pending';
}Validation Rules:
- [Validation rule 1]
- [Validation rule 2]
Relationships:
- [Relationship to other entities]
sequenceDiagram
participant User
participant Frontend
participant API
participant Database
User->>Frontend: Action
Frontend->>API: Request
API->>Database: Query
Database-->>API: Result
API-->>Frontend: Response
Frontend-->>User: Update
Method: POST
Path: /api/v1/[resource]
Request:
{
"property1": "string",
"property2": "number",
"property3": "boolean"
}Response:
{
"id": "string",
"property1": "string",
"property2": "number",
"createdAt": "ISO date string"
}Error Responses:
400 Bad Request: [When this occurs]401 Unauthorized: [When this occurs]404 Not Found: [When this occurs]
Method: GET
Path: /api/v1/[resource]/{id}
Parameters:
id(path): [Description]include(query, optional): [Description]
Response:
{
"id": "string",
"property1": "string",
"property2": "number"
}- [Authentication method and implementation]
- [Token management approach]
- [Authorization model and rules]
- [Permission checking strategy]
- [Data encryption approach]
- [PII handling procedures]
- [Data retention policies]
- [Validation strategies]
- [Sanitization procedures]
- [Rate limiting approach]
| Category | HTTP Status | Description | User Action |
|---|---|---|---|
| Validation | 400 | Invalid input data | Fix input and retry |
| Authentication | 401 | Invalid credentials | Re-authenticate |
| Authorization | 403 | Insufficient permissions | Contact administrator |
| Not Found | 404 | Resource doesn't exist | Check resource identifier |
| Server Error | 500 | Internal system error | Retry later or contact support |
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {
"field": "Specific field error"
},
"timestamp": "ISO date string",
"requestId": "unique-request-id"
}
}- Error Logs: [What gets logged for errors]
- Audit Logs: [What gets logged for auditing]
- Performance Logs: [What gets logged for monitoring]
- Concurrent Users: [Number]
- Requests per Second: [Number]
- Data Volume: [Size/Growth rate]
- Response Time: [Target response times]
- Throughput: [Target throughput]
- Availability: [Uptime requirements]
- [Caching strategy]
- [Database optimization approach]
- [CDN usage]
- [Load balancing approach]
- [Key performance indicators]
- [Monitoring tools and dashboards]
- [Alert thresholds]
- Coverage Target: [Percentage]
- Testing Framework: [Framework name]
- Key Test Areas: [Critical functionality to test]
- API Testing: [Approach and tools]
- Database Testing: [Approach and tools]
- External Service Testing: [Mocking strategy]
- User Scenarios: [Key user journeys to test]
- Testing Tools: [E2E testing framework]
- Test Environment: [Environment setup]
- Load Testing: [Approach and tools]
- Stress Testing: [Limits to test]
- Monitoring: [Performance metrics to track]
- [Deployment approach (blue-green, rolling, etc.)]
- [Environment progression]
- [Rollback procedures]
- [Configuration approach]
- [Environment-specific settings]
- [Secret management]
- [Health checks]
- [Key metrics to monitor]
- [Alert conditions and escalation]
- [Regular maintenance tasks]
- [Backup and recovery procedures]
- [Update and patching strategy]
- [Migration strategy if applicable]
- [Data transformation requirements]
- [Rollback procedures]
- [API versioning strategy]
- [Breaking change procedures]
- [Deprecation timeline]
- [Impact on existing systems]
- [Required changes to dependent systems]
- [Communication plan for changes]
Use this checklist to validate your design document:
- High-level architecture is clearly described
- Component responsibilities are well-defined
- Interfaces between components are specified
- Technology choices are justified
- Design addresses all functional requirements
- Non-functional requirements are considered
- Success criteria can be met with this design
- Constraints and assumptions are addressed
- Design follows established patterns and principles
- Security considerations are addressed
- Performance requirements are considered
- Error handling is comprehensive
- Design provides sufficient detail for implementation
- Data models are complete and validated
- API specifications are detailed
- Testing strategy is comprehensive
- Design supports future extensibility
- Components are loosely coupled
- Configuration is externalized
- Monitoring and observability are included
Creational Patterns:
- Factory: When you need to create objects without specifying exact classes
- Builder: When constructing complex objects step by step
- Singleton: When you need exactly one instance of a class
Structural Patterns:
- Adapter: When integrating incompatible interfaces
- Decorator: When adding behavior without altering structure
- Facade: When simplifying complex subsystem interfaces
Behavioral Patterns:
- Observer: When objects need to be notified of state changes
- Strategy: When you need to switch between algorithms
- Command: When you need to parameterize objects with operations
Architectural Patterns:
- MVC/MVP/MVVM: For separating presentation from business logic
- Repository: For abstracting data access logic
- Unit of Work: For maintaining consistency across multiple operations