Skip to content

Department of Human Resources requests a web application to record leave requests from their employees.

License

Notifications You must be signed in to change notification settings

vladperchi/HureIT

Repository files navigation

Conventional Commits Contributors Forks Stargazers Issues MIT License LinkedIn


HureIT
Report Bug · Request Feature

About This Project

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.

Solution structure

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

Technology Stack

  • API - ASP.NET Core 5.0 WebAPI
  • Data Access - Entity Framework Core 5.0
  • DB Providers - MSSQL SERVER
  • Client - Angular 12 Material

Features & Plus

  • 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

Project Status

  • API - Finished
  • Docker - In Progress
  • Angular/UI - Coming Soon!

Prerequisites

  1. Install .NET 5 SDK
  2. Install the latest DOTNET & EF CLI Tools by using this command:
 dotnet tool install --global dotnet-ef
  1. Install the Visual Studio IDE 2022(v17.0.0 and above) OR Visual Studio Code.
  2. Install the latest Docker on Windows.
  3. It's recommended to use MsSql Server Database as it comes by default with HureIT.

Getting Started

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

Running the API

  • 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:

  1. Open up HureIT.sln in Visual Studio 2022, preferably.
  2. Navigate to appSettings.json under src/Host/Api/appsettings.json
  3. Add you MsSql connection string under PersistenceSettings. The default connection string: "mssql": "Data Source=.;Initial Catalog=HureDB;Integrated Security=True;MultipleActiveResultSets=True"
  4. That is all you need to configure the API. Just create and run the API project.
  5. By default, the database is migrated. Take a look at the migrations of the solution
  6. Some default data is also included in this database, such as roles, users, employees, etc.
  7. Browse to http://localhost:5341/ to Seq Logs!.
  8. Browse to https://localhost:5001/ to Api HureIT!

Default Roles & Credentials

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.

HTTP requests can be sent to the API?

  • 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].

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/IncredibleFeature)
  3. Commit your Changes (git commit -m 'Add some IncredibleFeature')
  4. Push to the Branch (git push origin feature/IncredibleFeature)
  5. Open a Pull Request.

Core Developer Contact

License

This project is licensed with the MIT License.

Support

Has this Project helped you learn something New? or Helped you at work? Here are a few ways by which you can support.


black-button

About

Department of Human Resources requests a web application to record leave requests from their employees.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published