Skip to content

Latest commit

 

History

History
285 lines (217 loc) · 12 KB

README.md

File metadata and controls

285 lines (217 loc) · 12 KB

Contributors Forks Stargazers Issues MIT License LinkedIn


InmoIT
Report Bug · Request Feature

About This Project

In reality, there was no real need to implement microservices. InmoIT is intended to help a large Real Estate company provide information on properties in the United States and thus gradually increase rents and sales. For this, a well-designed monolithic application would also work without any inconvenience, clearly taking into account that the API and the user interface would be separated to offer better opportunities in the future (Clients).

The API, ASP.NET Core 5.0 was my obvious choice. The WebAPI application is focused on modularity to improve the development experience. Entering the subject, I divided the application into logical modules such as flow, Identity, Documents, Leases, Sales, etc. Each of these modules contains its own controllers / interfaces / dbContext. As for the database providers, mssql will be used as default appsettings. A module cannot communicate directly with another module or modify its table. CrossCutting concerns would use interfaces / events. And yes, domain events are also included in the project using mediatr Handler. Each of the modules follows a clean architecture design.

Modular Architecture

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 InmoIT helps to be extended to support and operate with n-modules.

Diagrammatic Representation


Modular Architecture

PRO

  • Clear Separation of Concerns
  • Easily Scalable
  • Lower complexity compared to Microservices
  • Low operational / deployment costs.
  • Reusability
  • Organized Dependencies

CONTRA

  • Not Multi-technology compatible.
  • Horizontal Scaling can be a concern. But this can be managed via load balancers.
  • Since Interprocess Communication is used, messages may be lost during Application Termination. Microservices combat this issue by using external messaging brokers like Kafka, RabbitMQ.
  • We can make use of message agents but no, let's keep it simple.

Technology Stack

Features & Plus

  • Modular Architecture
  • NET 5.0
  • Service-Based
  • Controller Registration
  • Entity Framework Core
  • Auto DB Migrations
  • Data Seeding
  • Validation
  • AutoMapper
  • Code Cleanup
Click to See More!
  • Custom API Response
  • Custom Errors
  • Serilog
    • Sinks - File
    • Seq
  • In-Memory Database
  • CQRS using MediatR
  • Middlewares
  • Paginated API Responses
  • Specification Pattern
  • Default Seeding
    • Users
    • Roles
  • Refresh Tokens
  • Claims-Based Authorization
  • JWT Authentication
  • HTTP Interceptor
  • CRUD Operations
  • Custom EventLogs
  • Swagger
  • API Versioning
  • Hangfire Support
  • Hangfire Secured Dashboard
  • Email Service
  • SMS Service
  • File Upload
  • Export Excel
  • Localization
  • Document
  • Dashboard
  • Docker Support
  • Postman Collection

Project Structure

  • Take a look at the structure of the solution

Project Status

  • API - In Progress
  • Docker - In Progress

Prerequisites

  1. Install the latest .NET 5 SDK
  2. Install the latest DOTNET & EF CLI Tools by using this command:
 dotnet tool install --global dotnet-ef
  1. Install the latest version of 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 InmoIT.
  4. As for quick DB Management, me love Azure Data Studio

Getting Started

To get started, here are the avaiable three options: download, clone or fork.

  • Download ZIP.
  • Open GitBash and execute command for clone:
git clone https://github.com/vladperchi/InmoIT.git

You would probably need to take this approach if you want to keep your source code upto date with the latest changes.

  • Make a fork of this repository in your Github account. Use this if you want to always keep your version up-to date with the latest changes.
  • Create your new InmoIT personal project by cloning the forked repository on your personal github.
  • Setup an upstream remote on your personal project pointing to your forked repository using command git remote add upstream https://github.com/{githubuseraccount}/InmoIT and git remote set-url --push upstream DISABLE

Running the API

  • Open PowerShell InmoIT/src/server 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 InmoIT.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=InmoIT;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, owners, properties, images etc.
  7. Browse to http://localhost:5341/ to Seq Logs!.
  8. Browse to https://localhost:5001/ to Api InmoIT!

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.

  • SuperAdmin
  • Admin
  • Staff

Here are the credentials for the default users.

You can use these credentials to generate JWT tokens in the api/identity/tokens endpoint.

HTTP requests can be sent to the API?

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