Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
0ac228a
Prepare deployment #7: Add Azure deployment workflow and Application …
pstackebrandt Mar 16, 2025
82a9e59
Optimize creation and fixing of MD files by Cursor #8
pstackebrandt Mar 17, 2025
4c1195b
#8 Add comprehensive documentation and guidelines for Markdown, proje…
pstackebrandt Mar 18, 2025
755e767
#8 Remove outdated documentation files and enhance README structure
pstackebrandt Mar 18, 2025
4d69b88
#8 Update troubleshooting documentation and add markdown fixing scripts
pstackebrandt Mar 18, 2025
a006d06
#7 Enhance dockerfile, .dockerignore, .gitignore documentation and fi…
pstackebrandt Mar 18, 2025
f123971
Update documentation and scripts for versioning and markdown guidelines
pstackebrandt Mar 19, 2025
415ae0d
Remove outdated implementation plan from versioning documentation
pstackebrandt Mar 19, 2025
1f7f50f
#7 Rename api testing request file and update documentation and add new
pstackebrandt Mar 19, 2025
328b956
Update prepublishing checklist to clarify Application Insights setup
pstackebrandt Mar 19, 2025
8e53dae
Update README and documentation for project clarity and structure
pstackebrandt Mar 19, 2025
8ce1468
Revise prepublishing and publishing checklists for training project
pstackebrandt Mar 19, 2025
f01f97b
#8, #7 Update Docker configuration, API configuration, and documentation
pstackebrandt Mar 20, 2025
baee401
Update Azure deployment documentation and add training guide
pstackebrandt Mar 25, 2025
b639e97
Add script to create Azure service principal with acrpull role
pstackebrandt Mar 25, 2025
8e5ce00
Enhance Azure service principal creation script
pstackebrandt Mar 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .cursor/rules/checklist-maintenance.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
description: Rules for maintaining project checklists
globs: "**/*checklist.md"
alwaysApply: true
---

# Checklist Maintenance Rules

## Status Indicators

- ✅ Completed: Task is fully implemented and verified
- - [ ] Todo: Task not yet started or completed
- 🔄 In-progress: Work has started but not completed
- ⚠️ Blocked: Waiting on external dependency

## Organization

- Group by functional area (Docker, Security, etc.)
- List completed items first within each section
- Place priority items immediately after completed items
- Use logical workflow order for sections

## Formatting

- Use h1 (`#`) for document title
- Use h2 (`##`) for main sections
- Use h3 (`###`) for subsections
- Use bullet lists for checklist items
- Use 2-space indentation for nested items
- Keep line length under 120 characters
- Use code blocks with language identifiers

## Example

```markdown
## Security

✅ HTTPS redirection configured
✅ Sensitive files excluded from source control

- [ ] Add rate limiting for API endpoints
- [ ] Implement CORS policy configuration
```

## Update Process

1. Review project status to identify completed items
2. Update status indicators accordingly
3. Add new requirements that have emerged
4. Remove duplicate or obsolete items
5. Ensure cross-references remain valid

## Rule Types

- **Manual** (`alwaysApply: false`): Only applied when explicitly requested
- **Always** (`alwaysApply: true`): Applied across all matching files automatically
- **Auto Attached**: Automatically attaches to relevant files based on content (Cursor feature)
- **Agent Requested**: Applied when the AI determines they're relevant (Cursor feature)
22 changes: 0 additions & 22 deletions .cursor/rules/console-commands-for-powershell.mdc

This file was deleted.

34 changes: 34 additions & 0 deletions .cursor/rules/git-bash-scripting.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
description: Guidelines for creating and using Git Bash scripts
globs:
alwaysApply: false
---
---
description: Guidelines for creating and using Git Bash scripts
globs: "*.sh"
alwaysApply: false
---

# Selected Git Bash Scripting Guidelines

## File Format
- Use LF line endings (not CRLF)
- Use UTF-8 without BOM
- Start with shebang: `#!/bin/bash`

## Path Handling
- Use forward slashes in paths: `/path/to/dir`
- Always quote paths with spaces
- Use relative paths when possible

## Error Handling
- Use `set -e` for immediate exit on error
- Check exit codes: `if [ $? -ne 0 ]; then ... fi`
- Log errors to stderr: `echo "Error: message" >&2`

## PowerShell Integration
- Use `Invoke-GitBash` helper
- Example:
```powershell
Invoke-GitBash "./scripts/your-script.sh"
```
41 changes: 41 additions & 0 deletions .cursor/rules/markdown-guidelines.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
description: Guidelines for creating Markdown files
globs: "*.md", "*.markdown", "README*"
alwaysApply: false
---

# Markdown Best Practices

## Document Structure
- Use a single `# Title` at the top
- Follow with a brief description
- Organize content with hierarchical headings (`##`, `###`)
- Include a TOC for documents longer than 3 sections

## Formatting
- Keep lines under 120 characters for readability
- Break long lines at natural points (after periods, commas, or logical breaks)
- Use **bold** for emphasis, *italics* for terminology
- Code blocks: Triple backticks with language identifier
- Inline code: Single backticks for commands, variables
- Horizontal rules (`---`) only to separate major sections

## Lists
- Use ordered lists (1. 2. 3.) for sequential steps
- Use unordered lists (- or *) for non-sequential items
- Maintain consistent indentation for nested lists

