Front-End Composition Architecture Plan #600
MSzalowski
started this conversation in
Ideas
Replies: 1 comment
-
First step, draft PR #887 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Front-End Composition Architecture Plan
This document’s sole purpose is to capture the discussions happening during architecture strategy planning. It describes the problem, proposed solution and the direction in which a well-governed architecture and technical designs should move forward. Credits for all of them goes to Intesect's Solutions Architect - Igor Velickovic @kickloop 🎉
This is an initial capture that stays open to refinement and further discussion.
Background for the recomposition
Current architecture of the application characterized by its monolithic nature, confronts several critical problems that impede our ability to deliver governance community tools in separation and by different teams.
Lack of modularity and scalability
The monolithic architecture of our application inherently lacks modularity, leading to tightly coupled components and dependencies. This intertwined nature inhibits scalability, as any changes or updates necessitate modifications to the entire application which enforces different teams to contribute inside the existing monolithic codebase with the increasing risk of desynchronization of the dependencies and overflowing requirements.
As application grows in complexity and scope becomes increasingly cumbersome to manage, scale and adapt new functionalities.
Limited team autonomy and collaboration
With the current structure, different teams are constrained by shared codebases and dependencies, resulting in limited autonomy and collaboration. Teams face challenges in independently developing and deploying features, as changes to shared components may inadvertently impact other parts of the application. This lack of autonomy stifles innovation and slows down the development process, as teams must coordinate closely to avoid conflicts and regressions. It is still recommended that government tools share style guides and the contributing approach, but it should not be restricted by the way system is designed, but enforced by the community standards.
Deployment complexity and risk
The monolithic nature of our application introduces deployment complexities and risks, as changes to any part of the codebase necessitate deploying the entire application. This monolithic deployment approach increases the likelihood of introducing bugs or issues, as changes to unrelated components may inadvertently affect the application's behavior. Moreover, the lengthy deployment process further exacerbates downtime and disrupts user experience, undermining our ability to deliver timely updates and enhancements.
Hindered Technology Adoption and Innovation
In a monolithic architecture, adopting new technologies or frameworks becomes inherently challenging, as any changes impact the entire application. This reluctance to embrace emerging technologies stifles innovation and impedes our ability to stay competitive in a rapidly evolving landscape. Furthermore, the monolithic architecture may lock us into outdated technologies, limiting our agility and adaptability to market trends and customer needs.
Cumbersome Testing and Maintenance
Testing and maintaining a monolithic application pose significant challenges due to its interconnected nature. Comprehensive testing becomes laborious and time-consuming, as changes to one component may necessitate retesting the entire application. Moreover, maintaining code quality and addressing technical debt become increasingly challenging as the codebase grows in size and complexity, leading to decreased developer productivity and increased risk of software defects.
In light of these challenges it is imperative to reevalute our application architecture and transition towards a more modular and scalable approach.
Focus Areas
1. Repository Structure
2. GovTool (Frontend Root Package) Responsibility
3. Tool (Frontend Sub-package) Application Composition
4. Independend Deployment
5. Separation of Concerns
6. Open Source Considerations
Current architecture overview
(As of 29th march 2024)
On the diagram above it is visible that GovTool Frontend is a monolithic application that shares its components directly from each other which indicates that changing anything in the UI component would have a direct impact on all the application modules.
Current repository structure
Where
src
includes the code of the single monolithic app.Proposed architecture overview
On the diagram above:
on its own.
metadata validation
service)Proposed repository structure
As the migration from a current monolithic architecture to a composite one might be time-consuming, not only because of the implementation but also because of the synchronization with all the GovTool builders and the selection of appropriate tools to wrap up the micro frontends composition my proposition for the repository structure is:
Notice that in above structure we do not have any globally shared package as
govtool-design-system
as it can easily be handled using the public npm package which would be used across the apps.where any directory inside
govtool-wrapper
is separate frontend application (later on, they should be able to be exposed to any repository in the world and placed anywhere in the repository - that is 1st stage for the easiest migration)govtool-wrapper
is the application on its own that wraps thesub-packages
as components and eg.: the routing of the react based wrapper would be:Important - focus on the imports declaration as it shows how the separation of concerns might look like (all the @govtool/* libraries)
Some of the possible toolings (random order)
Your feedback shapes the future of our project! Share your insights and suggestions to help us create a better experience for everyone. Together, we can drive innovation and build a community-driven platform that meets the needs of all users.
Beta Was this translation helpful? Give feedback.
All reactions