Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
99d22a9
chore: modernize tooling infrastructure
ChS23 Feb 7, 2026
c3285f5
refactor: generic entities for loaders & generators
ChS23 Feb 7, 2026
858a9bb
chore: remove workspace_globrix.json
ChS23 Feb 7, 2026
b0087f9
refactor: restructure to target ADR layout and extract validation rules
ChS23 Feb 7, 2026
376aaf6
chore: update build config and dependencies
ChS23 Feb 8, 2026
607f1ac
feat: add code generators for PlantUML and Kubernetes
ChS23 Feb 8, 2026
283960e
refactor: update loaders and add PlantUML syntax adapter
ChS23 Feb 8, 2026
f065eaa
feat: add validation rules, auto-fixes, and SourceSyntax interface
ChS23 Feb 8, 2026
995a774
feat: add CLI with check, generate, and init commands
ChS23 Feb 8, 2026
1fd118d
refactor: update package exports
ChS23 Feb 8, 2026
58f29da
feat: implement apiGateway and stableDependencies rules
ChS23 Feb 8, 2026
528ad3f
refactor: reorganize examples and add rules demo
ChS23 Feb 8, 2026
6f0b4cb
docs: update patterns.md links
ChS23 Feb 8, 2026
87a373f
refactor: extract Violation type to rules/types.ts
ChS23 Feb 8, 2026
d58b029
refactor: normalize Container.tags to string[]
ChS23 Feb 8, 2026
b85a739
refactor: introduce rule registry
ChS23 Feb 8, 2026
f9c266c
feat: add config validation with valibot
ChS23 Feb 8, 2026
f56e20b
chore: prepare package for npm publish
ChS23 Feb 14, 2026
88a275a
fix: resolve all ESLint errors and warnings
ChS23 Feb 14, 2026
f2efbeb
refactor: v2 audit fixes
ChS23 Feb 14, 2026
68b47ec
docs: render PlantUML files
ChS23 Feb 14, 2026
734e274
refactor: restructure examples per ADR target architecture
ChS23 Feb 14, 2026
e796790
feat: extend examples with crud, cohesion and kubernetes generation
ChS23 Feb 14, 2026
e0919e5
docs: update documentation for v2 — CLI, links, roadmap
ChS23 Feb 14, 2026
2980fc3
fix: add CLI shebang, npm keywords, bump to 2.0.2
ChS23 Feb 14, 2026
87c0409
fix: pass explicit format in check test to avoid CI env leak
ChS23 Feb 14, 2026
ed6609c
docs: update commonReuse TODO to match patterns.md definition
ChS23 Feb 14, 2026
5c018e8
feat: add Structurizr DSL syntax and fix-write workflow
ChS23 Mar 11, 2026
884146b
feat: add ecommerce-structurizr example
ChS23 Mar 11, 2026
6c509ab
fix: improve fix rules quality and correctness
ChS23 Mar 11, 2026
4c1444a
refactor: eliminate hardcoded type strings across codebase
ChS23 Mar 11, 2026
e72e0e5
refactor: add Structurizr DSL vocabulary constants
ChS23 Mar 11, 2026
83014e0
fix: add aclSuffix to config schema for acl rule options
ChS23 Mar 11, 2026
b5be2ca
test: add negative and edge cases for check CLI command
ChS23 Mar 11, 2026
21a5f2d
test: add missing edge cases for analyze, generate and init CLI commands
ChS23 Mar 11, 2026
b203c4e
test: add missing edge cases across rules and loaders
ChS23 Mar 11, 2026
ad3e8c1
perf: replace O(n²) patterns with Set-based O(1) lookups
ChS23 Mar 11, 2026
09ca8c8
test: add nested boundary coverage for analyzeArchitecture
ChS23 Mar 11, 2026
5503a0f
test: cover out-of-parent coupling attribution in nested boundaries
ChS23 Mar 11, 2026
fc2aa6d
feat: add --config flag to check, analyze and generate commands
ChS23 Mar 11, 2026
cf02df8
refactor: simplify check and generate commands
ChS23 Mar 11, 2026
bc55a85
perf: write kubernetes output files in parallel
ChS23 Mar 11, 2026
ef3c937
perf: use Map for O(1) rule lookup in generateFixes
ChS23 Mar 11, 2026
2c929cb
feat: add aact.config.ts to ecommerce-structurizr CLI example
ChS23 Mar 11, 2026
ee055fc
feat: improve CLI output, fix Structurizr loader naming, boundary-awa…
ChS23 Mar 11, 2026
1abf1ca
fix: preserve source indentation when applying edits
ChS23 Mar 11, 2026
0fbdae7
feat: add auto-fix for crud rule
ChS23 Mar 11, 2026
6014791
refactor: extract boundary-aware redirect logic into shared boundaryU…
ChS23 Mar 11, 2026
ed36c30
fix: resolve TypeScript errors found by tsc --noEmit
ChS23 Mar 11, 2026
caac20d
feat: auto-detect naming convention for fix-generated names
ChS23 Mar 11, 2026
8b529b6
fix: eliminate sonarjs warnings in fix and fixCrud
ChS23 Mar 11, 2026
3bdabfb
test: add cross-boundary, naming convention and boundary utils coverage
ChS23 Mar 11, 2026
5d52db4
feat: add Common Reuse Principle rule and ADR
ChS23 Mar 20, 2026
b4d2387
chore: add .claude/ to gitignore
ChS23 Mar 20, 2026
fb87415
fix: correct relative links in ADRs
ChS23 Mar 20, 2026
82ac17e
feat: add Common Reuse Principle PlantUML example
ChS23 Mar 21, 2026
a51dbd2
docs: render PlantUML files
ChS23 Mar 21, 2026
36b4afc
chore: bump version to 2.1.0
ChS23 Mar 21, 2026
43fc264
docs: add npm version badge to README
ChS23 Mar 21, 2026
ad02680
fix: add jiti dependency for .ts config loading, bump 2.1.1
ChS23 Mar 21, 2026
7ce7360
refactor: reduce cognitive complexity in checkCommonReuse
ChS23 Mar 21, 2026
f1cfba5
chore: add keywords, types export and sideEffects to package.json
ChS23 Mar 21, 2026
a5bb388
fix: add default export fallback in package.json, bump 2.1.2
ChS23 Mar 31, 2026
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
16 changes: 0 additions & 16 deletions .eslintrc.json

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ on:
push:
branches-ignore:
- master
- main

