Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v18 or higher)
- npm or yarn package manager
- Angular CLI (v20.3.10 or higher)
Installation
Configure backend API
The application connects to a backend API at
http://localhost:8080. Ensure your backend server is running before starting the application.If you need to change the API URL, update the BASE_URL in src/app/usuario/infrastructure/services/auth-service.ts.Start the development server
Run the Angular development server:The application will be available at
http://localhost:4200.First Steps
Explore the Login Page
The application opens to the login page at the root path (/). This page demonstrates:
- Angular standalone components
- RxJS reactive programming with observables
- Repository pattern for data access
- Dependency injection
Try User Registration
Navigate to/registro to see the user registration page. This demonstrates:
- Command pattern (CQRS)
- HTTP POST requests with JSON payloads
- Form handling in Angular
Project Structure
The application follows a clean architecture pattern with three main layers:Available Routes
| Route | Component | Description |
|---|---|---|
/ | LoginPage | User login form |
/registro | RegisterPage | User registration form |
Development Workflow
Running Tests
Execute the test suite using Karma and Jasmine:Building for Production
Create a production build:dist/ directory.
Watch Mode
Run the build in watch mode for continuous compilation during development:Next Steps
Now that you have the application running, explore these topics to understand the architecture:Architecture Overview
Learn about the clean architecture implementation
Domain Layer
Understand the business logic layer
Application Layer
Explore CQRS commands and queries
Authentication
Deep dive into the authentication system
Common Issues
Port 4200 is already in use
Port 4200 is already in use
If port 4200 is already in use, you can specify a different port:
Backend connection failed
Backend connection failed
Ensure your backend API is running at
http://localhost:8080. Check the browser console for detailed error messages.Cannot find module errors
Cannot find module errors
Try clearing the node_modules and reinstalling:
For detailed development setup and configuration, see the Development Setup guide.
