How longhuu100/open-cdp-backend works
Project Type & Purpose
• This project is the backend service (“Open-Cdp-Backend”) for an enterprise application that integrates multiple subsystems. The README lists separate modules for Marketing, Sales, Production, Warehouse, and Customer Care, meaning it must process a variety of business workflows and data interactions.
• The system is built in Java (as seen in the “src/main/java” folder structure) and deployed as a single deployable JAR via Maven (pom.xml gives build details).
Key Components
a. Application Entry Point and Configuration:
– Represent the main startup class (CdpStart.java) as the entry point.
– Include configuration components such as “HibernateConfiguration”, “ResourceConfig”, “ConfigUtil”, and the external configuration files (application.properties, custom.properties, log4j2.xml) to indicate how properties and logging are managed.
b. Web Layer / Controllers:
– Indicate exception handling (ExceptionController & WebException) and the base controller that might share common request processing logic.
c. Service/Business Logic Layer:
d. Data Access / DAO / Repositories:
e. Domain Models / Entities Layer:
– Illustrate that the model layer contains the entity classes representing business objects (e.g., CustomerOrder, Product, Warehouse, User, etc.). These entities are used across DAO/repositories and service layers.
f. Security & Authentication:
– Include authentication components (JwtAuthTokenFilter, JwtProvider, SecurityConfiguration, custom authentication entry points) as a distinct component that secures the application.
g. Utility & Support Modules:
– Represent common utilities (date, JSON, SQL Builder, file uploads, etc.) as support services that are used across the application.
h. Orchestration / Messaging:
– The “orchestration” package is a key functional module providing PubSub capabilities (e.g., EventCenter, Publisher, Subscriber, Message), which may coordinate events internally or with external systems.
i. External Dependencies:
– Show the “public” directory for static files and email templates (templates for invoices and order notes) used for user notifications or reporting.
– Consider external APIs or other third-party integrations if needed (based on the nature of modules like marketing or customer service).
Architectural Patterns and Design Principles
– The separation of concerns is evident in the layered architecture: Controllers (presentation), Services (business logic), DAOs/Repositories (data access), and Domain Models.
– It is also apparent that RESTful APIs are likely used (given the controller folders) to interact with client-side applications.