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 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.
- Clear Separation of Concerns
- Easily Scalable
- Lower complexity compared to Microservices
- Low operational / deployment costs.
- Reusability
- Organized Dependencies
- 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.
- API - ASP.NET Core 5.0 WebAPI
- Data Access - Entity Framework Core 5.0
- DB Providers - MSSQL SERVER
- 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
- Take a look at the structure of the solution
- API -
In Progress
- Docker -
In Progress
- Install the latest .NET 5 SDK
- Install the latest DOTNET & EF CLI Tools by using this command:
dotnet tool install --global dotnet-ef
- Install the latest version of 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 InmoIT.
- As for quick DB Management, me love Azure Data Studio
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
andgit remote set-url --push upstream DISABLE
- 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:
- Open up
InmoIT.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=InmoIT;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, owners, properties, images etc.
- Browse to http://localhost:5341/ to Seq Logs!.
- Browse to https://localhost:5001/ to Api InmoIT!
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.
- Email - vlaperchiwon@inmoit.com / Pass: @SuperAdminP4$$w0rd#
- Email - camilosoto@inmoit.com / Pass: @AdminP4$$w0rd#
- Email - davidvanegas@inmoit.com / Pass: @BasicP4$$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 InmoIT.Postman, file placed in the directory
InmoIT\postman
. - This file is compatible with Postman and easily edited with Visual Studio Code.
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 - codewithvladperchi
- 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!