This repository contains a full-stack Employee Management solution designed as part of a Senior Full Stack .NET/Azure/Angular Developer Assessment. The project demonstrates enterprise-grade architecture, modern development practices, and readiness for cloud deployment on Azure.
- EmployeeManagement.API: ASP.NET Core Web API implementing RESTful endpoints for employee and department management.
- EmployeeManagement.Application: Application layer containing business logic, CQRS handlers, and MediatR integration.
- EmployeeManagement.Domain: Domain layer with core entities, value objects, and domain logic.
- EmployeeManagement.Infrastructure: Data access layer using Entity Framework Core, repository and unit of work patterns, and database migrations.
- EmployeeManagement.Tests: Unit and integration tests using xUnit/NUnit.
- employee-management-ui: Angular SPA frontend for managing employees and departments, styled with Angular Material, and following best practices for state management and API communication.
- src/app: Additional source code for the Angular application.
- Clean Architecture: The solution is structured for separation of concerns, maintainability, and testability, with clear boundaries between API, application, domain, and infrastructure layers.
- CQRS & MediatR: Command Query Responsibility Segregation is implemented using MediatR for handling commands and queries, supporting scalable and maintainable business logic.
- Repository & Unit of Work Patterns: Abstracts data access and transaction management, enabling easier testing and future data source changes.
- Entity Framework Core: Code-first approach for database schema, migrations, and data access.
- DTOs & AutoMapper: Data Transfer Objects and AutoMapper are used for mapping between domain models and API contracts.
- Dependency Injection: .NET Core DI container is used throughout for loose coupling and testability.
- Swagger/OpenAPI: API documentation is provided for easy testing and integration.
- Angular Frontend: Implements a responsive UI with Angular Material, reactive forms, routing, reusable components, and RxJS for async operations.
- Authentication Ready: The backend is designed for easy integration with API key/JWT authentication and Azure Active Directory.
- Employee CRUD operations with department relationships
- Department listing
- Optimistic UI updates and error handling in the frontend
- Comprehensive unit and integration tests
- Docker-ready for containerized deployment
- Azure deployment readiness (App Service, SQL, authentication)
- Clone the repository
- Database Setup
- Run the script provided in
EmployeeManagementDb.sql
to create the required SQL Server database and tables. This will set up theEmployeeManagementDb
database with the necessary tables and sample data.
- Run the script provided in
- Backend
- Navigate to the solution folder
- Run
dotnet ef database update
to apply migrations - Run
dotnet run
to start the API
- Frontend
- Navigate to
employee-management-ui
- Run
npm install
to install dependencies - Run
ng serve
to start the Angular app
- Navigate to
GET /api/employees
- Get all employees (with department info)GET /api/employees/{id}
- Get employee by ID (with department info)POST /api/employees
- Create a new employeePUT /api/employees/{id}
- Update an existing employeeDELETE /api/employees/{id}
- Delete an employee
GET /api/departments
- Get all departmentsGET /api/departments/{id}
- Get department by IDPOST /api/departments
- Create a new departmentPUT /api/departments/{id}
- Update an existing departmentDELETE /api/departments/{id}
- Delete a department
- .NET Core, ASP.NET Core, C#, Entity Framework Core
- MediatR, AutoMapper, xUnit/NUnit
- Angular, TypeScript, Angular Material, RxJS
- SQL Server/Azure SQL
This project is intended as a technical assessment and a demonstration of best practices for enterprise .NET and Angular development.
For more details, see the code and comments throughout the solution.