Skip to content

Commit cd5eb25

Browse files
committed
Enhance README and NuGet documentation, update Makefile paths
Updated the README.md to improve clarity and organization, including a new section for features and enhanced instructions for building the template. Adjusted the Makefile to reflect the correct paths for the WebApi project and Docker Compose configurations. Updated references to MySQL and MSSQL in documentation for consistency.
1 parent b48dcff commit cd5eb25

File tree

3 files changed

+71
-98
lines changed

3 files changed

+71
-98
lines changed

README.md

Lines changed: 64 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!-- PROJECT SHIELDS -->
2+
23
[![License][license-shield]][license-url]
34
[![Build][build-shield]][build-url]
45
[![Packages][package-shield]][package-url]
@@ -40,7 +41,6 @@
4041
[twitterx-shield]: https://img.shields.io/twitter/url/https/twitter.com/genocs.svg?style=social
4142
[twitterx-url]: https://twitter.com/genocs
4243

43-
4444
<!-- PROJECT LOGO -->
4545
<p align="center">
4646
<a href="https://github.com/Genocs/microservice-template">
@@ -66,14 +66,14 @@
6666
Genocs .NET Web API Microservice Template is a starting point for your next `.NET9 Clean Architecture Project` that incorporates the most essential packages and features your projects will ever need including out of the box Multi-Tenancy support.
6767

