Skip to content

Commit f5f13fa

Browse files
authored
refactor: ♻️enhance building blocks codebase (#234)
1 parent 6eec996 commit f5f13fa

File tree

743 files changed

+6044
-8368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

743 files changed

+6044
-8368
lines changed

.config/dotnet-tools.json

+2-16
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@
99
],
1010
"rollForward": false
1111
},
12-
"cake.tool": {
13-
"version": "2.3.0",
14-
"commands": [
15-
"dotnet-cake"
16-
],
17-
"rollForward": false
18-
},
19-
"dotnet-format": {
20-
"version": "5.1.250801",
21-
"commands": [
22-
"dotnet-format"
23-
],
24-
"rollForward": false
25-
},
2612
"csharpier": {
2713
"version": "0.28.2",
2814
"commands": [
@@ -31,7 +17,7 @@
3117
"rollForward": false
3218
},
3319
"swashbuckle.aspnetcore.cli": {
34-
"version": "6.6.2",
20+
"version": "6.7.0",
3521
"commands": [
3622
"swagger"
3723
],
@@ -59,4 +45,4 @@
5945
"rollForward": false
6046
}
6147
}
62-
}
48+
}

.devcontainer/devcontainer.json

+22-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
// https://github.com/devcontainers/features/tree/main/src/dotnet#dotnet-cli-dotnet
2323
"ghcr.io/devcontainers/features/dotnet:2": {
2424
// this version should be matched with global.json .net version for working vscode IntelliSense correctly
25-
"version": "8.0.303",
26-
"additionalVersions": "latest, 7.0.410, 8.0.303, 6.0.424",
25+
"version": "8.0.400",
26+
"additionalVersions": "latest, 8.0.400, 8.0.303, 7.0.410, 6.0.424",
2727
"aspNetCoreRuntimeVersions": "latest, 7.0"
2828
},
2929
// https://github.com/devcontainers/features/tree/main/src/github-cli
@@ -74,7 +74,18 @@
7474
"terminal.integrated.defaultProfile.windows": "PowerShell",
7575
"terminal.integrated.defaultProfile.linux": "zsh",
7676
"powershell.cwd": "~",
77-
"terminal.external.windowsExec": "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\pwsh.exe"
77+
"terminal.external.windowsExec": "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\pwsh.exe",
78+
"[jsonc]": {
79+
"editor.defaultFormatter": "esbenp.prettier-vscode"
80+
},
81+
"editor.smoothScrolling": true,
82+
"editor.wordWrap": "on",
83+
"editor.guides.bracketPairs": true,
84+
"explorer.experimental.fileNesting.enabled": true,
85+
"[csharp]": {
86+
"editor.defaultFormatter": "csharpier.csharpier-vscode",
87+
"editor.formatOnSave": true
88+
}
7889
},
7990
"extensions": [
8091
"streetsidesoftware.code-spell-checker",
@@ -89,7 +100,14 @@
89100
"GitHub.vscode-github-actions",
90101
"PKief.material-icon-theme",
91102
"EditorConfig.EditorConfig",
92-
"DavidAnson.vscode-markdownlint"
103+
"DavidAnson.vscode-markdownlint",
104+
"IBM.output-colorizer", // Colorize your output/test logs
105+
"emmanuelbeziat.vscode-great-icons",
106+
"esbenp.prettier-vscode",
107+
"vscode-icons-team.vscode-icons",
108+
"csharpier.csharpier-vscode",
109+
"redhat.vscode-yaml",
110+
"kennylong.kubernetes-yaml-formatter"
93111
]
94112
}
95113
},

.devcontainer/scripts/post-create.sh

100644100755
File mode changed.

.devcontainer/scripts/update.sh

100644100755
File mode changed.

.editorconfig

+4-1
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ dotnet_diagnostic.sa1503.severity = None
341341

342342
dotnet_diagnostic.sa1401.severity = None
343343

344+
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1623.md
345+
# The documentation text within a C# property's <summary> tag does not match the accessors within the property.
346+
dotnet_diagnostic.SA1623.severity = None
347+
344348
# The parameters to a C# method or indexer call or declaration are not all on the same line or each on a separate line.
345349
# dotnet_diagnostic.SA1117.severity = Suggestion
346350

@@ -460,7 +464,6 @@ dotnet_diagnostic.rcs1047.severity = error
460464
dotnet_diagnostic.rcs1174.severity = Suggestion
461465

462466

