Skip to content

andrewjka/FacilityAccessService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

155 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FacilityAccessService

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

Navigation list

  1. About
  2. Project relationships
  3. Project structures

About

This service implements an access control system for objects within the enterprise premises. To operate, it is necessary to know when a new user is registered in the system, via a message broker, in order to create a local user based on their UID, with data specific to this service, such as determining the role of guest, employee, guard, or administrator. Additionally, a connection to a service that will authenticate the user's session, which is used across the entire system, is required.

Project relationships

The diagram of the relationship between the projects should have been here

Project structures

Business

Description: This project is responsible for business rules. As a rule, it does not reference anything and serves as a cornerstone for the rest of the system. It contains business entities, repository interfaces, service interfaces, and interfaces for service integrations.

References: none.

Packages: none.


Event

Description: This project includes components that could have also been part of the business project. Essentially, it is still the same business layer as Business and Business.Validation, but separated into different projects for convenience. It contains interfaces for event publishing and processing, as well as business event models.

References: none.

Packages: none.


Business.Validation

Description: In my solution, which may not be entirely correct, business entities do not contain an internal validation mechanism. Instead, I have extracted validation rules for various business models and actions into a separate layer. All these rules are implemented using FluentValidation.

References: Business, Event.

Packages: FluentValidation (11.11.0).


Domain

Description: The heart of the entire project. It describes the implementation of business functionality, specifically the interfaces of services. This layer also includes validation of service input data and validation of business entities. Additionally, it publishes events according to business logic. Simply put, it implements high-level logic, while the implementation of repository and the like interfaces used here is moved to other projects and tightly coupled with a specific technologies.

References: Business, Business.Validation, Event.

Packages: none.


Domain.Secure

Description: A special case. Since the domain only defines how business functions are executed, an access control system for these functions needs to be implemented somewhere. In fact, this project serves as a wrapper around the domain, providing access control for the use of service logic.

References: Domain.

Packages: none.


Persistence

Description: This project is positioned beyond the business layer and pertains to the infrastructure. It references the business layer and implements repository interfaces through interaction with a specific database.

References: Business.

Packages: EntityFrameworkCore(8.0.14), Pomelo.EntityFrameworkCore(8.0.3) AutoMapper(14.0.0).


MessagingClient

Description: This layer in the message distribution architecture is responsible for implementing the Publisher and mapping internal event models to Protobuf contracts.

References: Event, MessagingContract.

Packages: EasyNetQ(7.8.0).


MessagingService

Description: This layer in the message distribution architecture is responsible for receiving and processing new events in the system coming from other services.

References: Domain, MessagingContract.

Packages: EasyNetQ(7.8.0).


RestService

Description: This project is an API interface for interaction via HTTP, following the REST architecture. It contains controllers that forward external requests to Domain.Secure, after first authorizing the user or terminal making the request.

References: Domain.Secure, RestContract.

Packages: none.

About

The service an access control system for facilities within the enterprise territory.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors