|
| 1 | +# Software Architecture Documentation with arc42 and C4 Model |
| 2 | + |
| 3 | +This repository provides an example of generating architecture documentation using the arc42 template and the C4 model, with the help of Structurizr CLI and Asciidoctor. The documentation includes various architectural views and diagrams, generated automatically using Docker and Docker Compose. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The repository demonstrates how to: |
| 8 | +1. Define architecture using Structurizr DSL. |
| 9 | +2. Generate PlantUML diagrams using Structurizr CLI. |
| 10 | +3. Generate HTML documentation using Asciidoctor. |
| 11 | +4. Serve the documentation using Nginx or GitHub Pages. |
| 12 | + |
| 13 | +## Prerequisites |
| 14 | + |
| 15 | +- Docker |
| 16 | +- Docker Compose |
| 17 | + |
| 18 | +## Usage |
| 19 | + |
| 20 | +Follow these steps to generate and serve the architecture documentation. |
| 21 | + |
| 22 | +### 1. Generate PlantUML diagrams |
| 23 | + |
| 24 | +Run the following command to generate PlantUML diagrams from the Structurizr DSL: |
| 25 | + |
| 26 | +```sh |
| 27 | +docker-compose run --rm generate-diagrams |
| 28 | +``` |
| 29 | +### 2. Generate HTML documentation |
| 30 | +Run the following command to generate the HTML documentation: |
| 31 | + |
| 32 | +````sh |
| 33 | +docker-compose run --rm generate-docs |
| 34 | +```` |
| 35 | +### 3. Serve the documentation |
| 36 | +Run the following command to serve the documentation using Nginx: |
| 37 | + |
| 38 | +````sh |
| 39 | +docker-compose up serve-docs |
| 40 | +```` |
| 41 | + |
| 42 | +### 4. View the documentation |
| 43 | +Open your browser and go to http://localhost:8080 to view the generated documentation. |
| 44 | + |
| 45 | +## GitHub Pages Demo |
| 46 | +You can view the demo of this documentation on GitHub Pages at the following [URL](https://<your-github-username>.github.io/<your-repository-name>/). |
| 47 | + |
| 48 | +## Explanation of Key Files |
| 49 | +- src/docs/structurizr/structurizr.dsl: Defines the architecture using Structurizr DSL. |
| 50 | +- src/docs/asciidoc/index.adoc: Main AsciiDoc file that includes other sections. |
| 51 | +- src/docs/asciidoc/sections/: Directory containing individual AsciiDoc section files. |
| 52 | +- docker-compose.yml: Docker Compose configuration to orchestrate the generation and serving of documentation. |
| 53 | + |
| 54 | +## Customization |
| 55 | +You can customize the Structurizr DSL file (structurizr.dsl) to reflect your own system's architecture. Similarly, you can edit the AsciiDoc files in the sections directory to include more detailed information about your system. |
| 56 | + |
| 57 | +## License |
| 58 | + |
| 59 | +This project is licensed under the MIT License - see the LICENSE file for details. |
| 60 | + |
0 commit comments