Code Monkey home page Code Monkey logo

dmamulashvili / webapi-msa-template Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 261 KB

ASP.NET Core Web API Microservice Template using Clean Architecture, CQRS, Structure by Feature, Specifications, PostgreSQL, MassTransit with AmazonSQS & OutBox, JWT Auth

License: MIT License

C# 98.75% Dockerfile 1.25%
aspnetcorewebapi clean-architecture cqrs ddd jwt masstransit microservice microservices outbox-pattern postgresql specification-pattern amazon-sqs audit integration-tests unit-tests

webapi-msa-template's Introduction

webapi-msa

ASP.NET Core Web API Microservice Template using Clean Architecture, CQRS, Structure by Feature, Specifications, PostgreSQL, MassTransit with AmazonSQS & OutBox, JWT Auth

Note
Reference used: https://github.com/dotnet-architecture/eShopOnContainers

Install

Clone repository

git clone https://github.com/dmamulashvili/webapi-msa-template.git

Install template

cd webapi-msa-template
dotnet new --install .

Create Solution

cd /<DIRECTORY_TO_CREATE_SOLUTION_AT>
dotnet new webapi-msa -o "MyCompany.MyProject.MyOrdering"

Configure launchSettings.json

Configure PostgreSQL writer(Master) & reader(Slave) connection strings.

"environmentVariables": {
  "ConnectionString_MasterDbContext": "Server=localhost;Port=5432;Database=MyCompany.MyProject.MyOrderingDb;User Id=postgres;password=postgres",
  "ConnectionString_SlaveDbContext": "Server=localhost;Port=5432;Database=MyCompany.MyProject.MyOrderingDb;User Id=postgres;password=postgres;"
},

Create aws user with Programmatic access & read/write permissions to SNS/SQS & configure creds.

"environmentVariables": {
  "AmazonSQS_AccessKey": "",
  "AmazonSQS_SecretKey": "",
  "AmazonSQS_RegionEndpointSystemName": ""
},

Configure JWT

Warning
ValidateAudience is disabled by default in Program.cs, you can leave it empty.

"environmentVariables": {
  "JWT_ValidAudience": "",
  "JWT_ValidIssuer": "",
  "JWT_Secret": ""
}

Configure appsettings.json

Warning The following characters are accepted in ShortName: alphanumeric characters, hyphens (-), and underscores (_).

"Project": {
  "ShortName": "Template_API"
},

Note ASP.NET Core Web API Audit Microservice template: https://github.com/dmamulashvili/webapi-msa-audit-template.git

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.