Skip to content

Commit

Permalink
refactor: some refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdihadeli committed Jul 19, 2024
1 parent 64edab3 commit db98928
Show file tree
Hide file tree
Showing 430 changed files with 12,934 additions and 121 deletions.
54 changes: 54 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"version": 1,
"isRoot": true,
"tools": {
"altcover.global": {
"version": "8.8.74",
"commands": [
"altcover"
]
},
"cake.tool": {
"version": "2.3.0",
"commands": [
"dotnet-cake"
]
},
"dotnet-format": {
"version": "5.1.250801",
"commands": [
"dotnet-format"
]
},
"csharpier": {
"version": "0.28.2",
"commands": [
"dotnet-csharpier"
]
},
"swashbuckle.aspnetcore.cli": {
"version": "6.6.2",
"commands": [
"swagger"
]
},
"microsoft.tye": {
"version": "0.11.0-alpha.22111.1",
"commands": [
"tye"
]
},
"dotnet-ef": {
"version": "7.0.17",
"commands": [
"dotnet-ef"
]
},
"dotnet-outdated-tool": {
"version": "4.6.4",
"commands": [
"dotnet-outdated"
]
}
}
}
8 changes: 8 additions & 0 deletions .csharpierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://csharpier.com/docs/Configuration
printWidth: 120
useTabs: false
tabWidth: 4
preprocessorSymbolSets:
- ""
- "DEBUG"
- "DEBUG,CODE_STYLE"
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://containers.dev/guide/dockerfile#dockerfile

FROM mcr.microsoft.com/devcontainers/dotnet:latest

# Add additional commands
96 changes: 96 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
// https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/setting-up-your-dotnet-project-for-codespaces
// https://github.com/microsoft/vscode-remote-try-dotnet
// https://dev.to/this-is-learning/set-up-github-codespaces-for-a-net-8-application-5999
// https://audacioustux.notion.site/Getting-Started-with-Devcontainer-c727dbf9d56f4d6b9b0ef87b3111693f
{
"name": "Food Delivery Modular Monolith",
// use existing dev container templates. More info: https://containers.dev/guide/dockerfile, https://containers.dev/templates
//"image": "mcr.microsoft.com/devcontainers/dotnet:1-7.0",
// use a Dockerfile file. More info: https://containers.dev/guide/dockerfile#dockerfile
// "build": {
// // Path is relative to the devcontainer.json file.
// "dockerfile": "Dockerfile"
// },
// using a Dockerfile with Docker Compose, https://containers.dev/guide/dockerfile#docker-compose-image
"dockerComposeFile": "docker-compose.yaml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
// https://github.com/devcontainers/features/tree/main/src/dotnet#dotnet-cli-dotnet
"ghcr.io/devcontainers/features/dotnet:2": {
// this version should be matched with global.json .net version for working vscode IntelliSense correctly
"version": "8.0.303",
"additionalVersions": "latest, 7.0.410, 8.0.303, 6.0.424",
"aspNetCoreRuntimeVersions": "latest, 7.0"
},
// https://github.com/devcontainers/features/tree/main/src/github-cli
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "2"
},
// https://github.com/devcontainers/features/tree/main/src/powershell
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
// https://github.com/devcontainers/features/tree/main/src/node
"ghcr.io/devcontainers/features/node:1": {},
// // https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube
// "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {},
// // https://github.com/devcontainers/features/tree/main/src/terraform
// "ghcr.io/devcontainers/features/terraform:1": {},
// https://github.com/devcontainers/features/tree/main/src/docker-in-docker
// https://devopscube.com/run-docker-in-docker/
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers/features/git:1": {},
// https://github.com/devcontainers/features/tree/main/src/common-utils
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {
"git.autofetch": true,
"files.autoSave": "onFocusChange",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"resmon.show.cpufreq": false
},
"extensions": [
"streetsidesoftware.code-spell-checker",
"ms-dotnettools.csdevkit",
"mutantdino.resourcemonitor",
"humao.rest-client",
"dzhavat.bracket-pair-toggler",
"ms-azuretools.vscode-docker",
"vivaxy.vscode-conventional-commits",
"emmanuelbeziat.vscode-great-icons",
"ms-vscode.vs-keybindings",
"GitHub.vscode-github-actions"
]
}
},
"hostRequirements": {
"cpus": 4,
"memory": "8gb",
"storage": "32gb"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }
// https://containers.dev/implementors/json_reference/#lifecycle-scripts
"updateContentCommand": "chmod +x .devcontainer/scripts/update.sh",
"postCreateCommand": "chmod +x .devcontainer/scripts/post-create.sh"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
26 changes: 26 additions & 0 deletions .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# https://containers.dev/guide/dockerfile#docker-compose-image
# https://containers.dev/guide/dockerfile#docker-compose-dockerfile
services:
devcontainer:
build:
context: .
volumes:
- ../..:/workspaces:rw,cached
init: true
command: sleep infinity

# services:
# devcontainer:
# image: mcr.microsoft.com/devcontainers/dotnet:3.1.0
# volumes:
# - ../..:/workspaces:cached
# network_mode: service:db
# command: sleep infinity

# db:
# image: postgres:latest
# restart: unless-stopped
# environment:
# POSTGRES_PASSWORD: postgres
# POSTGRES_USER: postgres
# POSTGRES_DB: postgres
3 changes: 3 additions & 0 deletions .devcontainer/scripts/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

set -eax
3 changes: 3 additions & 0 deletions .devcontainer/scripts/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

set -eax
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
26 changes: 23 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,8 @@ csx/
ecf/
rcf/

# Windows ECommerce app package directories and files
AppPackages/
BundleArtifacts/
Package.ECommerceAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
Expand Down Expand Up @@ -349,7 +347,29 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/

.idea
.tye/
.logs/
.Log

out/
**/.vagrant/
.idea/
local/data/
portainer-data/
docker.sock/
localtime/
coveragereport/
CoverageResults/
coverage.cobertura.xml
coverage.info

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# exclude sensitive env files
.env
.env.dev
.denv.prod
Loading

0 comments on commit db98928

Please sign in to comment.