Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ __pycache__/
website/src/generated/
website/public/assets/building-block-logos/
website/public/assets/logos/
website/public/assets/reference-architecture-logos/
website/public/assets/*.json
.worktrees/

Expand Down
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ getting-started steps, and shared responsibility matrix.
### Conventions

- File name: `<cloud>-<capability>.md` (e.g. `azure-kubernetes.md`, `stackit-kubernetes.md`).
- Logo: a flat markdown architecture pairs with a sibling `<id>.png` (e.g. `azure-kubernetes.png`);
a directory-based one may ship its own `logo.png` or simply reuse `buildingblock/logo.png`.
Without a logo the website falls back to the logos of the architecture's cloud providers.
- `buildingBlocks[].path` must match a module path under `modules/` (e.g. `azure/aks`).
- The Markdown body should include a **Mermaid diagram** showing how blocks relate.
- Include a **shared responsibility matrix** (platform team vs. application team) with ✅ / ❌ emojis.
Expand All @@ -318,6 +321,8 @@ getting-started steps, and shared responsibility matrix.

- [ ] Markdown file in `reference-architectures/` with YAML front-matter
- [ ] `name`, `description`, `cloudProviders`, and `buildingBlocks` fields present
- [ ] Logo present — sibling `<id>.png` for a flat markdown architecture, `logo.png` or
`buildingblock/logo.png` for a directory-based one
- [ ] Every `buildingBlocks[].path` references an existing module in `modules/`
- [ ] Every `buildingBlocks[].role` has a one-sentence description
- [ ] Body includes: overview, architecture diagram, how-it-works, getting started, shared responsibilities
Expand Down
7 changes: 7 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ tasks:
desc: Run scorecard across all modules
cmds:
- node tools/scorecard/scorecard.mjs {{.CLI_ARGS}}

website:dev:
desc: Start the website dev server locally at http://localhost:4200/
dir: website
cmds:
- yarn install
- yarn start {{.CLI_ARGS}}
26 changes: 26 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ export interface ReferenceArchitecture {
cloudProviders: string[];
buildingBlocks: ReferenceArchitectureBuildingBlock[];
body: string;
// Public asset path of the architecture's own logo, null when it has none and consumers
// should fall back to the logos of its cloud providers.
logo: string | null;
sourceUrl: string | null;
// Set when the reference architecture ships its own meshstack_integration.tf and can be
// imported into meshStack directly, the same way a building block is imported.
Expand All @@ -245,6 +248,28 @@ export interface ReferenceArchitecture {
modulePath: string | null;
}

// Copies a reference architecture's logo into the website assets and returns its public path.
// A directory-based architecture may ship a logo.png of its own or simply reuse the one from its
// buildingblock/; a flat markdown architecture pairs with a sibling <id>.png.
function copyReferenceArchitectureLogoToAssets(id: string, codeDir: string | null): string | null {
const candidates = codeDir
? [path.join(codeDir, "logo.png"), path.join(codeDir, "buildingblock", "logo.png")]
: [path.join(refArchRoot, `${id}.png`)];

const sourcePath = candidates.find((candidate) => fs.existsSync(candidate));
if (!sourcePath) return null;

const refArchAssetsDir = path.resolve(
__dirname,
"website/public/assets/reference-architecture-logos"
);

fs.mkdirSync(refArchAssetsDir, { recursive: true });
fs.copyFileSync(sourcePath, path.join(refArchAssetsDir, `${id}.png`));

return `assets/reference-architecture-logos/${id}.png`;
}

// Parses a reference architecture from its front-matter/body markdown file.
// `codeDir`, when set, is the directory checked for a `meshstack_integration.tf` that makes
// this reference architecture importable, the same way a building block is imported.
Expand Down Expand Up @@ -284,6 +309,7 @@ function parseReferenceArchitecture(filePath: string, id: string, codeDir: strin
cloudProviders: data.cloudProviders || [],
buildingBlocks: data.buildingBlocks,
body,
logo: copyReferenceArchitectureLogoToAssets(id, codeDir),
sourceUrl,
integrationSourceUrl,
folderUrl,
Expand Down
Binary file added reference-architectures/azure-kubernetes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 0 additions & 107 deletions reference-architectures/stackit-hub-spoke/README.md

This file was deleted.

77 changes: 0 additions & 77 deletions reference-architectures/stackit-hub-spoke/buildingblock/README.md

This file was deleted.

This file was deleted.

Binary file not shown.
Loading
Loading