Git Product home page Git Product logo

miniclean.template's Introduction

MiniClean.Template

Welcome to MiniClean.Template! This repository holds the starting point for a .NET 8 minimal API, neatly organized using clean architecture principles. Its datastore is a FHIR service at the moment but can be easily switched to suit your needs.

Some details about the reasoning behind this boilerplate can be found in a blog post I wrote

Here's what you'll find:

  • Clean Architecture: We've organized the project using clean architecture principles to make it easier to understand, maintain, and extend.

  • Ready for CRUD Operations: an example Patient Read operation is already implemented. You can easily extend or replace it with your own operations.

  • Testing Suites: Start on solid ground with unit tests, integration tests, and end-to-end tests, all ready to go.

  • Azure DevOps CI Pipeline: We've included a CI pipeline that handle static code analysis and build verification tests. a similar PR pipelines ensure code quality before merging a PR.

  • CD Pipeline: Simplify deployment with a CD pipeline, managing Terraform infrastructure stored in the 'infrastructure' folder.

Feel free to explore, submit issues, and use MiniClean.Template to make your small-medium sized .NET 8 projects ready for work!


Getting Started

Follow these steps to get started with the template:

  1. Install Tools: These tools are essential for the CI pipeline to run successfully:

  2. Rename Project:

    • Replace all instances of "miniclean" with your appname in lowercase.
  3. Azure Setup:

    • Create a common resource group.
    • Create a storage account and a container named "terraform". (used to store the state of terraform)
    • Create a variable groups:
      • dev-variables:
        • location: As desired
        • azureSubscriptionEndpoint: The connection name
        • shared_resource_group_name: The common resource group
        • tf_status_storage_account: Storage account name
        • azure_tenant_id: Azure tenant ID
        • azure_subscription_id: Azure subscription ID
    • Create an app registration and save its client ID and secret.
    • In your Azure subscription, add an "Owner" role to this app registration.
    • Create a key vault in the common resource group and assign it a secret reader role for your pipeline connection name.
    • Add these secrets to your key vault:
      • sp-<appname>-deployment-client-id: App registration client ID
      • sp-<appname>-deployment-client-secret: App registration client secret
    • create an additional variable group dev-secrets variable group to Azure Key Vault and add the service principal secrets from the key vault.
    • Assign an AcrPush role to your service principal.
  4. Set up Azure DevOps Pipelines: Choose existing YAML file and pick the appropriate file under the /.pipelines/ folder

    • Create PR pipeline
    • Create CI pipeline
    • Create CD pipeline

miniclean.template's People

Contributors

dorlugasigal avatar

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.