Templates
Templates are a series of cookiecutter templates used to generate new services.
These templates aim to reduce the amount of variance between services, and aim to save time scaffolding and setting up new services, as this tends to involve a lot of duplication of time and effort.
Forewarning
These templates aren't intended to be perfect, or to generate code that works immediately. You may need to tweak things and shift things around slightly depending on your requirements, but the basic structure should be left intact for consistency across services.
If you find yourself changing the architecture, layout, or default libraries in any way, you should discuss with the team about changing the template, too.
These templates should be improved over time as we generate more services, and we're able to spot more common patterns which could be automated.
Please, please, pleae contribute to these templates, as they will save time for us all in the long run.
Prerequisites
Install cookiecutter
$ brew install cookiecutter
Templates
Currently, we have two main templates:
gRPC
This creates a new gRPC service, which are to be used as internal services. I.e., they have no public access, no web interfaces and communicate only via service to service communication.
The gRPC service will create a buf config, a proto file and some basic service plumbing.
Usage
From the root directory of this repo, run:
$ make new-service type=grpc
$ make new-serice type=web
Generated services will be places into the services
directory, so that they will become applicable for CI/CD etc.
Last updated