Skip to content

Commit 9cddfe4

Browse files
committed
Updated in nuget read me file
1 parent 4ad8c65 commit 9cddfe4

File tree

3 files changed

+148
-5
lines changed

3 files changed

+148
-5
lines changed

.github/workflows/template-publish.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ jobs:
5555
run: |
5656
./CreateTemplate.ps1 -SourceDirectory . -TemplateNamespace Contact -OutputDirectory ./template-output
5757
58+
- name: Prepare NuGet README
59+
shell: pwsh
60+
run: |
61+
Copy-Item -Path "NuGet-README.md" -Destination "./template-output/../NuGet-README.md" -Force
62+
Write-Host "NuGet README file copied to package location"
63+
5864
- name: Create .nuspec file
5965
shell: pwsh
6066
run: |
@@ -77,7 +83,11 @@ jobs:
7783
<requireLicenseAcceptance>false</requireLicenseAcceptance>
7884
<copyright>Copyright © ${{ env.TEMPLATE_AUTHOR }} $((Get-Date).Year)</copyright>
7985
<summary>A full-stack template using Clean Architecture principles with .NET 9 API backend and Angular 19 frontend, containerized with Docker.</summary>
86+
<readme>NuGet-README.md</readme>
8087
</metadata>
88+
<files>
89+
<file src="..\NuGet-README.md" target="\" />
90+
</files>
8191
</package>
8292
"@
8393
@@ -148,10 +158,34 @@ jobs:
148158
dotnet new --list | findstr "cleanarch-fullstack"
149159
150160
# Create project from template
151-
dotnet new cleanarch-fullstack --Organization TestCompany
161+
dotnet new cleanarch-fullstack --ProjectName TestProject
152162
153163
# List files to verify creation
154164
dir
165+
166+
# Check for unwanted files
167+
Write-Host "Checking for unwanted NuGet artifact files..."
168+
$unwantedFiles = @(
169+
".signature.p7s",
170+
"CleanArchitecture.FullStack.Template.nuspec",
171+
"[Content_Types].xml"
172+
)
173+
174+
$foundUnwanted = $false
175+
foreach ($file in $unwantedFiles) {
176+
if (Test-Path $file) {
177+
Write-Host "❌ Unwanted file found: $file" -ForegroundColor Red
178+
$foundUnwanted = $true
179+
} else {
180+
Write-Host "✅ Unwanted file not present: $file" -ForegroundColor Green
181+
}
182+
}
183+
184+
if ($foundUnwanted) {
185+
Write-Host "Warning: Some unwanted files were found in the generated project." -ForegroundColor Yellow
186+
} else {
187+
Write-Host "Success: No unwanted NuGet artifact files were found." -ForegroundColor Green
188+
}
155189
156190
- name: Upload package artifact
157191
uses: actions/upload-artifact@v4

CreateTemplate.ps1

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ $templateJson = @{
127127
}
128128
sourceName = $TemplateNamespace
129129
preferNameDirectory = $true
130+
# Set default output name to match project name
131+
primaryOutputs = @(
132+
@{
133+
path = ""
134+
}
135+
)
130136
symbols = @{
131137
Framework = @{
132138
type = "parameter"
@@ -140,13 +146,15 @@ $templateJson = @{
140146
)
141147
defaultValue = "net9.0"
142148
}
143-
Organization = @{
149+
ProjectName = @{
144150
type = "parameter"
145151
datatype = "string"
146-
description = "Organization name to use in the project"
147-
defaultValue = "YourCompany"
152+
description = "The name of the project and solution"
153+
defaultValue = "MyCleanApp"
148154
replaces = $TemplateNamespace
155+
fileRename = $TemplateNamespace
149156
}
157+
# Remove OutputDir parameter since the directory will match the project name
150158
SkipRestore = @{
151159
type = "parameter"
152160
datatype = "bool"
@@ -167,7 +175,14 @@ $templateJson = @{
167175
@{
168176
condition = "true"
169177
include = @("**/*")
170-
exclude = @(".template.config/**/*")
178+
exclude = @(
179+
".template.config/**/*",
180+
"*.nuspec",
181+
".signature.p7s",
182+
"[Content_Types].xml",
183+
"_rels/**/*",
184+
"package/**/*"
185+
)
171186
}
172187
)
173188
}

NuGet-README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Clean Architecture Full-Stack Template
2+
3+
A comprehensive template for building full-stack applications using Clean Architecture principles with a .NET 9 API backend and Angular 19 frontend, containerized with Docker.
4+
5+
## Features
6+
7+
- **Clean Architecture**: Well-organized solution following Clean Architecture principles
8+
- **.NET 9 Backend**: Modern API built with the latest .NET 9 features
9+
- **Angular 19 Frontend**: Responsive UI built with Angular 19
10+
- **Docker Support**: Ready-to-use Docker configuration for development and deployment
11+
- **PostgreSQL**: Configured to use PostgreSQL database
12+
- **Modern Development Patterns**:
13+
- Generic Repositories
14+
- Dependency Injection
15+
- Entity Framework Core
16+
- Angular Material UI components
17+
- TailwindCSS for styling
18+
19+
## Installation
20+
21+
```bash
22+
dotnet new install CleanArchitecture.FullStack.Template
23+
```
24+
25+
## Creating a New Project
26+
27+
```bash
28+
dotnet new cleanarch-fullstack --ProjectName YourProjectName
29+
```
30+
31+
### Template Parameters
32+
33+
| Parameter | Description | Default Value | Required |
34+
|-----------|-------------|---------------|----------|
35+
| --ProjectName | Name of your project and solution | MyCleanApp | Yes |
36+
| --IncludeAngular | Include the Angular frontend | true | No |
37+
| --SkipRestore | Skip automatic package restore | false | No |
38+
| --Framework | Target framework | net9.0 | No |
39+
40+
## Project Structure
41+
42+
```
43+
YourProjectName/
44+
├── backend/
45+
│ ├── src/
46+
│ │ ├── YourProjectName.API # API project
47+
│ │ ├── YourProjectName.Application # Application layer
48+
│ │ ├── YourProjectName.Domain # Domain layer
49+
│ │ └── YourProjectName.Infrastructure # Infrastructure layer
50+
│ └── tests/ # Test projects
51+
├── frontend/
52+
│ ├── src/
53+
│ │ ├── app/ # Angular application code
54+
│ │ ├── assets/ # Static assets
55+
│ │ └── environments/ # Environment configurations
56+
│ └── ...
57+
├── docker-compose.yml # Docker composition
58+
└── README.md # Project README
59+
```
60+
61+
## Getting Started
62+
63+
### Running the Backend
64+
65+
```bash
66+
cd YourProjectName/backend
67+
dotnet restore
68+
dotnet build
69+
dotnet run --project src/YourProjectName.API
70+
```
71+
72+
### Running the Frontend
73+
74+
```bash
75+
cd YourProjectName/frontend
76+
npm install
77+
npm start
78+
```
79+
80+
### Running with Docker
81+
82+
```bash
83+
cd YourProjectName
84+
docker-compose up
85+
```
86+
87+
## Additional Resources
88+
89+
- [GitHub Repository](https://github.com/nitin27may/clean-architecture-docker-dotnet-angular)
90+
- [Clean Architecture Principles](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
91+
92+
## License
93+
94+
This template is licensed under the MIT License - see the LICENSE file for details.

0 commit comments

Comments
 (0)