-
Notifications
You must be signed in to change notification settings - Fork 1
Project architecture
Our project architecture sketch delineates the structure and data flow of our web application. Let's delve into the intricacies:
The frontend constitutes the user interface, where users engage with our application. It encompasses the visual elements, such as web pages or mobile app screens.
On the server side, we have the backend, which serves as the foundation supporting frontend operations. It's inaccessible to end-users but is crucial for processing frontend requests. The backend is fully contained within a single Spring Boot application, but is logically divided between a Resource Server and an Authorization server, as the project uses the Oauth2 protocol for authentication and authorization.
The Resource Server contains the modules responsible for creating, persisting and manipulating data on behalf of the resource owner.
Incoming requests from the frontend are directed to the controller, which acts as an intermediary. It parses requests and dispatches them to appropriate backend services.
Requests originating from the frontend are often encapsulated into DTOs for efficient data transfer between processes. These DTOs streamline communication channels, enhancing performance.
Our backend service layer orchestrates the business logic of the application. It processes incoming data, executes algorithms, and interfaces with data models.
Data models represent the underlying structure of our application's data. They define how data is organized and manipulated within the system.
The repository serves as a data access layer, facilitating interactions between the service layer and persistent storage. It encapsulates data retrieval and storage operations.
Prior to executing requests, the frontend must authenticate itself through the authorization server. This is an OAuth2 authorization server, which authenticates request using the Authorization Code flow from the OAuth2 protocol. This means that the resource owner is directed to the authorization server for authentication, which allows them to be authenticated without exposing their credentials to the frontend client.
In summary:
- Frontend requests are routed to the backend via the controller.
- The service layer processes requests, interacts with data models, and performs business logic operations.
- Data models are stored and accessed through the repository.
- Authentication and authorization are enforced by the authorization server to ensure secure communication channels.
This architectural blueprint ensures systematic data handling and secure communication between frontend and backend components, fostering a robust and reliable web application infrastructure.