arc42 Template

repository·master·Indexed 23 days ago

https://github.com/arc42/arc42-template

A collection of AsciiDoc source files and Enterprise Architect templates (.QEA, .EAPX) used to create professional software architecture documentation. It provides a structured framework for documenting introduction and goals, architecture constraints, business and technical context, solution strategies, building block views (Level 1-3), runtime views, and deployment views.

Tokens
14K
Snippets
17
Records
70
Agent score
78%

What's inside arc42-template

  1. Understand the arc42 documentation structure

    master

    The arc42 template follows a standardized structure consisting of 12 main sections. When using this template, you will populate the following chapters to describe your architecture:

    1. Introduction and Goals: Purpose and objectives.
    2. Architecture Constraints: Technical or business constraints.
    3. Context and Scope: System boundaries and external actors/systems.
    4. Solution Strategy: High-level approach and design principles.
    5. Building Block View: Static structure of the system.
    6. Runtime View: Dynamic behavior and interactions.
    7. Deployment View: Mapping software to hardware/infrastructure.
    8. Concepts: Cross-cutting architectural patterns or principles.
    9. Architecture Decisions: Key decisions made during design.
    10. Quality Requirements: Non-functional requirements (e.g., performance, security).
    11. Technical Risks: Identified risks and mitigation strategies.
    12. Glossary: Definitions of terms used in the documentation.
  2. What is a Runtime View and when to use it

    master

    The Runtime View describes the specific behavior and interaction of system building blocks through scenarios. It is used to communicate how the architecture works during execution to stakeholders who may find static models (like building block or deployment views) difficult to interpret.

    When to use it: Use this view to document scenarios that have high architectural relevance. Instead of documenting every possible interaction, focus on a representative selection of:

    • Key use cases or functions: How building blocks execute specific tasks.
    • Critical external interfaces: How building blocks interact with users or neighboring systems.
    • Operation and management: Scenarios involving startup, execution, and shutdown.
    • Error and exception scenarios: How the system behaves during failures.
  3. What is the Solution Strategy section in arc42?

    master

    The Solution Strategy section provides a brief summary and explanation of the fundamental decisions and strategies that shape the system's architecture. These decisions serve as the pillars of the software architecture and form the basis for many subsequent detailed decisions or implementation rules.

    Key elements to include in this section are:

    • Technological decisions: Choices regarding the tech stack and tools.
    • Top-level decomposition decisions: High-level architectural patterns or design choices (e.g., microservices vs. monolith).
    • Quality goal decisions: How the architecture is designed to achieve specific quality requirements (e.g., scalability, security).
    • Organizational decisions: Choices regarding development processes or delegating tasks to third parties.

    Best Practice: Keep explanations of these key decisions short. Describe how and why decisions were made in the context of the problem, quality goals, and constraints, then refer to more detailed sections for specifics.

  4. What is a Deployment View and when to use it

    master

    The Deployment View describes the technical infrastructure required to run your system and how software building blocks map to that infrastructure.

    Use this section to document:

    1. Technical Infrastructure: Geographic locations, environments (e.g., development, testing, production), computers, processors, network channels, and topologies.
    2. Mapping: How software building blocks (artifacts) are assigned to specific infrastructure elements.

    When to prioritize this view:

    • When your software runs as a distributed system across multiple computers, processors, servers, or containers.
    • When you are designing custom hardware, processors, or microchips.
    • When the underlying infrastructure significantly impacts system quality attributes or cross-cutting concerns.

    Note for Software Architects: You only need to cover the infrastructure elements necessary to demonstrate the deployment of your software building blocks. Hardware architects may provide more granular detail.

  5. What is the Deployment View and when to use it

    master

    The Deployment View describes the technical infrastructure on which the system runs. It maps software building blocks to specific infrastructure elements.

    What to document:

    • Infrastructure elements: Geographic locations, environments (development, testing, production), computers, processors, network channels, and topologies.
    • Mapping: How software components/artifacts are deployed onto the infrastructure elements.
    • Environments: If the system runs in multiple environments (e.g., Dev, Test, Prod), all relevant environments should be documented.

    When to use it:

    • When the software is a distributed system (multiple computers, processors, servers, or containers).
    • When custom hardware, processors, or chips are being designed.
    • When the infrastructure impacts the system or cross-cutting concerns.
    • UML Deployment Diagrams: The standard way to express this perspective. Use nested diagrams for complex infrastructure.
    • Alternative Diagrams: If hardware stakeholders prefer other formats, use any diagram type capable of showing nodes and infrastructure channels.
  6. Document architecture constraints

    master

    Use the 'Architecture Constraints' section to document any requirements that limit a software architect's freedom to design and implement solutions or development processes. These constraints may be system-specific or apply to entire organizations.

    • Use simple tables to list constraints along with explanations.
    • Categorize constraints to improve clarity. Common categories include:
      • Technical constraints: e.g., specific technologies, frameworks, or hardware requirements.
      • Organizational constraints: e.g., team structures or resource availability.
      • Political constraints: e.g., compliance, legal, or regulatory requirements.
      • Agreements: e.g., programming guidelines, version control standards, documentation requirements, or naming conventions.

    Motivation

    Defining constraints ensures architects know exactly where they have design freedom and where they must adhere to predefined boundaries. While constraints are often non-negotiable, identifying them clearly allows them to be used as subjects for negotiation if necessary.

  7. What to include in the Solution Strategy section

    master

    The Solution Strategy section provides a short summary and explanation of the fundamental decisions and strategies that shape the system architecture. These decisions serve as the cornerstones for the architecture and form the foundation for detailed implementation rules.

    When documenting your solution strategy, include:

    • Technology decisions: The core technologies chosen for the system.
    • Top-level decomposition: Decisions regarding architectural or design patterns (e.g., microservices, layered architecture).
    • Quality goal achievement: How the architecture is designed to meet key quality requirements (e.g., scalability, security, maintainability).
    • Organizational decisions: Relevant decisions such as the selected development process or the delegation of tasks to third parties.

    Best Practices:

    • Keep it short: Explanations of key decisions should be concise.
    • Motivate decisions: For every key decision, explain what was decided and why it was decided that way, specifically referencing the problem statement, quality goals, and key constraints.
    • Cross-reference: Refer to more detailed explanations in subsequent sections of the documentation.
  8. Document technical risks and technical debt in Section 11

    master

    Section 11 of the arc42 template is used to list known technical risks or technical debt, sorted by priority. This section serves as a communication tool for stakeholders (such as Project Managers and Product Owners) to understand the architectural risks and technical debt as part of the overall project risk analysis.

    Content requirements:

    • A list of risks and/or technical debt.
    • Proposed measures to minimize, mitigate, or eliminate these risks/debts.

    For more detailed guidance in English, refer to the official arc42 documentation: https://docs.arc42.org/section-11/[Risks and Technical Debt].

  9. Document architecture constraints in Section 2

    master

    Use Section 2 to document any requirements that limit the design and implementation decisions of software architects or the development process. These constraints may apply to a single system or extend across an entire organization.

    What to include:

    • Technical constraints: e.g., specific frameworks, hardware limitations, or required protocols.
    • Organizational constraints: e.g., team structures, required development methodologies, or resource availability.
    • Political or Convention-based constraints: e.g., coding standards, naming conventions, documentation requirements, or specific versioning policies.

    A table containing all identified constraints along with a clear explanation for each. If the list is extensive, categorize them into technical, organizational, or political/convention groups.

    For more detailed guidance, refer to the official arc42 documentation: https://docs.arc42.org/section-2/[Architecture Constraints].

  10. How the Building Block View works

    master

    The Building Block View provides a static decomposition of the system into building blocks (e.g., modules, components, subsystems, classes, interfaces, layers, etc.) and their dependencies. It is a mandatory part of arc42 documentation, acting like a 'floor plan' for your architecture.

    It uses a hierarchical approach of White Boxes and Black Boxes:

    • Level 1 (System White Box): A high-level view of the entire system. It includes an overview diagram, the motivation for the decomposition, and a Black Box description of all contained building blocks.
    • Level 2 (Sub-component White Boxes): Scales up specific building blocks from Level 1. It provides a White Box description (internal structure) for selected blocks and a Black Box description for their internal components.
    • Level 3+: Further refinement of Level 2 blocks. You can add more levels by copying the existing structure.

    Strategy: Prefer relevance over completeness. Only create detailed White Box descriptions for blocks that are important, unexpected, risky, complex, or unstable. Exclude simple, standard, or trivial parts of the system.

  11. What are cross-cutting concepts in arc42

    master

    Cross-cutting concepts (Наскрізні концепції) represent the fundamental rules, ideas, and decisions that apply to multiple parts of your system. They are essential for maintaining conceptual integrity (consistency and homogeneity) across the architecture and contribute significantly to the system's internal quality.

    Common topics for cross-cutting concepts include:

    • Domain models: Core models used throughout the system.
    • Architecture or design patterns: Structural rules applied across modules.
    • Technology usage rules: Specific ways a technology must be used.
    • Technical decisions: Fundamental technical choices that affect multiple components.
    • Implementation rules: Standards for how code should be written or structured.
    • Security/Safety: Concerns that cannot be isolated to a single building block.

    These concepts can be documented in various forms, such as conceptual documents, model fragments, implementation samples, or references to standard framework usage (e.g., how Hibernate is used for ORM).

  12. How to use the Glossary section in arc42

    master

    The Glossary (Глосарій) is used to define critical domain and technical terms to ensure all stakeholders have a shared understanding and to prevent the use of synonyms or homonyms.

    Structure

    • Format: Use a table with at least two columns: <Term> (Термін) and <Definition> (Визначення).
    • Multilingual Support: If working in multilingual teams, you can add additional columns to provide translations.

    Implementation

    In the .adoc file, define the glossary using an AsciiDoc table with the following column specification:

    [cols="e,2e" options="header"]
    |===
    |Term |Definition
    
    |<Term-1>
    |<Definition-1>
    |===