/PersonBook

It consist of person infomartion with their contact informations and reporting service showing person's detail informations to user.

Primary LanguageC#

PhonEbook

PhonEbook is an application to save person information; name, surname, company, contact information; phone number, location, email and reporting phone number count and person number count based on location as a excel file.

Configuration

appsettings.json file is used to register connection string for postgresql database and rabbitmq hostname, username, password for both ReportService and ContactService.

  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "ContactDbConnection": "User ID=postgres;Password=123456;Host=localhost;Port=5432;Database=contact;Pooling=true;"
  },
  "EventBus": {
    "HostName": "localhost",
    "UserName": "guest",
    "Password": "guest"
  }

Usage

  • First register a person with name,surname and company information in Home page.
  • Pass into Contact page via Contact button in the above menu and create email, location, phone number for selected person in the combobox.
  • And then go Report page and select a location (which is registered in the database) listed in the comobobox. Then click the "Create Report" button for creating report with phone number count and person count in selected location. This excel file will be registered in the ReceivedEvent method EventBusOrderCreateConsumer.cs as static.

When Click The "Create Report" Button

To get information about phone number count and person number count in selected location, the request goes the ReporService first. Report service creates a uniqueue guid number and insert to the uniqueue number,report state (indicated if the report is created or not) as 0 infos to report database and after then the Report Service send the request to ContactService with HttpClient request. ContactService query the requested info from contact database and send (publish) to queue created via rabbitmq. Background service (apiworker) in the Report Service listens the queue and consume the message consist of phone number count, person number count and location infos. In this section excel file is created and saved into local folder then row in the report database created with guid id begining of process is updated with state 1. When click the reload button we can see the reports info in the report page.

This is a alt text.

Technologies Used

  1. .Net 6
  2. RabbitMQ
  3. Git
  4. PostgreSQL
  5. Mediatr

Architecture

Clean Architecture

UML Diagram

This is a alt text.