jobs:
plantuml:
name: plantuml
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: install java
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: temurin
Expand All @@ -31,9 +32,9 @@ jobs:
run: java -jar /opt/plantuml.jar -tsvg "./resources/architecture/*.puml"

- name: push svg diagrams
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs: render PlantUML files"
file_pattern: ./resources/architecture/*.svg
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
19 changes: 11 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- name: yarn install, build and test
run: |
yarn
yarn test
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test
16 changes: 2 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ web_modules/
# Optional npm cache directory
.npm

# npmrc config
.npmrc

# Optional eslint cache
.eslintcache

Expand All @@ -88,9 +85,6 @@ web_modules/
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
Expand Down Expand Up @@ -131,13 +125,6 @@ dist
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### https://github.com/github/gitignore/blob/master/Global/Linux.gitignore

*~
Expand Down Expand Up @@ -215,4 +202,5 @@ package-lock.json
**/.vs/*
**/bin/*
**/obj/*
**/nppBackup/*
**/nppBackup/*
.claude/
5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit "$1"
pnpm commitlint --edit "$1"
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
7 changes: 7 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
dist/
ADRs/
ModularMonolith/
patterns.md
roadmap.md
README.md
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public-hoist-pattern[]=@commitlint*
public-hoist-pattern[]=commitlint*
1 change: 0 additions & 1 deletion .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
trailingComma: all
endOfLine: auto
13 changes: 13 additions & 0 deletions ADRs/ADR template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
# <Название>

## Контекст

<описание контекста, в рамках которого применяется решение>

## Краткое описание решения и его обоснование

### Схема

<архитектурная схема решения>

### Решение

<описание решения>

### Обоснование

<обоснование решения>

## Как покрыть тестами

<описание механизма тестирования>

### Примеры тестов

<ссылки на тесты>
7 changes: 6 additions & 1 deletion ADRs/Anti-corruption Layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
Микросервисная архитектура с выделенным периметром продукта, имеющим ряд интеграций с внешними системами (другими системами предприятия и/или внешними решениями)

## Краткое описание решения и его обоснование

### Схема

![image](https://github.com/Byndyusoft/aact/assets/1096954/970dcf43-d347-4294-9be0-03f042b85f8b)

### Решение
Expand All @@ -19,11 +21,14 @@
## Как покрыть тестами

1. Помечаем на архитектуре соответствующие микросервисы признаком "Adapter"

```
Container(goods_adapter, “Goods ACL", "NestJS", $tags="adapter")
```

2. Проверяем, что связи с внешними системами имеют только сервисы с таким признаком

### Примеры тестов

[only acl can depence from external systems](https://github.com/Byndyusoft/aact/blob/721edde3767dc0e51d19c80c3b6adba9fbf7b007/test/architecture.test.ts#L111C7-L111C49)
- [unit-тест правила ACL](../test/rules/acl.test.ts)
- [пример на banking-plantuml](../examples/banking-plantuml/rules.test.ts) — `ACL — only acl-tagged containers depend on externals`
51 changes: 51 additions & 0 deletions ADRs/Common Reuse Principle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Common Reuse Principle

## Контекст

Микросервисная архитектура с несколькими ограниченными контекстами (bounded contexts), микросервисы которых взаимодействуют между контекстами через API.

## Краткое описание решения и его обоснование

### Схема

#### Без нарушений

| Все публичные используются (C и D) | D приватный — нарушения нет |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| <img src="https://github.com/user-attachments/assets/c8b44494-5ce1-4f23-a7c4-840c72fbdfad" width="300"> | <img src="https://github.com/user-attachments/assets/4322cff5-43af-4739-a2f5-27f7bd2a15e4" width="300"> |

Три контекста. Z использует только C, но D приватный — нарушения нет:

<img src="https://github.com/user-attachments/assets/6b8dd2cb-31a1-4aa9-8eea-6cc082d217d6" width="500">

#### С нарушениями

| Контекст 3 использует D, но не C | Контекст 1 использует C, но не D |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| <img src="https://github.com/user-attachments/assets/1ac522ab-d1fd-4ee0-be41-b96e01d87c09" width="400"> | <img src="https://github.com/user-attachments/assets/1f323601-9d3a-4949-b217-e48ebe515776" width="400"> |

### Решение

Если контекст зависит хотя бы от одного публичного микросервиса другого контекста — он должен использовать все публичные микросервисы этого контекста.

Публичный микросервис — тот, чей API вызывается извне контекста. Приватный — используется только внутри, при проверке не учитывается.

### Обоснование

Адаптация принципа Common Reuse (Роберт Мартин) к микросервисам. Частичное использование публичного API контекста — сигнал, что граница проведена неудачно или зависимость лишняя. На уровне инфраструктуры рекомендуется ограничивать сетевой доступ извне контекста только до публичных микросервисов.

## Как покрыть тестами

1. Определяем публичные микросервисы каждого контекста — те, у которых есть входящие связи от микросервисов из других контекстов

2. Для каждой пары контекстов (потребитель → поставщик): если потребитель использует хотя бы один публичный микросервис поставщика — проверяем, что использует все

```
Контекст 2: публичные [C, D]
Контекст 1 → использует C, D — ✅ все публичные
Контекст 3 → использует D — ❎ не использует C
```

### Примеры тестов

- [unit-тест правила Common Reuse](../test/rules/commonReuse.test.ts)
11 changes: 10 additions & 1 deletion ADRs/Database per CRUD-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
Микросервисная архитектура с выделенными [мастер-системами](https://byndyusoft.com/blogs/masterdata), данные каждой из которых хранятся в отдельной БД

## Краткое описание решения и его обоснование

### Схема

![image](https://github.com/Byndyusoft/aact/assets/1096954/70b0a5e2-e78c-41c3-bd3c-7d12303ca31a)

### Решение
Expand All @@ -20,21 +22,28 @@
## Как покрыть тестами

1. Помечаем на архитектуре соответствующие микросервисы признаком "CRUD" (или Repository)

```
Container(task_repository, “Task Repository", "NestJS", $tags="crud")
```

2. Проверяем, что у таких сервисов нет исходящих связей, кроме единственной БД

```
Rel(task_repository, task_db, "") — ✅ т.к. исходящая связь в БД
Rel(camunda, task_repository, "") — ✅ т.к. входящая связь
Rel(task_repository, invoice_acl, "") — ❎ т.к. исходящая связь не в БД
```

3. Проверяем, что у БД нет никаких связей помимо единственной с crud-микросервисом

```
Rel(task_repository, task_db, "") — ✅ т.к. микросервис task_repository помечен тэгом "crud"
Rel(invoice_acl, task_db, "") — ❎ т.к. микросервис invoice_acl непомечен тэгом "crud"
Rel(invoice_repository, task_db, "") — ❎ т.к. выше уже есть одна связь у данной БД, хоть и invoice_repository помечен тэгом "crud"
```

### Примеры тестов
TBD

- [unit-тест правила CRUD](../test/rules/crud.test.ts)
- [пример на banking-plantuml](../examples/banking-plantuml/rules.test.ts) — `CRUD — only repo-tagged containers access databases`
Loading