Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RVR06 committed Jun 13, 2024
0 parents commit e117523
Show file tree
Hide file tree
Showing 250 changed files with 9,645 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*.{dsl, dslf}]
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @rvr06
86 changes: 86 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# https://gohugo.io/hosting-and-deployment/hosting-on-github/

name: Build and deploy GitHub pages

on:
push:
paths:
- 'docs/**'
- '.github/workflows/gh-pages.yml'
branches:
- main # Set a branch to deploy
pull_request:

# Enable manual workflow triggering from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

env:
# Set the documentation root
documentation_root: './docs'

jobs:
build:
permissions:
contents: read
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ${{ env.documentation_root }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
lfs: 'true'

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '${{ env.documentation_root }}/package-lock.json'

- name: Install dependencies
run: npm ci

- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: 0.123.8
extended: true

- name: Build
run: hugo --minify

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{ env.documentation_root }}/public

deploy:
defaults:
run:
working-directory: ${{ env.documentation_root }}

if: github.ref == 'refs/heads/main'

# Add a dependency to the build job
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# IDE
.vscode/
.vs/

# Structurizr
**/.structurizr/
**/workspace.json

# HUGO
**/.hugo_build.lock
**/resources
**/public

# NPM
**/node_modules
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Contributing

Contributions from the community are welcome.
To better understand the code repository, see the [README](https://github.com/rvr06/c4-bootcamp/blob/main/README.md).
When contributing to this repository, please first discuss the change you wish to make by opening a [new issue](https://github.com/rvr06/c4-bootcamp/issues/new) or contributing to an [existing one](https://github.com/rvr06/c4-bootcamp/issues).

## Pull Request Process

* Branch must be prefixed e.g. `features/xxx`, `fixes/yyy` or `spikes/zzz`.
* Create a Pull Request and ensure to attach an existing issue for tracking.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Structurizr Limited

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
199 changes: 199 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
# BOOTCAMP

We introduced the concept of [architecture as code or code-first approach](https://rvr06.github.io/c4-bootcamp/docs/code). We took the opportunity to leverage [Structurizr tool suite](https://rvr06.github.io/c4-bootcamp/docs/code/#structurizr) to support the end-user journey. However, most of the journey focused on what one could expect to gain from a single model defined as code, without dwelling on how authoring this model for too long. It is now time to address this point.

## What will you learn from this course

Leveraging an hypothetical [requirement](./stage%2000/specs.md), this bootcamp will guide you over tiny stages to gradually define and refine a compelling `software model`. Alongside his journey, one will be exposed to multiple dimensions a `software model` should cover. Unfolding each stage will fuel the reader with insights regarding both the matching `structurizr` syntax and the underlying `C4` philosophy.

> The course is self-directed learning. You can do it at whatever pace you wish.
## How to get started

Here’s how the `C4 bootcamp` works.

### Use GitHub to Make Life Easy

This GitHub repository contains `workspaces` and other assets you will need to complete the bootcamp.

Thus, if you want to follow the bootcamp we recommend doing the following:

- Sign up for [GitHub](https://github.com), if you haven’t already.
- [Clone this repository](https://github.com/rvr06/c4-bootcamp.git) to your local machine.
- As you go through the project, keep a web browser tab open to the [c4 bootcamp](https://github.com/rvr06/c4-bootcamp/blob/main/README.md) so you can read all of the instructions clearly and easily.

### Bootcamp structure

`C4 bootcamp` consists of `17 stages`:

## [Stage 01](./stage%2001/README.md)

![](https://img.shields.io/badge/c4-workspace-c49060)
![](https://img.shields.io/badge/c4-model-c49060)
![](https://img.shields.io/badge/c4-views-c49060)
![](https://img.shields.io/badge/model-softwareSystem-0c7cba)
![](https://img.shields.io/badge/model-name-b2ccd6)
![](https://img.shields.io/badge/model-description-546e7a)

## [Stage 02](./stage%2002/README.md)

![](https://img.shields.io/badge/views-theme-c49060)
![](https://img.shields.io/badge/views-systemLandscape-c49060)
![](https://img.shields.io/badge/views-systemContext-0c7cba)

## [Stage 03](./stage%2003/README.md)

![](https://img.shields.io/badge/model-person-834187)
![](https://img.shields.io/badge/model-relationships-c49060)

## [Stage 04](./stage%2004/README.md)

![](https://img.shields.io/badge/c4-comment-cacaca)
![](https://img.shields.io/badge/model-tags-e4551d)
![](https://img.shields.io/badge/model-url-cacaca)
![](https://img.shields.io/badge/views-theme-c49060)

## [Stage 05](./stage%2005/README.md)

![](https://img.shields.io/badge/model-container-c92d39)
![](https://img.shields.io/badge/model-technology-4f9db8)
![](https://img.shields.io/badge/views-container-c92d39)

## [Stage 06](./stage%2006/README.md)

![](https://img.shields.io/badge/model-component-7ab648)
![](https://img.shields.io/badge/views-component-7ab648)

## [Stage 07](./stage%2007/README.md)

![](https://img.shields.io/badge/views-dynamic-c49060)
![](https://img.shields.io/badge/views-animation-c49060)

## [Stage 08](./stage%2008/README.md)

![](https://img.shields.io/badge/model-deploymentEnvironment-ee5f8a)
![](https://img.shields.io/badge/model-deploymentNode-3aa6dd)
![](https://img.shields.io/badge/model-softwareSystemInstance-0c7cba)
![](https://img.shields.io/badge/model-containerInstance-c92d39)
![](https://img.shields.io/badge/views-deployment-ee5f8a)

## [Stage 09](./stage%2009/README.md)

![](https://img.shields.io/badge/model-deploymentGroup-fcc438)
![](https://img.shields.io/badge/model-infrastructureNode-19967d)
![](https://img.shields.io/badge/model-healthCheck-cacaca)

## [Stage 10](./stage%2010/README.md)

![](https://img.shields.io/badge/views-branding-c49060)
![](https://img.shields.io/badge/views-theme-c49060)

## [Stage 11](./stage%2011/README.md)

![](https://img.shields.io/badge/views-filtered-c49060)

## [Stage 12](./stage%2012/README.md)

![](https://img.shields.io/badge/c4-!constant-c49060)
![](https://img.shields.io/badge/model-perspectives-c49060)

## [Stage 13](./stage%2013/README.md)

![](https://img.shields.io/badge/c4-!identifiers-c49060)
![](https://img.shields.io/badge/c4-!impliedRelationships-c49060)

## [Stage 14](./stage%2014/README.md)

![](https://img.shields.io/badge/c4-!docs-c49060)
![](https://img.shields.io/badge/markdown-embed-000000)

## [Stage 15](./stage%2015/README.md)

![](https://img.shields.io/badge/model-group-c49060)

## [Stage 16](./stage%2016/README.md)

![](https://img.shields.io/badge/model-!include-c49060)
![](https://img.shields.io/badge/model-ref-c49060)
![](https://img.shields.io/badge/views-!include-c49060)

## [Stage 17](./stage%2017/README.md)

![](https://img.shields.io/badge/c4-extends-c49060)
![](https://img.shields.io/badge/model-ref-c49060)

And a bunch of `bonus stages`:

## [Bonus Stage 01](./bonus%20stage%2001/README.md)

![](https://img.shields.io/badge/c4-hack-000000)

## [Bonus Stage 02](./bonus%20stage%2002/README.md)

![](https://img.shields.io/badge/model-description-546e7a)
![](https://img.shields.io/badge/model-url-cacaca)
![](https://img.shields.io/badge/views-theme-c49060)

## [Bonus Stage 03](./bonus%20stage%2003/README.md)

![](https://img.shields.io/badge/model-deploymentEnvironment-ee5f8a)
![](https://img.shields.io/badge/model-deploymentNode-3aa6dd)
![](https://img.shields.io/badge/model-infrastructureNode-19967d)
![](https://img.shields.io/badge/model-softwareSystemInstance-0c7cba)
![](https://img.shields.io/badge/model-containerInstance-c92d39)
![](https://img.shields.io/badge/views-deployment-ee5f8a)
![](https://img.shields.io/badge/views-theme-c49060)

## [Bonus Stage 04](./bonus%20stage%2004/README.md)

![](https://img.shields.io/badge/c4-hack-000000)
![](https://img.shields.io/badge/model-softwareSystem-0c7cba)
![](https://img.shields.io/badge/model-tags-e4551d)
![](https://img.shields.io/badge/model-url-cacaca)
![](https://img.shields.io/badge/views-systemLandscape-c49060)
![](https://img.shields.io/badge/views-filtered-c49060)
![](https://img.shields.io/badge/views-theme-c49060)

### Stage Layout

Each stage contains the following structure:

```cs
╠══ Stage xx
║ ╠══ README.md // step-by-step recipe
║ ╠══ theme*.dslf // extra theme(s) definition (optional)
║ ╚══ workspace.dsl // completed lesson workspace
```

Each `C4 bootcamp` stage contains a `README` which explains the following:
1. The `Structurizr` concepts (eg ![](https://img.shields.io/badge/model-container-c92d39)) and tools you will be applying in the lesson, along with links to any relevant documentation or examples.
1. Step-by-step instructions (✏️) on how to modify the `workspace` to match the expected one at the end of each lesson. Feel free to jump from ✏️ to ✏️, if you want to quickly unfold the stage.
1. If you get stuck following the step-by-step instructions, each lesson contains check points (📙) and a completed `workspace.dsl` (📘) file that shows the expected output. You can compare this against your own code and see what you need to do differently.

Each stage enrichs the previous one, allowing one to tailor `software model` from scratch up to completion. If you are interested on an intermediate stage and don't want to unfold the whole journey prior to it, just take the previous state (`*.dsl` files) as your starting point. Eg, if you would like to exercise `stage 07`, just copy & paste `*.dsl` from `stage 06`, and engage.

### When you're doing the lessons...

A few things to bear in mind when you are following the step-by-step instructions:

1. **Don't just copy and paste** the code shown in the lesson's `README`. You'll retain and learn all of the built-in `Structurizr` functions if you type out the code as it's shown.
1. You might be required to fill in some blanks during individual lessons. Part of helping you learn `Structurizr` involves leaving some parts of the exercise up to you - if you ever feel lost, always check the contents of the `workspace.dsl` for that lesson.
1. Don't be afraid to ask questions.

### Docs

We will provide explanations of all key concepts throughout each lesson, but of course, you should bookmark (and feel free to use!) the [C4 documentation](https://supreme-happiness-8f0f8e3c.pages.github.io/)

### Tools / prerequisites

This course expects the following:
- A Github account and basic knowledge of Git
- An up to date installation of VS Code editor
- An up to date `Cornifer` extension
- An up & running docker daemon

See [here](./stage%2000/prereq.md) for details.

## Time to engage

[Here we go](./stage%2001/README.md)
Loading

0 comments on commit e117523

Please sign in to comment.