Skip to content

Commit d86f643

Browse files
Merge pull request #1 from jamesmontemagno/copilot/convert-workshop-to-csharp-dotnet10
Convert workshop to C# .NET 10 Blazor WebAssembly
2 parents b0e4d8f + 49c9831 commit d86f643

File tree

905 files changed

+614652
-6132
lines changed

Some content is hidden

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

905 files changed

+614652
-6132
lines changed

.devcontainer/devcontainer.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
{
2-
"name": "Soc-Ops React TypeScript",
3-
"image": "mcr.microsoft.com/devcontainers/typescript-node:22",
2+
"name": "Soc-Ops Blazor C#",
3+
"image": "mcr.microsoft.com/devcontainers/dotnet:10.0",
44
"customizations": {
55
"vscode": {
66
"extensions": [
7-
"vitest.explorer",
8-
"dbaeumer.vscode-eslint",
9-
"bradlc.vscode-tailwindcss"
7+
"ms-dotnettools.csdevkit",
8+
"ms-dotnettools.csharp"
109
]
1110
},
1211
"codespaces": {
1312
"openFiles": [
14-
"src/App.tsx",
13+
"SocOps/Pages/Home.razor",
1514
"README.md"
1615
]
1716
}
1817
},
19-
"postCreateCommand": "npm install",
20-
"forwardPorts": [5173],
18+
"postCreateCommand": "dotnet restore SocOps/SocOps.csproj",
19+
"forwardPorts": [5166],
2120
"portsAttributes": {
22-
"5173": {
23-
"label": "Vite Dev Server",
21+
"5166": {
22+
"label": "Blazor Dev Server",
2423
"onAutoForward": "openPreview"
2524
}
2625
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
description: CSS utility classes and styling practices for this Blazor project.
3+
---
4+
5+
# CSS Styling Practices
6+
7+
## Overview
8+
This project uses custom CSS utility classes (similar to Tailwind) defined in `wwwroot/css/app.css`. These provide consistent, composable styling without external dependencies.
9+
10+
## Available Utilities
11+
12+
### Layout
13+
```css
14+
.flex, .flex-col, .flex-1
15+
.grid, .grid-cols-5
16+
.items-center, .justify-center, .justify-between
17+
```
18+
19+
### Spacing
20+
```css
21+
.p-1 through .p-6, .px-*, .py-*
22+
.mb-2 through .mb-8, .mx-auto
23+
.gap-1, .space-y-2
24+
```
25+
26+
### Sizing
27+
```css
28+
.h-full, .w-full, .min-h-full
29+
.max-w-xs, .max-w-sm, .max-w-md
30+
.aspect-square
31+
```
32+
33+
### Colors
34+
```css
35+
.bg-white, .bg-gray-50, .bg-gray-100
36+
.bg-accent (primary blue), .bg-marked (green for selected)
37+
.text-gray-500 through .text-gray-900
38+
.text-green-600, .text-amber-500
39+
```
40+
41+
### Typography
42+
```css
43+
.text-xs through .text-5xl
44+
.font-semibold, .font-bold
45+
.text-center, .text-left
46+
.leading-tight
47+
```
48+
49+
### Borders & Shadows
50+
```css
51+
.border, .border-b
52+
.rounded, .rounded-lg, .rounded-xl
53+
.shadow-sm, .shadow-xl
54+
```
55+
56+
### Positioning
57+
```css
58+
.fixed, .absolute, .relative
59+
.inset-0, .z-50
60+
```
61+
62+
### Animation
63+
```css
64+
.transition-all, .transition-colors
65+
.duration-150
66+
.animate-[bounce_0.5s_ease-out]
67+
```
68+
69+
## Best Practices
70+
71+
1. **Compose utilities**: Combine classes for complex layouts
72+
2. **Add new utilities to app.css**: When needed, follow existing patterns
73+
3. **Use CSS variables**: For theming, define in `:root`
74+
4. **Keep specificity low**: Utility classes should be single-purpose
75+
76+
## Example Component Styling
77+
```razor
78+
<div class="flex flex-col items-center justify-center min-h-full bg-gray-50">
79+
<button class="px-6 py-3 bg-accent text-white rounded-lg font-semibold">
80+
Start Game
81+
</button>
82+
</div>
83+
```

.github/instructions/frontend-design.instructions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You tend to converge toward generic, "on distribution" outputs. In frontend desi
88
Focus on:
99
- Typography: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics.
1010
- Color & Theme: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Draw from IDE themes and cultural aesthetics for inspiration.
11-
- Motion: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions.
11+
- Motion: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for Blazor components. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions.
1212
- Backgrounds: Create atmosphere and depth rather than defaulting to solid colors. Layer CSS gradients, use geometric patterns, or add contextual effects that match the overall aesthetic.
1313

1414
Avoid generic AI-generated aesthetics:
@@ -18,7 +18,6 @@ Avoid generic AI-generated aesthetics:
1818
- Cookie-cutter design that lacks context-specific character
1919

2020
Interpret creatively and make unexpected choices that feel genuinely designed for the context. Vary between light and dark themes, different fonts, different aesthetics. You still tend to converge on common choices (Space Grotesk, for example) across generations. Avoid this: it is critical that you think outside the box!
21-
</frontend_aesthetics>
2221

2322
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
2423

.github/instructions/tailwind-4.instructions.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

.github/prompts/setup.prompt.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
agent: agent
33
description: Get my development workspace ready
4-
tools: ['vscode/openSimpleBrowser', 'execute/runTask', 'read/getTaskOutput', 'execute/runInTerminal', 'read', 'search', 'todo']
4+
tools: ['vscode/openSimpleBrowser', 'execute/runTask', 'execute/runInTerminal', 'read', 'search', 'todo']
55
---
66

77
Your goal is to successfully build and run the workspace as local development environment.
88

99
## Checklist
10-
- [ ] Required dependencies from package.json/README.md installed
11-
- [ ] Lint, build and test tasks functional
12-
- [ ] Dev server running
10+
- [ ] Required dependencies (.NET 10 SDK) installed and verified
11+
- [ ] Build task functional
12+
- [ ] Dev server running (dotnet run)
1313
- [ ] Site open in browser preview
1414
- [ ] Short engaging welcome tour for the workspace

.github/workflows/deploy.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,25 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25-
- uses: actions/setup-node@v4
25+
- uses: actions/setup-dotnet@v4
2626
with:
27-
node-version: '22'
28-
cache: 'npm'
27+
dotnet-version: '10.0.x'
2928

30-
- run: npm ci
29+
- name: Restore dependencies
30+
run: dotnet restore SocOps/SocOps.csproj
3131

3232
- name: Build
33-
run: npm run build
34-
env:
35-
VITE_REPO_NAME: ${{ github.event.repository.name }}
33+
run: dotnet publish SocOps/SocOps.csproj -c Release -o release --nologo
34+
35+
- name: Change base-tag in index.html
36+
run: |
37+
sed -i 's/<base href="\/" \/>/<base href="\/${{ github.event.repository.name }}\/" \/>/g' release/wwwroot/index.html
3638
3739
- uses: actions/configure-pages@v4
3840

3941
- uses: actions/upload-pages-artifact@v3
4042
with:
41-
path: dist
43+
path: release/wwwroot
4244

4345
- name: Deploy to GitHub Pages
4446
id: deployment

.gitignore

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,53 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
1+
# Build results
2+
[Dd]ebug/
3+
[Dd]ebugPublic/
4+
[Rr]elease/
5+
[Rr]eleases/
6+
x64/
7+
x86/
8+
[Ww][Ii][Nn]32/
9+
[Aa][Rr][Mm]/
10+
[Aa][Rr][Mm]64/
11+
bld/
12+
[Bb]in/
13+
[Oo]bj/
14+
[Ll]og/
15+
[Ll]ogs/
916

10-
node_modules
11-
dist
12-
dist-ssr
13-
*.local
17+
# Visual Studio cache/options
18+
.vs/
1419

15-
# Editor directories and files
20+
# Visual Studio Code
21+
!.vscode/extensions.json
22+
.vscode/*
23+
!.vscode/settings.json
24+
!.vscode/tasks.json
25+
!.vscode/launch.json
1626
!.vscode/extensions.json
27+
!.vscode/*.json
28+
29+
# User-specific files
30+
*.rsuser
31+
*.suo
32+
*.user
33+
*.userosscache
34+
*.sln.docstates
35+
36+
# Files built by Visual Studio
37+
*.pidb
38+
*.svclog
39+
*.scc
40+
41+
# Editor directories and files
1742
.idea
1843
.DS_Store
19-
*.suo
20-
*.ntvs*
21-
*.njsproj
22-
*.sln
2344
*.sw?
2445
.playwright-mcp
46+
47+
# .NET Core
48+
project.lock.json
49+
project.fragment.lock.json
50+
artifacts/
51+
52+
# Local
53+
*.local

.lab/GUIDE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ Harald Kirschner `@digitarald`
88
- [ ] Latest VS Code **v1.107** (no update pending)
99
- [ ] Signed in with GitHub
1010
- Copilot Free can not run cloud agent!
11-
- [ ] Git & Node installed
11+
- [ ] Git & .NET 10 SDK installed
1212
- [ ] Chat open and Agent ready for action
1313

1414
*Optional*: Use DevContainer or WSL.
1515

1616
## Setup
1717

1818

19-
1. Open https://github.com/microsoft/vscode-agent-lab-soc-ops
20-
1. *Use this template* > *Create a new repository* (pick `my-soc-ops`, make it *Public*)
19+
1. Open https://github.com/jamesmontemagno/vscode-agent-lab-soc-ops-csharp
20+
1. *Use this template* > *Create a new repository* (pick `my-soc-ops-csharp`, make it *Public*)
2121
- ✅ Your own *soc-ops* GitHub repo is ready
2222
2. ⚠️ Enable *Settings* > *Pages* > *Deploy from a branch* to *GitHub Actions*
2323
- ✅ Any commit to the repo will publish the game as GitHub page: `http://{your-gh-username}.github.io/{my-soc-ops}`
@@ -77,11 +77,11 @@ Result: All future requests will have basic map of the workspace.
7777

7878
Result: Agents completed adjusted the rules, fixed errors, and all edits are merged back into main. Stricter linting rules will catch any human/agent mistakes earlier.
7979

80-
### Task: Check Tailwind 4 instructions
80+
### Task: Check CSS Utilities instructions
8181

82-
**TL;DR**: Tailwind v4 instructions close gaps from training data and document the latest best practices.
82+
**TL;DR**: CSS utility instructions document the custom Tailwind-like classes available in this Blazor project.
8383

84-
See prompt in the footer.
84+
See `.github/instructions/css-utilities.instructions.md`.
8585

8686
**Optional**, if interested how it works: Delete main text and re-run the prompt
8787

@@ -137,7 +137,7 @@ Ideas:
137137
- Bold Serif Vintage
138138
- Toybox Primary Colors
139139

140-
Result: Frontend and tailwind instructions are use to build a beautiful design.
140+
Result: Frontend and CSS utility instructions are used to build a beautiful design.
141141

142142
### Task: Keep instructions updated
143143

0 commit comments

Comments
 (0)