mansi75 opened a new pull request, #6315:
URL: https://github.com/apache/fineract/pull/6315
## Description
This PR adds developer documentation and supporting architecture analysis
for cross-feature boundary violations in Apache Fineract as part of
`FINERACT-2757`.
The documentation provides a measured view of dependencies between Fineract
features and packages and explains how those dependencies can be progressively
reduced as Fineract moves towards stronger module boundaries and an
event-driven architecture.
Instead of relying only on package naming conventions or manual analysis,
the architecture metrics are generated from compiled bytecode through the
Gradle build. The analysis produces both a package-level view, which acts as
the ground truth without making feature-grouping assumptions, and a
feature-level view that makes the dependency structure easier to understand and
document.
The documentation also distinguishes between different forms of coupling —
compile-time, database, infrastructure, and runtime/transactional coupling — so
that removing a Java dependency is not incorrectly treated as removing the
underlying domain or data relationship.
Changes in this PR:
- Add
`fineract-doc/src/docs/en/chapters/architecture/cross-feature-boundary-violations.adoc`
containing the cross-feature boundary violation analysis and developer
guidance.
- Add a reproducible architecture metrics pipeline based on
`io.github.usekylis.java-architecture-metrics`.
- Run the architecture analysis as a single aggregate scan across Java
modules so cross-module dependencies are retained.
- Generate both package-level and feature-level architecture reports.
- Add a feature classifier for producing the higher-level feature dependency
view.
- Add `tools/archmetrics_to_vega.py` for transforming generated architecture
metrics into documentation data and Vega-Lite visualisations.
- Add Vega-Lite visualisations for:
- Abstractness vs Instability.
- Distance from the Main Sequence.
- Cross-feature dependency matrix.
- Add
`fineract-doc/src/docs/en/chapters/architecture/generated-package-overview.adoc`,
providing a generated section for each measured package and a consistent
location for future architectural analysis.
- Add worked case studies covering different levels of cross-feature
coupling and possible remediation approaches.
- Add guidance for deciding which feature dependencies are appropriate
candidates for decoupling.
- Add documentation describing how cleaned module boundaries can be
protected from regression.
The architecture metrics, generated documentation, and diagram data can be
regenerated using:
```bash
./gradlew architectureMetricsReport
```
This PR primarily adds developer documentation and architecture-analysis
tooling. There are no REST API, database schema, or externally visible
behavioural changes.
Related JIRA: https://issues.apache.org/jira/browse/FINERACT-2757
## Checklist
Please make sure these boxes are checked before submitting your pull request
- thanks!
- [x] Write the commit message as per [our
guidelines](https://github.com/apache/fineract/blob/develop/CONTRIBUTING.md#pull-requests)
- [x] Acknowledge that we will not review PRs that are not passing the build
_("green")_ - it is your responsibility to get a proposed PR to pass the build,
not primarily the project's maintainers.
- [ ] Create/update [unit or integration
tests](https://fineract.apache.org/docs/current/#_testing) for verifying the
changes made. — N/A: this PR adds developer documentation and
architecture-analysis/build tooling rather than application behaviour. The
generated architecture reports and documentation are produced through the
Gradle architecture metrics task.
- [x] Follow our [coding
conventions](https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions).
- [ ] Add required Swagger annotation and update API documentation at
`fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm` with
details of any API changes — N/A: no API changes.
- [x] [This PR must not be a "code
dump"](https://cwiki.apache.org/confluence/display/FINERACT/Pull+Request+Size+Limit).
Large changes can be made in a branch, with assistance. Ask for help on the
[developer mailing list](https://fineract.apache.org/#contribute).
- [ ] If merging this PR resolves a JIRA issue, I will mark that issue as
resolved and set "Fix Version/s" appropriately.
Your assigned reviewer(s) will follow our [guidelines for code
reviews](https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]