Prerequisites
Before you begin, ensure you have the following installed on your system:- Node.js: Version 18.x or higher recommended
- npm: Comes with Node.js (or use Yarn as an alternative)
- Angular CLI: Version 20.3.10 or higher
Installation Steps
Install dependencies
Install all required npm packages using your preferred package manager:This will install all dependencies specified in
package.json, including:Core Dependencies:- Angular 20.3.0 (core, common, compiler, forms, router, platform-browser)
- RxJS ~7.8.0
- Zone.js ~0.15.0
- Angular CLI 20.3.10
- Karma 6.4.0 with Jasmine 5.9.0 for testing
- TypeScript 5.9.2
Configure the backend API
The application is configured to communicate with a backend API. Ensure your backend server is:
- Running on
http://localhost:8080 - Properly configured with CORS to accept requests from
http://localhost:4200 - All required endpoints are available for authentication and ecommerce operations
Project Structure
The project follows clean architecture principles with Domain-Driven Design (DDD) and CQRS patterns:Next Steps
Once you’ve completed the setup, you can:- Run the application locally
- Run tests
- Start developing new features
Common Setup Issues
Common Setup Issues
Node version mismatchIf you encounter errors related to Node.js version, ensure you’re using Node 18.x or higher. Consider using a version manager like
nvm to manage Node versions.Permission errors during global installIf you get permission errors when installing Angular CLI globally, you may need to use sudo (on macOS/Linux) or run your terminal as administrator (on Windows). Alternatively, configure npm to use a different directory for global packages.Backend connection issuesIf the application cannot connect to the backend, verify:- The backend is running on port 8080
- CORS is properly configured
- No firewall is blocking the connection
