diff --git a/README.md b/README.md index a3e20f4dbf..4145df7cd0 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,18 @@ General development docs: [development.md](./development.md). This includes the local FastAPI and Vite workflow, Docker Compose services, `.env` configuration, and more. +## Architecture Analysis + +[Deply](https://github.com/Vashkatsi/deply) provides an optional baseline for this template's pragmatic Active Record-style architecture. +It does not enforce Clean Architecture boundaries; the [verified recipe](https://vashkatsi.github.io/deply/doc/full-stack-fastapi-template.html) documents the scope and trade-offs. + +Run from the project root with the template's Python version: + +```bash +uvx --from deply==1.0.0 --python 3.14 deply validate --config=deply.yaml +uvx --from deply==1.0.0 --python 3.14 deply analyze --parallel --config=deply.yaml +``` + ## Release Notes Check the file [release-notes.md](./release-notes.md). diff --git a/deply.yaml b/deply.yaml new file mode 100644 index 0000000000..3d8a3b2e03 --- /dev/null +++ b/deply.yaml @@ -0,0 +1,81 @@ +deply: + paths: + - backend/app + + exclude_files: + - '^alembic/.*' + + layers: + - name: interface + collectors: + - type: bool + any_of: + - type: directory + directories: + - api + element_type: function + - type: directory + directories: + - api + element_type: class + - type: file_regex + regex: '^api/main\.py$' + element_type: variable + - type: file_regex + regex: '^main\.py$' + element_type: function + + - name: data + collectors: + - type: file_regex + regex: '^(crud|models)\.py$' + element_type: function + - type: file_regex + regex: '^(crud|models)\.py$' + element_type: class + + - name: infrastructure + collectors: + - type: bool + any_of: + - type: directory + directories: + - core + element_type: function + - type: directory + directories: + - core + element_type: class + - type: file_regex + regex: '^utils\.py$' + element_type: function + - type: file_regex + regex: '^utils\.py$' + element_type: class + + - name: bootstrap + collectors: + - type: file_regex + regex: '^(backend_pre_start|initial_data|tests_pre_start)\.py$' + element_type: function + + ruleset: + interface: + disallow_layer_dependencies: + - bootstrap + + data: + disallow_layer_dependencies: + - interface + - bootstrap + disallow_external_imports: + - fastapi + - starlette + + infrastructure: + disallow_layer_dependencies: + - interface + - bootstrap + disallow_external_imports: + - fastapi + - starlette