How hodinhtuankiet/zoo-hnv-demo works
Main Components
• Frontend (HNV-Demo-FE): This module is responsible for presenting the user interface. It contains HTML pages, JavaScript controllers and templates, CSS assets, and many third‐party libraries (for example, Bootstrap, jQuery variants, datatables, etc.). Its directory structure is highly modular – with folders representing groups, login, user, avatar upload flows, etc.
• Backend (HNV-Demo-BE): This module is built in Java (with Spring Boot–like structure as evidenced by files such as SprB_App, SprB_CfgSecurity, etc.). Its layered package structure shows clear separation into API controllers (e.g., in com/hnv/api/main), service layers for business logic (in com/hnv/api/service, with separate “priv” and “publ” partitions), and database access components (in com/hnv/db). Also, configuration files and many library JARs (Hibernate, Spring, JasperReports, and Google libraries among others) indicate that the backend manages business logic and persistence.
• Database (and/or external resources): Although not explicitly shown as a separate file, the existence of Hibernate configuration files and database-related packages implies that a relational database is used. Some flows like “Upload Avatar” may also involve external storage or file-handling services.
• External Libraries & Tools: There are many included third-party libraries that affect both the client‐(e.g., for UI controls, file inputs, date pickers) and server sides (e.g., Hibernate, Spring, JasperReports).
Relationships and Data Flow
• Inside the “Backend” block, further subdivide into layers:
– A “Controller/API Layer” (mapping to the com/hnv/api/main package) that handles HTTP requests.
– A “Service/Business Logic Layer” (found in packages like com/hnv/api/service) that processes the business workflow (for example, processing a “Delete” or “Modify” request).
– A “Data Access Layer” (com/hnv/db packages) that interacts with the underlying database.
1. The UI component sends an HTTP/JSON request to the backend’s API controller.
2. The controller invokes service logic to process the request.
3. The service might interact with the database (or file storage) through the DAO/persistence layer.
4. The server then responds back to the client with a JSON (ShareJSON response) confirming the operation.
Architectural Patterns
• Layered/MVC architecture on the backend. Indicate that controllers forward the requests to service beans which in turn use repository/DAO classes (mapping to Hibernate-based ORM).
• For the frontend, note the separation of concerns between view (HTML/CSS/templates) and application logic (JavaScript controllers and middleware).
• Clear integration points where the frontend and backend interact via HTTP APIs (using JSON handling as mentioned in the README).
• That the system uses common design principles like modularity, separation of concerns, and reuse via external libraries.