# .NET + Angular Application Template This project is a full-stack web application Template combining **ASP.NET Core** for the backend and **Angular** for the frontend. ## ๐Ÿ› ๏ธ Technologies Used - **Backend:** ASP.NET Core (.NET 10) - **Frontend:** Angular - **API Documentation:** Swagger (Swashbuckle) ## ๐Ÿ” Authentication (Register & Login) The template includes a preconfigured user registration and authentication flow, designed as a solid baseline for production-ready applications. - **Register:** Creation of new user accounts via a dedicated API endpoint with server-side validation and secure password hashing. - **Login:** Token-based authentication using JWT (JSON Web Token). Upon successful authentication, a token is issued for authorized API access. - **Authorization:** Protected backend endpoints and frontend routes are secured using role- or policy-based access control. The authentication architecture is secure, extensible, and aligned with enterprise best practices. ## ๐Ÿš€ Getting Started ### Prerequisites - [.NET 10 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) - [Node.js (LTS)](https://nodejs.org/) - [Angular CLI ](https://angular.dev/) ### ๐Ÿ”ง Setup Instructions 1. **Install Angular dependencies** โš ๏ธ **Before starting the application for the first time**, run the following command in the `ClientApp` directory: ```bash cd src/ClientApp npm install ``` 2. **Run the application** Go back to the API folder and start the backend server: ```bash cd src/API dotnet run --launch-profile angular_dev ``` 3. **Access the app** - Angular frontend: [http://localhost:44492](http://localhost:44492) - Swagger UI (API docs): [http://localhost:5184/swagger](http://localhost:5184/swagger) --- ## ๐Ÿงช Running Angular Tests Angular frontend tests are set up using Karma + Jasmine. All test files follow the `.spec.ts` naming convention and are located alongside their respective components and services in `src/ClientApp/src/`. ### Quick Start ```bash cd src/ClientApp npm test ``` ### Headless/CI und Coverage ```bash cd src/ClientApp npm run test:coverage ``` The coverage report is generated under `src/ClientApp/coverage/` (HTML-Report in `index.html`). ```bash cd src/ClientApp npm run test:ci ``` Note: For headless tests, a Chrome/Chromium runtime must be present on the machine.