HureIT is HR departament application built Modular Monolith architecture, written in .NET Core 5.0. Each module is a separate vertical slice with its own custom architecture and the overall integration between the modules is mostly based on the event-driven approach to achieve greater autonomy between the modules.
There actually was no real need to implement microservices. For this, a well designed monolith application would also do the trick. I was clear to have the API and UI seperated, to give oppurtunities to multiple client apps in the future. For API, ASP.NET Core 5.0 and for the UI Angular 12 Material was my obvious choice.
Modular Architecture is a software design in which a monolith is made better and modular with the importance of reusing components / modules. The same implemented in HureIT helps to be extended to support and operate with n-modules.
Api
Web application responsible for initializing and starting all the modules - loading configurations, running DB migrations, exposing public APIs etc.
Modules
Autonomous modules with the different set of responsibilities, highly decoupled from each other - there's no reference between the modules at all (such as shared projects for the common data contracts), and the synchronous communication & asynchronous integration (via events) is based on local contracts approach.
- Identity: Management of users/identity (register, login, permissions etc.).
- Workflow: Management of employees, permissions and types of permissions (create, complete, verify, search).
Shared
The set of shared components for the common abstractions & cross-cutting concerns. This Cross-cutting concerns would use interfaces/events. And yes, domain events are also included in the project using the Mediatr Handler. Each of the modules follows a clean / Onion / Hex architecture design.
Take a look in detail at the structure of the solution
- API - ASP.NET Core 5.0 WebAPI
- Data Access - Entity Framework Core 5.0
- DB Providers - MSSQL SERVER
- Client - Angular 12 Material
- Modular Architecture
- Built on .NET 5.0
- Clean Architecture Principles
- Domain Driven Design
- Entity Framework Core
- Auto DB Migrations
- Database Seeding
- CRUD Operations
Click to See More!
- Fluent Validations
- CQRS using MediatR
- AutoMapper
- Secure DB Connection
- Middlewares
- Response Caching
- Hangfire Support
- Custom Errors
- Serilog Integration - File & SEQ
- In-Memory Database
- Paginated API Responses
- User & Role Based Permission
- Identity Seeding
- JWT Authentication
- HTTP Interceptor
- Custom EventLogs
- API Versioning
- Email Service
- File Upload
- Export Excel
- Dashboard Updated
- Docker Support
- API -
Finished
- Docker -
In Progress
- Angular/UI -
Coming Soon!
- Install .NET 5 SDK
- Install the latest DOTNET & EF CLI Tools by using this command:
dotnet tool install --global dotnet-ef
- Install the Visual Studio IDE 2022(v17.0.0 and above) OR Visual Studio Code.
- Install the latest Docker on Windows.
- It's recommended to use MsSql Server Database as it comes by default with HureIT.
To get started, let's follow this short instruction routine:
- Download ZIP
- Extract solution to selected directory
- Open the solution
HureIT.sln
with Visual Studio or the directory with VSCode
- Open PowerShell
HureIT/compose
directory and execute:
docker-compose -f infrastructure.yml up -d
Note: It will start the required infrastructure in the background.
Then you can continue the list listed below:
- Open up
HureIT.sln
in Visual Studio 2022, preferably. - Navigate to appSettings.json under
src/Host/Api/appsettings.json
- Add you MsSql connection string under
PersistenceSettings
. The default connection string:"mssql": "Data Source=.;Initial Catalog=HureDB;Integrated Security=True;MultipleActiveResultSets=True"
- That is all you need to configure the API. Just create and run the API project.
- By default, the database is migrated. Take a look at the migrations of the solution
- Some default data is also included in this database, such as roles, users, employees, etc.
- Browse to http://localhost:5341/ to Seq Logs!.
- Browse to https://localhost:5001/ to Api HureIT!
As soon you build and run your application, default users and roles get added to the database.
Default Roles are as follows.
Administrator
Operator
Here are the credentials for the default users.
- Email -
vladperchi@hureit.com
/ Pass:@4dm1nP4$$w0rd#
- Email -
paolamelia@hureit.com
/ Pass:@B4s1cP4$$w0rd#
You can use these credentials to generate JWT tokens in the api/identity/tokens
endpoint.
- You can find the list of all HTTP requests in HureIT.Postman, file placed in the directory
HureIT\postman
. - This file is compatible with Postman and easily edited with [Visual Studio Code][vscode-url].
Contributions are what make the open source community such an amazing place to learn, create, and inspire. Any contribution you make is greatly appreciated.
Join the elite list!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/IncredibleFeature
) - Commit your Changes (
git commit -m 'Add some IncredibleFeature'
) - Push to the Branch (
git push origin feature/IncredibleFeature
) - Open a Pull Request.
- Twitter - Vladimir
- Twitter - Code With Vladperchi
- Linkedin - Vladimir
- GitHub - Vladperchi
This project is licensed with the MIT License.
Has this Project helped you learn something New? or Helped you at work? Here are a few ways by which you can support.
- Leave a star! ⭐
- Recommend this awesome project to your colleagues
- Do consider endorsing me on LinkedIn for ASP.NET Core - Connect via LinkedIn
- Or, If you want to support this project in the long run, consider buying me a coffee!