463-
464467
##################################################################################
465468
## https://github.com/semihokur/asyncfixer
466469
## AsyncFixer01

.github/actions/formatting/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ runs:
1717
dotnet tool restore
1818
1919
# https://dev.to/felipetofoli/code-formatting-for-c-projects-dotnet-format-github-actions-54p8
20+
# https://learn.microsoft.com/en-us/community/content/how-to-enforce-dotnet-format-using-editorconfig-github-actions
2021
- name: dotnet Formatting Check
2122
shell: bash
2223
if: (inputs.formatting-tool == 'dotnet-format')
2324
run: |
24-
dotnet format '.\' --folder --check --verbosity diagnostic
25+
dotnet format --verify-no-changes --verbosity diagnostic
2526
2627
# https://csharpier.com/docs/ContinuousIntegration
2728
- name: Charpire Formatting Check

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4+
# dotnet format --verbosity diagnostic
45
dotnet csharpier . && git add -A .

.vscode/settings.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,16 @@
1717
"terminal.integrated.defaultProfile.windows": "PowerShell",
1818
"terminal.integrated.defaultProfile.linux": "zsh",
1919
"powershell.cwd": "~",
20-
"terminal.external.windowsExec": "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\pwsh.exe"
20+
"terminal.external.windowsExec": "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\pwsh.exe",
21+
"[jsonc]": {
22+
"editor.defaultFormatter": "esbenp.prettier-vscode"
23+
},
24+
"editor.smoothScrolling": true,
25+
"editor.wordWrap": "on",
26+
"editor.guides.bracketPairs": true,
27+
"explorer.experimental.fileNesting.enabled": true,
28+
"[csharp]": {
29+
"editor.defaultFormatter": "csharpier.csharpier-vscode",
30+
"editor.formatOnSave": true
31+
}
2132
}

deployments/k8s/kubernetes/.env.prod

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This needs to be configured by each developer based on their platform, we also ask people to tell git to ignore changes to the file by running `git update-index --assume-unchanged .env`
2+
export TAG=latest
3+
export POSTGRES_USER=postgres
4+
export POSTGRES_PASSWORD=postgres
5+
export MONGO_PORT=27017
6+
export MONGO_USER=admin
7+
export MONGO_PASS=admin
8+
export GATEWAY_HTTP_PORT=3000
9+
export GATEWAY_HTTPS_PORT=3001
10+
export CATALOGS_HTTP_SVC_PORT=4000
11+
export CATALOGS_HTTPs_SVC_PORT=4001
12+
export CUSTOMERS_HTTP_SVC_PORT=8000
13+
export CUSTOMERS_HTTPs_SVC_PORT=8001
14+
export ORDERS_HTTP_SVC_PORT=5000
15+
export ORDERS_HTTPs_SVC_PORT=5001
16+
export IDENTITY_HTTP_SVC_PORT=7000
17+
export IDENTITY_HTTPS_SVC_PORT=7001
18+
export ASPNETCORE_ENVIRONMENT=docker
19+
export REGISTRY=ghcr.io
20+
export PROJECT_NAME=mehdihadeli/food-delivery-microservices
21+
#https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-from-the-shell
22+
#https://github.com/docker/compose/issues/5089
23+
#https://docs.docker.com/compose/environment-variables/env-file/#parameter-expansion
24+
export HOME=${HOME}
25+
export DEV_CERT_PASSWORD=123456
26+
export ConfigurationFolder=config-files/
27+
export ENVIRONMENT=prod
28+
GRAFANA_PORT=3000
29+
GRAFANA_HOST_PORT=3000
30+
PROMETHEUS_PORT=9090
31+
PROMETHEUS_HOST_PORT=9090
32+
KIBANA_PORT=5601
33+
KIBANA_HOST_PORT=5601
34+
ELASTIC_PORT=9200
35+
ELASTIC_HOST_PORT=9200
36+
EVENTSTORE_PORT=2113
37+
EVENTSTORE_HOST_PORT=2113
38+
POSTGRES_PORT=5432
39+
POSTGRES_HOST_PORT=5432
40+
RABBITMQ_PORT=5672
41+
RABBITMQ_HOST_PORT=5672
42+
RABBITMQ_API_PORT=15672
43+
RABBITMQ_HOST_API_PORT=15672
44+
MONGO_PORT=27017
45+
MONGO_HOST_PORT=27017
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/
2+
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/
2+

0 commit comments

Comments
 (0)