6868
> As the name suggests, this is an API / Server Template. You can find other Client Template that consume this API under `@genocs` handle.
69+
>
6970
> - Find `Blazor Wasm Template` here - [Blazor Wasm Template](https://github.com/Genocs/blazor-wasm-template)
7071
7172
The template can be used with the `genocs cli`, `dotnet new` command or with the `Visual Studio 2022`, `Visual Studio Code` IDEs.
72-
## ✨ Features
7373

7474
## 📋 Table of Contents
7575

76-
- [Features](#features)
76+
- [Features](#features)
7777
- [Prerequisites](#prerequisites)
7878
- [Quick Start](#quick-start)
7979
- [Template Options](#template-options)
@@ -85,6 +85,13 @@ The template can be used with the `genocs cli`, `dotnet new` command or with the
8585
- [Contributing](#contributing)
8686
- [License](#license)
8787

88+
## ✨ Features
89+
90+
- Clean architecture template spanning Domain, Application, Infrastructure, and WebApi projects.
91+
- Built-in multi-tenant foundation (Finbuckle) with per-tenant and shared database strategies.
92+
- Production-ready infrastructure: background jobs, caching, localization, auditing, and real-time notifications.
93+
- Developer tooling out of the box: Makefile automation, Terraform modules, Docker Compose, Postman and Thunder collections.
94+
8895
## 📋 Prerequisites
8996

9097
- [.NET 9 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) (latest version)
@@ -95,6 +102,7 @@ The template can be used with the `genocs cli`, `dotnet new` command or with the
95102
- **Optional for development**:
96103
- [Docker Desktop](https://www.docker.com/products/docker-desktop) for containerization
97104
- MongoDB, SQL Server
105+
- [NodeJS (16+)](https://nodejs.org/en/download)
98106

99107
## 🚀 Quick Start
100108

@@ -121,60 +129,48 @@ The template generates a solution with the following structure:
121129

122130
```pl
123131
src/
124-
├── Core/ # Core Components
125-
├── Application/ # REST API controllers and middleware
126-
├── Domain/ # REST API controllers and middleware
127-
├── Shared/ # REST API controllers and middleware
128-
├── Infrastructure/ # Data access and external services
129-
├── Migrators/ # Data access and external services
130-
├── Migrators.MSSQL/ # REST API controllers and middleware
131-
├── Migrators.MySQL/ # REST API controllers and middleware
132-
├── Migrators.Oracle/ # REST API controllers and middleware
133-
├── Migrators.PostgreSQL/ # REST API controllers and middleware
134-
└── Migrators.SqLite/ # Infrastructure Tests
135-
├── WebApi/ # REST API controllers and middleware
136-
137-
tests/
138-
└── Infrastructure.Tests/ # Infrastructure Tests
132+
├── Application/ # CQRS commands, queries, validations, business workflows
133+
├── Contracts/ # Shared DTOs, integration events, notifications, permissions
134+
├── Domain/ # Entities, aggregates, domain events, value objects
135+
├── Infrastructure/ # EF Core persistence, caching, jobs, external integrations
136+
├── Infrastructure.Tests/ # Automated tests for persistence, validation, caching
137+
├── Migrators.MSSQL/ # SQL Server migrations and tooling
138+
├── Migrators.MySQL/ # MySQL migrations and tooling
139+
├── Migrators.Oracle/ # Oracle migrations and tooling
140+
├── Migrators.PostgreSQL/ # PostgreSQL migrations and tooling
141+
├── Migrators.SqLite/ # SQLite migrations and tooling
142+
└── WebApi/ # Host application, configuration, controllers, SignalR hub
139143
```
140144

141145
## Features
142146

143-
- :white_check_mark: Built on [.NET9](https://dotnet.microsoft.com/en-us/)
144-
- :white_check_mark: Follows Clean Architecture Principles
145-
- :white_check_mark: Domain Driven Design
146-
- :white_check_mark: Cloud Ready. Can be deployed to AWS Infrastructure as ECS Containers using Terraform
147-
- :white_check_mark: Docker-Compose File Examples
148-
- :white_check_mark: Documented at [genocs netlify](https://genocs-blog.netlify.app)
149-
- :white_check_mark: Multi Tenancy Support with [Finbuckle](https://www.finbuckle.com/)
150-
- :white_check_mark: Create Tenants with Multi Database / Shared Database Support
151-
- :white_check_mark: Activate / Deactivate Tenants on Demand
152-
- :white_check_mark: Upgrade Subscription of Tenants - Add More Validity Months to each tenant!
153-
- :white_check_mark: Supports MySQL, MSSQL, Oracle, PostgreSQL, SQLite
154-
- :white_check_mark: Uses [Entity Framework Core 9.0](https://learn.microsoft.com/en-us/ef/core/) as DB Abstraction
155-
- :white_check_mark: Flexible Repository Pattern
156-
- :white_check_mark: [Dapper](https://www.learndapper.com/) Integration for Optimal Performance
157-
- :white_check_mark: Serilog Integration with various Sinks - File, SEQ, Kibana
158-
- :white_check_mark: OpenAPI - Supports Client Service Generation
159-
- :white_check_mark: Mapster Integration for Quicker Mapping
160-
- :white_check_mark: API Versioning
161-
- :white_check_mark: Response Caching - Distributed Caching + REDIS
162-
- :white_check_mark: Fluent Validations
163-
- :white_check_mark: Audit Logging
164-
- :white_check_mark: Advanced User & Role Based Permission Management
165-
- :white_check_mark: Code Analysis & StyleCop Integration with Rulesets
166-
- :white_check_mark: JSON Based Localization with Caching
167-
- :white_check_mark: Hangfire Support - Secured Dashboard
168-
- :white_check_mark: File Storage Service
169-
- :white_check_mark: Test Projects
170-
- :white_check_mark: JWT & Azure AD Authentication
171-
- :white_check_mark: MediatR - CQRS
172-
- :white_check_mark: SignalR Notifications
173-
- :white_check_mark: MassTransit Integration
174-
- :white_check_mark: & Much More
147+
- :white_check_mark: Built on [.NET 9](https://dotnet.microsoft.com/en-us/) with Clean Architecture layering (Domain, Application, Infrastructure, WebApi).
148+
- :white_check_mark: Domain-driven design with CQRS (MediatR), Mapster mappings, FluentValidation, and specification support.
149+
- :white_check_mark: Multi-tenancy powered by [Finbuckle](https://www.finbuckle.com/) with tenant management APIs, shared/per-tenant databases, and subscription upgrades.
150+
- :white_check_mark: Database providers for PostgreSQL, SQL Server, MySQL, Oracle, and SQLite via Entity Framework Core 9.
151+
- :white_check_mark: Optimized read path with integrated [Dapper](https://www.learndapper.com/) repository alongside EF Core.
152+
- :white_check_mark: Background job processing through Hangfire with dashboard support and multi-provider storage.
153+
- :white_check_mark: Observability with Serilog (console, file, Seq, Elasticsearch, AWS), structured logging, and auditing pipeline.
154+
- :white_check_mark: Distributed caching abstractions with StackExchange Redis and per-tenant cache segregation.
155+
- :white_check_mark: Authentication via JWT bearer tokens and Azure AD, plus fine-grained permission-based authorization.
156+
- :white_check_mark: Localization using OrchardCore PO files, configurable cultures, and UI-ready resource catalogs.
157+
- :white_check_mark: OpenAPI/NSwag integration for client generation, versioned APIs, and security schemas.
158+
- :white_check_mark: Excel export (ClosedXML), file storage abstractions, Razor-based email templates, and MailKit delivery.
159+
- :white_check_mark: Real-time notifications with SignalR and Redis backplane support.
160+
- :white_check_mark: Tooling for real-world deployments: Makefile automation, Docker Compose samples, Terraform modules, Postman & Thunder collections.
161+
- :white_check_mark: Code analysis & StyleCop configuration, plus Infrastructure-focused automated tests.
162+
- :white_check_mark: Comprehensive documentation hosted on [genocs netlify](https://genocs-blog.netlify.app) and an active community.
175163

176164
## How to build and install the template locally
177165

166+
## How to build the template
167+
168+
Check nuget is installed on your machine. To download nuget, visit [nuget.org](https://www.nuget.org/downloads)
169+
170+
- Download the nuget latest version. At the time of writing this, the latest version is nuget.exe v6.7.0
171+
- Add the nuget.exe to your PATH environment variable.
172+
- run the following commands
173+
178174
To build the package run the following commands:
179175

180176
[custom-templates](https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates)
@@ -186,10 +182,13 @@ To build the package run the following commands:
186182
git clone https://github.com/Genocs/microservice-template
187183
cd microservice-template
188184

189-
# To pack and install the template
185+
# To pack and build the template
190186
dotnet pack ./src/Package.Template.csproj -p:PackageVersion=3.1.0 --configuration Release --output ./out
191187

188+
# To install the template
192189
dotnet new install ./out/Genocs.Microservice.Template.3.1.0.nupkg
190+
191+
# To get the list of available templates
193192
dotnet new gnx-microservice --help
194193

195194
# To uninstall the template
@@ -229,15 +228,6 @@ To get started with this Template, here are the available options:
229228
230229
### GENOCS CLI Tool
231230

232-
#### **Prerequisites**
233-
234-
Before creating your first solution, you should ensure that your local machine has:
235-
236-
- **.NET9** You can find the download [here](https://dotnet.microsoft.com/en-us/download/dotnet/9.0).
237-
- **NodeJS (16+)** You can find the download [here](https://nodejs.org/en/download).
238-
- **Visual Studio Code** You can find the download [here](https://code.visualstudio.com/download).
239-
- **Visual Studio 2022** (Optional) You can find the download [here](https://visualstudio.microsoft.com/vs/preview/vs2022/).
240-
241231
#### **Installation**
242232

243233
After you have installed .NET, you will need to install the `cli` console tool.
@@ -252,9 +242,10 @@ This install the CLI tools and the associated Templates. You are now ready to cr
252242
[Documentation](https://genocs-blog.netlify.app/cli/)
253243

254244
#### Let get started
245+
255246
Here's how you would create a Solution using the Genocs .NET WebAPI Template.
256247

257-
Simply navigate to a new directory (wherever you want to place your new solution), and open up *bash prompt* at the opened directory.
248+
Simply navigate to a new directory (wherever you want to place your new solution), and open up _bash prompt_ at the opened directory.
258249

259250
Run the following command. Note that, in this demonstration, I am naming my new solution as `CompanyName.ProjectName.ServiceName`.
260251

@@ -284,11 +275,9 @@ You would probably need to take this approach if you want to keep your source co
284275

285276
For step by step instructions, follow: [this](https://discord.com/channels/878181478972928011/892573122186838046/933513103688224838) and [this](https://gist.github.com/0xjac/85097472043b697ab57ba1b1c7530274).
286277

287-
288278
### Run the template
289279

290-
Makefile
291-
-------------------
280+
## Makefile
292281

293282
So, for a better developer experience, I have added Makefile into the solution. Now that our solution is generated, let's navigate to the root folder of the solution and open up a command terminal.
294283

@@ -307,17 +296,17 @@ make start
307296
That's it, the application would connect to the defined postgresql database and start creating tables, and seed required data.
308297

309298
For testing this API, we have 3 options:
299+
310300
1. Swagger @ `localhost:5001/swagger`
311301
2. Postman collections are available `./postman`
312302
3. ThunderClient for VSCode. You will have to install the [Thunderclient](https://www.thunderclient.com/) extension for VSCode.
313303

314304
The default credentials to this API is:
315305

316-
317306
```json
318307
{
319-
"email":"admin@root.com",
320-
"password":"123Pa$$word!"
308+
"email": "admin@root.com",
309+
"password": "123Pa$$word!"
321310
}
322311
```
323312

@@ -380,12 +369,12 @@ This project also comes with examples of docker compose files, where you can spi
380369

381370
```bash
382371
#docker compose up - Boots up the webapi & postgresql container
383-
make dcu
372+
make dcu
384373
#docker compose down - Shuts down the webapi & postgresql containers
385-
make dcd
374+
make dcd
386375
```
387376

388-
There are also examples for mysql & mssql variations. You can find the other docker-compose files under the ./docker-compose folder. Read more about docker-compose instructions & files here [docker-compose](./docker-compose/README.md).
377+
There are also examples for MySQL & MSSQL variations. You can find the compose files under the `./infrastructure` folder. Read more about the compose scenarios in [infrastructure/docker/README.md](./infrastructure/docker/README.md).
389378

390379
## Cloud Deployment with Terraform + AWS ECS
391380

@@ -397,6 +386,7 @@ We do support cloud deployment to AWS using terraform. The terraform files are a
397386
- Install & Configure AWS CLI profiles to allow terraform to provision resources for you. Please see this video about [AWS Credentials Management](https://www.youtube.com/watch?v=oY0-1mj4oCo&ab_channel=MukeshMurugan).
398387

399388
In brief, the terraform folder has 2 sub-folders:
389+
400390
- backend
401391
- environments/staging
402392

@@ -416,6 +406,7 @@ terraform init
416406
```
417407

418408
Once done, you can go the terraform.tfvars file to change the variables like:
409+
419410
- project tags
420411
- docker image name
421412
- ecs cluster name and so on.
@@ -434,28 +425,13 @@ To destroy the deployed resources, run the following
434425
make td
435426
```
436427

437-
## How to build the template
438-
439-
Check nuget is installed on your machine. To download nuget, visit [nuget.org](https://www.nuget.org/downloads)
440-
441-
- Download the nuget latest version. At the time of writing this, the latest version is nuget.exe v6.7.0
442-
- Add the nuget.exe to your PATH environment variable.
443-
- run the following commands
444-
445-
```bash
446-
nuget pack ./src/Package.Template.nuspec -NoDefaultExcludes -OutputDirectory ./out -Version 2.0.0
447-
dotnet new install ./out/Genocs.Microservice.Template.2.0.0.nupkg
448-
dotnet new gnx-microservice --help
449-
dotnet new gnx-microservice --name {{CompanyName.ProjectName.ServiceName}}
450-
```
451-
452428
## Links & Documentations
453429

454-
[Overview](https://https://genocs-blog.netlify.app/microservice-template/general/overview/)
430+
[Overview](https://genocs-blog.netlify.app/microservice-template/general/overview/)
455431

456-
[Getting Started](https://https://genocs-blog.netlify.app/microservice-template/general/getting-started/)
432+
[Getting Started](https://genocs-blog.netlify.app/microservice-template/general/getting-started/)
457433

458-
[Development Environment](https://https://genocs-blog.netlify.app/microservice-template/general/development-environment/)
434+
[Development Environment](https://genocs-blog.netlify.app/microservice-template/general/development-environment/)
459435

460436
[Participate in QNA & General Discussions](https://github.com/Genocs/microservice-template/discussions)
461437

@@ -467,14 +443,12 @@ View Complete [Changelogs](https://github.com/Genocs/microservice-template/blob/
467443

468444
This project is licensed with the [MIT license](LICENSE).
469445

470-
471446
## Community
472447

473448
- Discord [@genocs](https://discord.com/invite/fWwArnkV)
474449
- Facebook Page [@genocs](https://facebook.com/Genocs)
475450
- Youtube Channel [@genocs](https://youtube.com/c/genocs)
476451

477-
478452
## Support
479453

480454
Has this Project helped you learn something New? or Helped you at work?
@@ -486,7 +460,6 @@ Here are a few ways by which you can support.
486460
- 🦸 Do consider endorsing me on LinkedIn for ASP.NET Core - [Connect via LinkedIn](https://www.linkedin.com/in/giovanni-emanuele-nocco-b31a5169/)
487461
- ☕ If you want to support this project in the long run, consider [buying me a coffee](https://www.buymeacoffee.com/genocs)!
488462

489-
490463
[![buy-me-a-coffee](https://raw.githubusercontent.com/Genocs/microservice-template/main/assets/buy-me-a-coffee.png "buy me a coffee")](https://www.buymeacoffee.com/genocs)
491464

492465
## Code Contributors

src/README_NUGET.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ make dcu
255255
make dcd
256256
```
257257

258-
There are also examples for mysql & mssql variations. You can find the other docker-compose files under the ./docker-compose folder. Read more about docker-compose instructions & files here [docker-compose](./docker-compose/README.md).
258+
There are also examples for MySQL & MSSQL variations. You can find the compose files under the `./infrastructure` folder. Read more about the compose scenarios in [infrastructure/docker/README.md](./infrastructure/docker/README.md).
259259

260260
## Cloud Deployment with Terraform + AWS ECS
261261

@@ -307,11 +307,11 @@ make td
307307

308308
## Links & Documentations
309309

310-
[Overview](https://https://genocs-blog.netlify.app/microservice-template/general/overview/)
310+
[Overview](https://genocs-blog.netlify.app/microservice-template/general/overview/)
311311

312-
[Getting Started](https://https://genocs-blog.netlify.app/microservice-template/general/getting-started/)
312+
[Getting Started](https://genocs-blog.netlify.app/microservice-template/general/getting-started/)
313313

314-
[Development Environment](https://https://genocs-blog.netlify.app/microservice-template/general/development-environment/)
314+
[Development Environment](https://genocs-blog.netlify.app/microservice-template/general/development-environment/)
315315

316316
[Participate in QNA & General Discussions](https://github.com/Genocs/microservice-template/discussions)
317317

src/template/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
build:
22
dotnet build
33
start:
4-
dotnet run --project src/Host/Host.csproj
4+
dotnet run --project src/WebApi/Host.csproj
55
nuget:
66
nuget pack -NoDefaultExcludes -OutputDirectory nupkg
77
publish:
@@ -15,9 +15,9 @@ ta: # terraform apply
1515
td: # terraform destroy
1616
cd terraform/environments/staging && terraform destroy
1717
dcu: # docker-compose up : webapi + postgresql
18-
cd docker-compose/ && docker-compose -f docker-compose.postgresql.yml up -d
18+
cd infrastructure/ && docker-compose -f docker-compose.postgresql.yml up -d
1919
dcd: # docker-compose down : webapi + postgresql
20-
cd docker-compose/ && docker-compose -f docker-compose.postgresql.yml down
20+
cd infrastructure/ && docker-compose -f docker-compose.postgresql.yml down
2121
fds: # force rededeploy aws ecs service
2222
aws ecs update-service --force-new-deployment --service dotnet-webapi --cluster genocs
2323
gw: # git docker workflow to push docker image to the repository based on the main branch

0 commit comments

Comments
 (0)