How jose220315/sales-date-prediction-web works
Project type and purpose
• This is a full-stack, server-side rendered (SSR) Angular application whose primary purpose is to manage customers and orders and to predict the next sales date via interactive D3.js charts. The frontend uses Angular 19 + TypeScript and SCSS; the server side uses Express.js (in server.ts and main.server.ts) to deliver SSR and to proxy or serve API requests.
File structure
• Top-level files:
• angular.json, tsconfig*.json → Angular build & compilation
• package.json / package-lock.json → dependencies & scripts
• server.ts, src/main.server.ts → Express SSR entrypoint
• public/ → static assets
• src/app:
• app.component.* + app.routes.* + app.config.* → root component, routing & environment config
• chart/ → D3-based visualization component
• customers/, orders/ → feature modules & dialogs (NewOrderDialog, OrdersDialog)
• services/ → REST clients (CustomerService, OrderService, EmployeeService, ProductService, ShipperService)
• interceptors/ → HTTP/HTTPS interceptors for error handling, auth, etc.
• models/ → TS interfaces for Customer, Order, etc.
• utils/ → reusable utilities (error-handler)
• src/environments → environment.ts / .prod for API base URLs and flags
• tests: .spec.ts alongside components for Jasmine/Karma
README for additional insights
• Key features: paginated customer listing, reactive forms for new orders, D3.js interactive charts, SSR for SEO/performance, RxJS for state management, robust error handling.
• Tech stack: Angular 19, TypeScript, D3.js, Express 4.18.2, SCSS, Jasmine/Karma.
• From Browser to SSR Server (initial page load)
• From Browser to Angular Services (XHR / fetch)
• From Services to REST API and back
• Blue for UI components
• Green for server/processes
• Orange for external systems (API/DB)