## Links and References
- Use descriptive link text: `[descriptive text](mdc:URL)`
- Prefer relative links for project files
- Group related references at document bottom

## Images
- Include alt text: `![alt text](mdc:image-path)`
- Keep width under 900px for readability
- Store images in dedicated `/assets` or `/images` folder

## Tables
- Use tables for structured data comparisons
- Include header row and alignment indicators
- Keep tables simple; avoid nested tables
38 changes: 38 additions & 0 deletions .cursor/rules/powershell-scripting.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
description: Guidelines for creating PowerShell scripts
globs: "*.ps1", "*.psm1", "*.psd1"
alwaysApply: false
---

# PowerShell Scripting Guidelines

Prefer PowerShell 7 commands for Windows 11, not Bash syntax.
Prefer PowerShell-native approaches over cmd.exe commands.

## Command Syntax
- Use PowerShell cmdlets: `Get-ChildItem` (not `ls`), `Set-Location` (not `cd`)
- Flags use single hyphen (`-Force`)
- Command separation: `;` (not `&&`)

## Path Handling
- Use backslashes in Windows paths: `C:\Users\`
- Use `Join-Path` for path construction
- Always quote paths with spaces

## Variables and Environment
- Variables: `$variable`, string interpolation: `"$(...)"`
- Environment variables: `$env:VARIABLE`

## Input/Output
- Piping: `|` (with proper object handling)
- Redirection: `>`, `>>`, `2>`

## Error Handling
- Check `$LASTEXITCODE` after external commands
- Use try/catch blocks for risky operations
- Log errors with `Write-Error` to stderr

## Git Bash Integration
- Use `Invoke-GitBash.ps1` for bash scripts
- Handle path conversions
- Propagate exit codes correctly
16 changes: 16 additions & 0 deletions .cursor/rules/shell-choice.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
description: Guidelines for choosing between PowerShell and Git Bash
globs:
alwaysApply: false
---
---
description: Guidelines for choosing between PowerShell and Git Bash
globs: "*.ps1", "*.sh", "*.psm1", "*.psd1", "*.md"
alwaysApply: false
---

# Shell Choice Guidelines

- Use PowerShell for Windows-specific tasks and system automation
- Use Git Bash for cross-platform scripts and git operations
- Prefer PowerShell when working with .NET or Windows services
29 changes: 29 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
.cursor/
.vs/
_testbuild/
docs/
44 changes: 44 additions & 0 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Deploy to Azure

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Azure Container Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.REGISTRY_URL }}/clarusmens-api:${{ github.sha }}

- name: Login to Azure
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v3
with:
app-name: "clarusmens-api"
images: ${{ secrets.REGISTRY_URL }}/clarusmens-api:${{ github.sha }}
Comment on lines +12 to +44

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ logs/
.env
*.env
secrets.json
!.env.example
!*.env.template

# Dependency-Cache (NuGet)
packages/
Expand All @@ -39,8 +41,6 @@ libman.json

# Docker
docker-compose.override.yml
**/Dockerfile
**/.dockerignore

# Rider / JetBrains IDE
.idea/
Expand Down Expand Up @@ -90,4 +90,4 @@ changes.txt
staged_files.txt
staged.txt

.fake
.fake
50 changes: 25 additions & 25 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Bump Patch Version",
"type": "shell",
"command": "pwsh -File ${workspaceFolder}/Update-Version.ps1 -VersionType patch",
"problemMatcher": [],
"group": "none"
},
{
"label": "Bump Minor Version",
"type": "shell",
"command": "pwsh -File ${workspaceFolder}/Update-Version.ps1 -VersionType minor",
"problemMatcher": [],
"group": "none"
},
{
"label": "Bump Major Version",
"type": "shell",
"command": "pwsh -File ${workspaceFolder}/Update-Version.ps1 -VersionType major",
"problemMatcher": [],
"group": "none"
}
]
}
"version": "2.0.0",
"tasks": [
{
"label": "Bump Patch Version",
"type": "shell",
"command": "pwsh -File ${workspaceFolder}/scripts/Update-Version.ps1 -VersionType patch",
"problemMatcher": [],
"group": "none"
},
{
"label": "Bump Minor Version",
"type": "shell",
"command": "pwsh -File ${workspaceFolder}/scripts/Update-Version.ps1 -VersionType minor",
"problemMatcher": [],
"group": "none"
},
{
"label": "Bump Major Version",
"type": "shell",
"command": "pwsh -File ${workspaceFolder}/scripts/Update-Version.ps1 -VersionType major",
"problemMatcher": [],
"group": "none"
}
]
}
7 changes: 6 additions & 1 deletion ClarusMensAPI/ClarusMensAPI.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
Expand All @@ -9,6 +9,7 @@
<InvariantGlobalization>true</InvariantGlobalization>
<InternalsVisibleTo>ClarusMensAPI.FunctionalTests</InternalsVisibleTo>
<!-- Version properties are defined in Directory.Build.props -->
<UserSecretsId>5ed24bd9-a72b-4ad1-ab12-24e36e8e60fa</UserSecretsId>
</PropertyGroup>

<!-- Testing configuration with separate output path -->
Expand All @@ -23,7 +24,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.4.0" />
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.23.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.3.1" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
Expand Down
Loading
Loading