How harryho/ng-crm works
Main Components
• Browser/Client: Represents the user’s browser where the Angular app runs.
• Angular Application: This central block should be subdivided into several key areas:
• Layout/Structural Components: Include the header, sidebar (navigation), top-strip, and overall layout components.
• Feature Modules: Show the different pages like Dashboard, Customer, Order, Product, and various UI components. Each feature module (e.g., “customer”, “order”, “product”) should be represented as separate nodes.
• Shared Components & Directives: Indicate the shared module that includes the dialog component, validators, and common utilities.
• Components: Represent reusable components like blog-card, monthly-earnings, product-performance, recent-transactions, and sales-overview.
• Services: Include authentication, backend service (for both fake API and any simulated REST calls), core service, and navigation service as separate nodes that manage business logic and data flow.
• Models: Represent data structures and interfaces such as user models.
• Pipes: Include custom pipes like the filter pipes used to transform data.
• Assets & Styling: Although not “functional” in terms of logic, include SCSS and other assets which are vital for the UI/UX.
• External Tools/Services:
• Docker & Nginx: Represent the Docker container setup and the Nginx server configuration (as seen in the Dockerfile, nginx.conf and docker build/run instructions in the README).
• Angular CLI & Build Tools: Show the build and deployment pipeline, including npm commands, testing, and serving the application through CLI and Docker.
Relationships and Interactions
• Component Interaction:
• Layout components (header, sidebar, top-strip) act as the container for other components.
• Feature pages utilize shared components and services.
• Guards (like auth.guard.service.ts, customer-guard.service.ts, order-guard.service.ts, and product-guard.service.ts) manage route protection. Show them as decision points between routes.
• Data Flow:
• Services handle business logic and data fetching. Indicate that these services (authentication service, backend service) communicate with external/fake APIs.
• Models serve as the data contracts used between components and services.
• Build/Deployment Pipeline:
• Paths for development (ng serve, npm start) and production (build commands, Docker image build and deployment via Nginx).
Architectural Patterns & Design Principles
• Component-Based Architecture: Reflect how Angular organizes UI into reusable components.
• Service-Oriented Data Flow: Emphasize how services abstract business logic and handle interactions (even though currently connecting to a fake API).
• The use of CSS preprocessor (SCSS) and theming indicates a clear separation between logic and presentation, reinforcing modular design.
Technologies & Libraries
• Angular 19 & Angular CLI.
• Angular Material (for UI components and styling).
• RxJS (for reactive programming aspects, though not explicitly detailed, it's standard in Angular projects).
• Docker and Nginx for containerizing and serving the application, as indicated by the Dockerfile and nginx.conf.
• SCSS for structured and theme-based styling.