Reviewed-on: #15
.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
🔧 Setup Instructions
-
Install Angular dependencies
⚠️ Before starting the application for the first time, run the following command in the
ClientAppdirectory:cd src/ClientApp npm install -
Run the application
Go back to the API folder and start the backend server:
cd src/API dotnet run --launch-profile angular_dev -
Access the app
-
Angular frontend: http://localhost:44492
-
Swagger UI (API docs): 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
cd src/ClientApp
npm test
Headless/CI und Coverage
cd src/ClientApp
npm run test:coverage
The coverage report is generated under src/ClientApp/coverage/ (HTML-Report in index.html).
cd src/ClientApp
npm run test:ci
Note: For headless tests, a Chrome/Chromium runtime must be present on the machine.