Skip to content

An opinionated template of a service built using ASP.NET Core (.NET 7).

License

Notifications You must be signed in to change notification settings

hannahchan/Scaffold.Service

Repository files navigation

Scaffold.Service

Scaffold.Service is an opinionated template of a service built using ASP.NET Core. It is intended to be used as an example for, or as a bootstrap to, the development of other services and aims to address some common concerns when building microservices with ASP.NET Core. Scaffold is an example of a Service Template.

How to Use

To bootstrap your next service with Scaffold.Service.

  1. Install or update the template package from NuGet.org onto your computer by running;

    dotnet new install Scaffold.Service
    
  2. Create your new service by running;

    dotnet new scaffold.service --output <SOLUTION_NAME>
    
  3. Update README.md and all other documentation in your service so that it makes sense.

Alternatively just browse the template directory to copy and paste the parts of the service that you actually need.

Features

Scaffold.Service comes pre-configured with or aims to make developing the following features in your next service a little bit more easier.

Developer / Team Experience

Other stuff you inherit when you bootstrap with Scaffold.Service.

Not Included

Stuff you might want to add to your service but not included with Scaffold.Service.

If building microservices, you may want to bring your own sidecars.

Example App

Scaffold.Service includes an example application which is intended to be replaced with your actual application when using this template. This example application has been included to help demonstrate features in this template.

The example application is a simple CRUD application where you can create Buckets and put Items in them. The Buckets have a size which represents the number of Items you can put in them. To Create, Read, Update and Delete Buckets or Items in the application, simply send HTTP POST, GET, PUT or DELETE requests to the service.

Explore the service by going to /swagger in a web browser.

Create Your Own

You are also invited to fork this repository to create your own template. Organizations may want to do this to pre-configure the template to work in their environment and incorporate their own sensible defaults.

For more information about custom templates, please checkout Custom templates for dotnet new.

Acknowledgements

Scaffold.Service has been inspired by and built from the prior experience and work of many others. In particular, Scaffold.Service heavily relies on the open-source community and those who support that community. Please consider contributing back to their open-source projects in whatever way you can.