HrAspire is a simple but resilient, observable, cloud ready distributed HR system. It is built with .NET Aspire - Microsoft's new framework for building observable, production ready, distributed applications.
HrAspire is a project that I built in my spare time with a couple of key goals in mind:
- learn .NET Aspire and try out various integrations
- explore and deepen my knowledge of technologies like PostgreSQL, RabbitMQ, Garnet, ASP.NET Core Minimal APIs, gRPC, which I know about but haven't used in projects at work or in other side projects
- explore and deepen my knowledge of libraries like MassTransit, FluentValidation, Mapperly, which I know about but haven't used in projects at work or in other side projects
- practice my system design skills
- have fun architecting and coding!
HrAspire is a simple HR system designed to streamline employee management. The system offers role-based functionality for Employees, Managers and HR Managers, enabling efficient handling of common HR tasks.
All app users are employees including users in Manager and HR Manager roles. Employees can:
- log in
- view own employee details - email, full name, date of birth, position, department, manager, salary, used paid vacation days, etc.
- view and create/update/delete vacation requests for paid or unpaid leaves
- change password
- log out
Managers have all the capabilities of an employee plus additional management features:
- view all managed employees
- access details of all managed employees
- view and create/update/delete documents for managed employees
- view and create/update/delete salary (change) requests for managed employees
- view and approve/reject vacation requests for managed employees
HR managers have all the capabilities of an employee plus additional HR-specific management features:
- view and create/update/delete employees
- access details of all employees
- view and create/update/delete documents for all employees
- view and approve/reject salary (change) requests for all employees
- view vacation requests for all employees
HrAspire is built using the microservice architecture, with multiple (micro)services handling different aspects of HR management and architectural concerns. These services can be divided into 2 groups: frontend and backend. Frontend services are designed to be Internet-facing and backend services are designed to be accessible only within a protected internal network. In addition to these services, a data seeder console app has been implemented to provide a quickstart experience for development environment.
- The UI of the system is a web-based single-page app built with Blazor WebAssembly and hosted by an ASP.NET Core server.
- The API Gateway exposes the functionalities of all backend services to the web app through an HTTP-based API. It also handles cross-cutting concerns like authentication, authorization, account management and input data validation.
- The Employees service is the microservice responsible for managing employees and their documents. It's built using the 3-tier architecture. The main data storage is a PostgreSQL database but document files are stored in Azure Blob Storage containers. It exposes employee and document operations through a gRPC-based API. The service is also asynchronously communicating with the other backend services by producing and consuming RabbitMQ messages and is reading and writing specific employee info in a shared Garnet cache.
- The Salaries service is the microservice responsible for managing salary requests. It's built using the 3-tier architecture. The data is stored in a PostgreSQL database. It exposes salary request operations through a gRPC-based API. The service is also asynchronously communicating with the Employees service by producing and consuming RabbitMQ messages and is reading specific employee info from the shared Garnet cache.
- The Vacations service is the microservice responsible for managing vacation requests. It's built using the 3-tier architecture. The data is stored in a PostgreSQL database. It exposes vacation request operations through a gRPC-based API. The service is also asynchronously communicating with the Employees service by producing and consuming RabbitMQ messages and is reading specific employee info from the shared Garnet cache.
Architecture diagram:
Solution projects diagram: