C4 model of the Wattnet software architecture: the open-source application itself (dashboard, API, core engine, forecast engine, storage and data). This repository contains diagrams and code (Structurizr DSL) that document the software's structure, components, and interactions across multiple levels of abstraction.
The architecture is organized into four main levels:
- Context Diagram: Provides a high-level view of the system and its interactions with external entities.
- Container Diagram: Breaks down the system into its main containers (applications, services, databases, etc.) and shows how they interact.
- Component Diagram: Details the internal structure of each container, showing the components and their relationships.
- Code Diagram: Provides a detailed view of the code structure, including classes, interfaces, and their interactions. (Not included in this repository)
The diagrams are created using the C4 model, which emphasizes clarity and simplicity in representing software architecture. The Structurizr DSL code allows for easy maintenance and updates to the diagrams as the system evolves.
The diagrams can be viewed and edited interactively using Structurizr Lite. From the root of the repository, run:
docker run -it --rm \
-p 8080:8080 \
-v "$(pwd)/dsl:/usr/local/structurizr" \
structurizr/lite:2024.12.07Then open http://localhost:8080 in your browser. Structurizr Lite watches dsl/workspace.dsl for changes and keeps dsl/workspace.json in sync automatically.
/diagrams: Contains the generated diagrams in various formats (PNG, SVG, etc.)./dsl: Contains the Structurizr DSL code used to generate the diagrams.model.dsldescribes the software,styles.dslits look, andworkspace.dslthe views and puts them together. The model and the styles are plain fragments so that other workspaces can include them./docs: Contains documentation on architectural decisions, design fundamentals, and other relevant information.
Each visual property says one thing and is never reused for another.
| Property | Meaning |
|---|---|
| Fill color | The C4 level and who owns it: person #143262, system #1D488C, container #5374A7, component #9DB2D0. What is not ours (external systems and applications) is the darkest, #0B1C38. |
| Shape | What it is: a person, a box for a process or service, a cylinder for a database, a browser window for a web interface, a light green folder for data in files, a lime green folder for a repository. |
This repository is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
See the LICENSE file for more details.
This work was developed within the GreenDIGIT project, funded by the European Union's Horizon Europe research and innovation programme under grant agreement No. 101131207, and by the Swiss State Secretariat for Education, Research and Innovation (SERI).

