How bogdan016/onlinestore-website works
Main Components
• Frontend Application: Built with Angular, this component includes all UI elements (e.g., product listing, product details, cart, checkout, search, etc.) and interacts with the backend via REST calls.
• Backend Application: A Spring Boot application using Java and Maven. It implements the core business logic, exposes REST endpoints (as seen from the configuration package with RestConfig.java), and connects to the persistence layer.
• Database: A MySQL database (hinted by the “countries.sql” file and the use of MySQL in the README) that stores entities like Country, County, Product, and ProductCategory.
Relationships and Interactions
• The Angular frontend communicates with the backend Spring Boot application via REST APIs.
• The backend acts as the intermediary layer where controllers (likely inferred though not directly visible) handle incoming requests, use DAO and repository classes to fetch or modify data, and then reply to the frontend.
• The backend interacts with the MySQL database where entity data is stored and managed.
• Additionally, the configuration files (such as Spring’s application.properties) indicate database connectivity and other runtime settings.
Architectural Patterns and Design Principles
• Client-Server (Full-Stack) Separation: The project clearly separates the Angular frontend from the Spring Boot backend.
• MVC or Repository Pattern on the backend: The file structure shows separate packages for entities, DAO/repositories, and configuration, which is indicative of standard enterprise architectures.
• Modular Component Design: In the frontend, components like product-list, product-details, cart-status, etc., are well organized, emphasizing reusability.