Git Product home page Git Product logo

cleanarchitecturetemplate's Introduction

Create Nuget Package Nuget status

NOTE: this project is no longer maintained. It uses an old version of .Net Core and maybe other outdated libraries. Please use it only for learning purposes.

Clean Architecture Template

My interpretation of a clean architecture project setup for asp.net an MVC & API project.

Please read the Wiki to learn more about Clean Architecture and the project setup of this package.

Usage

To install the template so you can use it with dotnet new:

dotnet new --install JacobsApps.CleanArchitectureProjectTemplate.CSharp 

Now choose which project type you want to create and execute the following command:

dotnet new cleanarchitecture --use-case [enter use-case here]
=======
Execute the following command with the correct parameter to create the solution you want:

dotnet new cleanarchitecture --use-case {project type}


### CLI options

Option | Description
--- | ---
-uc / --use-case | which project type(s) to install

### Project types

Type | Description
--- | ---
emptyapi | A clean Api project
fullapi | A full Api project with sample code
emptyweb | A clean Web project
fullweb | A full Web project with sample code
emptyblazor | A clean Blazor project
fullblazor | A full Blazor project with sample code
emptyfull | A clean project with an Api, Blazor and Web project
all | A full project with an Api, Blazor and a Web project, including TODO sample code


# Docker / docker-compose

Go to the 'projectname.Api' folder and execute the following command:

```docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build```

to run the Api in docker.

Go to the 'projectname.Web' folder and execute the following command:

```docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build```

to run the Website in docker.

# Release Notes

> ## v2.6.3 (06/22/2020)
> - Added multiple solution files
> - Every solution should work from GitHub now

> ## v2.6.2 (03/24/2020)
> - Cleaner integration test code.
> - Fixed issue with empty web.

> ## v2.6.1 (03/17/2020)
> - Fixed issue with full web samples.

> ## v2.6.0 (03/12/2020)
> - Better templating (different options to choose from)
> - Create, Build & Test all project types in devops before publishing

> ## v2.5.0 (03/08/2020)
> - Included a default .editorconfig
> - Better templating (different options to choose from)
> - Latest package versions
> - Added Docker & docker-compose files

> ## v2.4.1 (02/12/2020)
> - fixed some minor SonarQube issues

> ## v2.4.0 (02/12/2020)
> - Updated to .NET Core 3.1
> - Added Blazor UI

> ## v2.3.0 (09/27/2019)
> - More changes and improvements for .NET Core 3.0
> - Removed pagination, never using it
> - Restructured project locations

> ## v2.2.3 (09/25/2019)
> - Disabled nullable (new C# 8 feature)

> ## v2.2.2 (09/25/2019)
> - Fixing issues with razor + core 3.0
> - Fixing issues with integration tests (added custom web factory)
> - Added test data for Integration tests

> ## v2.2.1 (09/24/2019)
> - Updgrade to .NET Core 3.0
> - Upgraded all packages

> ## v2.1.0 (03/18/2019)
> - Switched back to .NET Core 2.2
> - Downgraded coverlet due to build issues with latest version

> ## v2.0.0 (03/13/2019)
> - Upgrade to .NET Core 3.0 (Which is still in preview!)
> - Renamed handlers, queries and commands
> - Added event / event handler

> ## v.1.3.4 (02/26/2019)
> - Added logging (ILoggingFactory)
> - Added application settings + builder

> ## v1.3.3 (02/11/2019)
> - Added reusable paged data handler for pagination with sample
> - Added a generic CachedRepositoryDecorator to create cached repositories.

> ## v1.3.2 (02/08/2019)
> - Added more unit tests 
> - Added sonar cloud code analysis

> ## v1.3.1 (02/07/2019)
> - Added link to the wiki
> - Added a unit test for a view model
> - code cleanup

> ## v1.3.0 (02/06/2019)
> - Updated README with links
> - Removed ValuesController
> - Added integration tests and unit tests
> - Updated test fixtures to use fake data with integration tests
> - Added Refit for Api integration tests

> ## v1.2.0 (02/06/2019)
> - Added repository + mediator to Web project
> - Added ToDo page to Web project
> - Added Due date to fake data

# ToDo

* Create a runnable start project (runnable before creating the package)
* Run tests inside docker build


# Links

## Clean Architecture

- [Clean Architecture explained by Uncle Bob](http://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)

- [Clean Architecture Cheat Sheet (PDF)](https://www.planetgeek.ch/wp-content/uploads/2016/03/Clean-Architecture-V1.0.pdf)

- [A starting point for Clean Architecture with ASP.NET Core (Steve Smith/Ardalis)](https://github.com/ardalis/CleanArchitecture)

- [Clean Architecture: Patterns, Practices, and Principles (Pluralsight)](https://www.pluralsight.com/courses/clean-architecture-patterns-practices-principles)

## DDD

- [CQRS with DDD (Kamil Grzybek)](http://www.kamilgrzybek.com/design/simple-cqrs-implementation-with-raw-sql-and-ddd/)

## Used packages

- [Mediatr - Simple mediator implementation in .NET](https://github.com/jbogard/MediatR)
  
- [LinqBuilder - LinqBuilder is based on the specification pattern](https://github.com/Baune8D/linqbuilder)

## Others

- [How to create dotnet new templates](https://blogs.msdn.microsoft.com/dotnet/2017/04/02/how-to-create-your-own-templates-for-dotnet-new/)

# Books

- [Clean Architecture: A Craftsman's Guide to Software Structure and Design (Robert C. Martin Series)](https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164)

cleanarchitecturetemplate's People

Contributors

jacobduijzer avatar jtone123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cleanarchitecturetemplate's Issues

Buildable start project

AS A maintainer,
I WANT a runnable, buildable starter project
SO THAT I can extend my project without having to create a nuget package before building and testing.

Default startup project

AS A Developer
I WANT the startup project to default to the WEB/API/Blazor project
SO I can run/debug the project immediately after opening

Install package during test

As a maintainer I want to install the package in my CI/CD workflow before I upload it to nuget so I am sure the package is working.

Using SonarCloud

As a maintainer of this package I want to have insights in the code quality of the sample project so I could maintain a high quality standard.

Release real master package only

Github verifies if a PR can be barged and build with appveyor but de verifying build package is now uploaded to nuget. A package with exactly the same version number will be uploaded in the final PR build.

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.