Skip to content

Commit 91ed8ca

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/src/Exceptionless.EmailTemplates/multi-966e8e9c3b
2 parents 838cb1c + 1b8d6aa commit 91ed8ca

File tree

357 files changed

+14282
-5727
lines changed

Some content is hidden

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

357 files changed

+14282
-5727
lines changed

.devcontainer/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
# (Adding the "ports" property to this file will not forward from a Codespace.)
2323

2424
elasticsearch:
25-
image: exceptionless/elasticsearch:8.17.0
25+
image: exceptionless/elasticsearch:8.17.4
2626
environment:
2727
node.name: elasticsearch
2828
cluster.name: exceptionless
@@ -38,7 +38,7 @@ services:
3838
kibana:
3939
depends_on:
4040
- elasticsearch
41-
image: docker.elastic.co/kibana/kibana:8.17.0
41+
image: docker.elastic.co/kibana/kibana:8.17.4
4242
environment:
4343
xpack.security.enabled: "false"
4444
ports:

.github/copilot-instructions.md

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# Copilot Instructions
2+
3+
This project features an **ASP.NET Core** backend (REST API) and a **Svelte 5 TypeScript** frontend (SPA).
4+
All contributions must respect existing formatting and conventions specified in the `.editorconfig` file.
5+
You are a distinguished engineer and are expected to deliver high-quality code that adheres to the guidelines below.
6+
7+
---
8+
9+
## 1. General Coding Guidelines
10+
11+
- **Code Style & Minimal Diffs:**
12+
- Match the file's existing style; use `.editorconfig` when unsure.
13+
- Preserve extra spaces, comments, and minimize diffs.
14+
- Always ask before creating new files, directories, or changing existing structures.
15+
- Always look at existing usages before refactoring or changing code to prevent new code from breaking existing code.
16+
- Assume any existing uncommitted code is correct and ask before changing it.
17+
- Don't add code comments unless necessary. Code should be self-explanatory.
18+
- Don't use deprecated or insecure libraries, algorithms or features.
19+
20+
- **Modern Code Practices:**
21+
- Write complete, runnable code—no placeholders or TODOs.
22+
- Use modern language features, clear naming conventions, and defensive coding when necessary.
23+
- Follow SOLID, DRY, and clean code principles. Remove unused code.
24+
25+
- **Behavior Management:**
26+
- Flag any user-visible changes for review.
27+
- Deliver exactly what’s requested—avoid adding unnecessary features unless explicitly instructed.
28+
29+
---
30+
31+
## 2. Frontend Guidelines (Svelte 5 / TypeScript SPA)
32+
33+
Located in the `src/Exceptionless.Web/ClientApp` directory.
34+
35+
- **Framework & Best Practices:**
36+
- Use Svelte 5 in SPA mode with TypeScript and Tailwind CSS.
37+
- Follow modern ES6 best practices and the ESLint recommended configuration ([standardjs](https://standardjs.com)).
38+
- Code can be formatted and linted with `npm run format` and checked for errors with `npm run check` tasks.
39+
- Don't use namespace imports unless importing svelte-shadcn component or from a barrel export index file.
40+
- Limit use of $effect as there is usually a better way to solve the problem like using $derived.
41+
- All single-line control statements in JavaScript must be enclosed in curly braces to ensure unambiguous control flow, enhance readability, and prevent potential errors arising from unintended statement grouping.
42+
43+
- **Architecture & Components:**
44+
- Follow the Composite Component Pattern.
45+
- Organize code into vertical slices (e.g., features aligned with API controllers) and maintain shared components in a central folder.
46+
- Use **kebab-case** for filenames and directories (e.g., `components/event-overview.svelte`).
47+
- Reexport generated code `src/Exceptionless.Web/ClientApp/src/lib/generated` from the respective feature models folder.
48+
- Always look for models in generated code before creating new models.
49+
- If a function returns a promise always await it.
50+
- **Do NOT** use any server-side Svelte features.
51+
52+
- **UI, Accessibility & Testing:**
53+
- Ensure excellent keyboard navigation for all interactions.
54+
- Build forms with shadcn-svelte forms & superforms, and validate with class-validator.
55+
- Good examples are the manage account and login pages.
56+
- Use formatters `src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/formatters` for displaying built-in types (date, number, boolean, etc.).
57+
- All dialogs should use shadcn-svelte dialog components.
58+
- Good examples are the mark fixed and delete stack dialogs.
59+
- Ensure semantic HTML, mobile-first design, and WCAG 2.2 Level AA compliance.
60+
- Use shadcn-svelte components (based on [bits-ui](https://bits-ui.com/docs/llms.txt)).
61+
- Look for new components in the shadcn-svelte documentation
62+
63+
- **API Calls:**
64+
- Use TanStack Query for all API calls centralized in an `api.svelte.ts` file.
65+
- Leverage `@exceptionless/fetchclient` for network operations.
66+
67+
- **Testing Tools:**
68+
- Unit Testing: Vitest
69+
- Component Testing: Testing Library
70+
- E2E Testing: Playwright
71+
72+
- **Reference documentation:**
73+
- Always use Svelte 5 features: [https://svelte.dev/llms-full.txt](https://svelte.dev/llms-full.txt)
74+
- on:click -> onclick
75+
- import { page } from '$app/stores'; -> import { page } from '$app/state';
76+
77+
---
78+
79+
## 3. Backend Guidelines (ASP.NET Core / C#)
80+
81+
- **Framework & Best Practices:**
82+
- Use the latest ASP.NET Core with C# and enable Nullable Reference Types.
83+
- Code can be formatted with `dotnet format` and checked for errors with `dotnet build`.
84+
85+
- **Conventions & Best Practices:**
86+
- Adhere to the `.editorconfig` file and Microsoft's [coding conventions](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions).
87+
- Follow Microsoft's [unit testing best practices](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-best-practices).
88+
89+
- **Architectural Considerations:**
90+
- Design services with awareness of distributed computing challenges.
91+
92+
---
93+
94+
## 4. Security Guidelines
95+
96+
- **Best Practices:**
97+
- Sanitize all user inputs and rigorously validate data.
98+
- Follow OWASP guidelines and implement a robust Content Security Policy.
99+
- Adopt Shift-Left security practices to identify vulnerabilities early.
100+
101+
---
102+
103+
## 5. Developer Planning & Reflection
104+
105+
- **Pre-Coding Reflection:**
106+
1. Identify the problem or feature you’re solving.
107+
2. Consider three possible approaches.
108+
3. Choose the simplest approach that satisfies all requirements.
109+
4. Clarify:
110+
- Can the solution be modularized into smaller functions?
111+
- Are there unnecessary abstractions?
112+
- Will the implementation be clear to a junior developer?
113+
114+
- **Post-Coding Reflection:**
115+
1. Review for refactor opportunities—can clarity or maintainability be improved?
116+
2. Identify potential edge cases or areas prone to bugs.
117+
3. Verify robust error handling and validation mechanisms.
118+
119+
---
120+
121+
## 6. Code Reviews
122+
123+
- **Focus Areas:**
124+
- Ensure adherence to complexity, consistency, and clean code standards.
125+
- Validate robust error handling and defensive coding practices.
126+
- Check for duplication and maintainable solutions.
127+
128+
---
129+
130+
## 7. Debugging Guidelines
131+
132+
1. **Reproduce** the issue with minimal steps and code.
133+
2. **Understand** the underlying problem thoroughly.
134+
3. **Form Hypotheses** about the cause.
135+
4. **Test & Verify** potential solutions.
136+
5. **Document** fixes and adjustments clearly for future reference.
137+
138+
---
139+
140+
## 8. Project Structure
141+
142+
```plaintext
143+
project-root/
144+
├── build # Build files
145+
├── docker # Docker files
146+
├── k8s # Kubernetes files
147+
├── samples
148+
├── src
149+
│   ├── Exceptionless.AppHost # Aspire
150+
│   ├── Exceptionless.Core # Domain
151+
│   ├── Exceptionless.EmailTemplates # Email Templates
152+
│   ├── Exceptionless.Insulation # Concrete Implementations
153+
│   ├── Exceptionless.Job # ASP.NET Core Jobs
154+
│   ├── Exceptionless.Web # ASP.NET Core Web Application
155+
│   │   ├── ClientApp # Frontend SvelteKit Spa Application
156+
│   │   │   ├── api-templates # API templates for generated code using OpenApi
157+
│   │   │   ├── e2e
158+
│   │   │   ├── src # JavaScript SvelteKit application
159+
│   │   │   │   ├── lib
160+
│   │   │   │   │   ├── assets # Static assets
161+
│   │   │   │   │   ├── features # Vertical Sliced Features, each folder corresponds to an api controller
162+
│   │   │   │   │   │   ├── events # Event features (related to Events Controller)
163+
│   │   │   │   │   │   │   ├── components
164+
│   │   │   │   │   │   │   └── models
165+
│   │   │   │   │   │   ├── organizations
166+
│   │   │   │   │   │   ├── projects
167+
│   │   │   │   │   │   │   └── components
168+
│   │   │   │   │   │   ├── shared # Shared components used by all other features
169+
│   │   │   │   │   │   │   ├── api
170+
│   │   │   │   │   │   │   ├── components
171+
│   │   │   │   │   │   │   └── models
172+
│   │   │   │   │   │   ├── stacks
173+
│   │   │   │   │   │   │   └── components
174+
│   │   │   │   │   ├── generated # Generated code
175+
│   │   │   │   │   ├── hooks # Client hooks
176+
│   │   │   │   │   └── utils # Utility functions
177+
│   │   │   │   └── routes # Application routes
178+
│   │   │   │   ├── (app)
179+
│   │   │   │   │   ├── account
180+
│   │   │   │   │   └── stream
181+
│   │   │   │   ├── (auth)
182+
│   │   │   │   │   ├── login
183+
│   │   │   │   │   └── logout
184+
│   │   │   │   └── status
185+
│   │   │   └── static # Static assets
186+
│   │   ├── ClientApp.angular # Legacy Angular Client Application (Ignore)
187+
│   │   ├── Controllers # ASP.NET Core Web API Controllers
188+
│   └── tests # ASP.NET Core Unit and Integration Tests
189+
```
190+
191+
---
192+
193+
### Additional Considerations
194+
195+
- **Expanding the Guidelines:**
196+
As the project evolves, consider including sample code snippets, decision flowcharts, or ASCII diagrams to clarify more complex guidelines.
197+
198+
- **Continuous Improvement:**
199+
Regularly review and update these guidelines to stay aligned with evolving best practices and emerging technologies.
200+
201+
- **Thoughtful Contribution:**
202+
Always strive to deliver code that not only functions well but also advances the overall maintainability and quality of the project.
203+
204+
Let's keep pushing for clarity, usability, and excellence—both in code and user experience.

.vscode/extensions.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
"streetsidesoftware.code-spell-checker",
55
"tintoy.msbuild-project-tools",
66
"humao.rest-client",
7-
"ms-kubernetes-tools.vscode-kubernetes-tools"
7+
"ms-kubernetes-tools.vscode-kubernetes-tools",
8+
"svelte.svelte-vscode",
9+
"bradlc.vscode-tailwindcss",
10+
"dbaeumer.vscode-eslint",
11+
"esbenp.prettier-vscode",
12+
"ms-playwright.playwright",
13+
"selemondev.vscode-shadcn-svelte",
14+
"vitest.explorer"
815
]
916
}

.vscode/launch.json

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4+
{
5+
"name": "Aspire",
6+
"type": "coreclr",
7+
"request": "launch",
8+
"preLaunchTask": "build",
9+
"program": "${workspaceFolder}/src/Exceptionless.AppHost/bin/Debug/net9.0/Exceptionless.AppHost.dll",
10+
"args": [],
11+
"cwd": "${workspaceFolder}/src/Exceptionless.AppHost",
12+
"stopAtEntry": false,
13+
"serverReadyAction": {
14+
"action": "openExternally",
15+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
16+
},
17+
"env": {
18+
"AppMode": "Development"
19+
}
20+
},
421
{
522
"name": "Web",
623
"type": "coreclr",
724
"request": "launch",
825
"preLaunchTask": "build",
9-
// If you have changed target frameworks, make sure to update the program path.
1026
"program": "${workspaceFolder}/src/Exceptionless.Web/bin/Debug/net9.0/Exceptionless.Web.dll",
1127
"args": [],
1228
"cwd": "${workspaceFolder}/src/Exceptionless.Web",
@@ -24,7 +40,6 @@
2440
"type": "coreclr",
2541
"request": "launch",
2642
"preLaunchTask": "build",
27-
// If you have changed target frameworks, make sure to update the program path.
2843
"program": "${workspaceFolder}/src/Exceptionless.Job/bin/Debug/net9.0/Exceptionless.Job.dll",
2944
"args": [],
3045
"cwd": "${workspaceFolder}",
@@ -38,6 +53,68 @@
3853
"name": ".NET Core Attach",
3954
"type": "coreclr",
4055
"request": "attach"
56+
},
57+
{
58+
"name": "frontend: Attach to Chrome",
59+
"port": 9222,
60+
"request": "attach",
61+
"type": "chrome",
62+
"webRoot": "${workspaceFolder}/src/Exceptionless.Web/ClientApp"
63+
},
64+
{
65+
"name": "frontend: Attach to Edge",
66+
"port": 9222,
67+
"request": "attach",
68+
"type": "msedge",
69+
"webRoot": "${workspaceFolder}/src/Exceptionless.Web/ClientApp"
70+
},
71+
{
72+
"type": "msedge",
73+
"request": "launch",
74+
"name": "frontend: Web (Edge)",
75+
"url": "http://localhost:5173/next",
76+
"webRoot": "${workspaceFolder}/src/Exceptionless.Web/ClientApp",
77+
"preLaunchTask": "npm run dev"
78+
},
79+
{
80+
"type": "msedge",
81+
"request": "launch",
82+
"name": "frontend: Web Dev Api (Edge)",
83+
"url": "http://localhost:5173/next",
84+
"webRoot": "${workspaceFolder}/src/Exceptionless.Web/ClientApp",
85+
"preLaunchTask": "npm run dev:api"
86+
},
87+
{
88+
"type": "msedge",
89+
"request": "launch",
90+
"name": "frontend: Storybook (Edge)",
91+
"url": "http://localhost:6006",
92+
"webRoot": "${workspaceFolder}/src/Exceptionless.Web/ClientApp",
93+
"preLaunchTask": "npm run storybook"
94+
},
95+
{
96+
"type": "chrome",
97+
"request": "launch",
98+
"name": "frontend: Web (Chrome)",
99+
"url": "http://localhost:5173/next",
100+
"webRoot": "${workspaceFolder}/src/Exceptionless.Web/ClientApp",
101+
"preLaunchTask": "npm run dev"
102+
},
103+
{
104+
"type": "chrome",
105+
"request": "launch",
106+
"name": "frontend: Web Dev Api (Chrome)",
107+
"url": "http://localhost:5173/next",
108+
"webRoot": "${workspaceFolder}/src/Exceptionless.Web/ClientApp",
109+
"preLaunchTask": "npm run dev:api"
110+
},
111+
{
112+
"type": "chrome",
113+
"request": "launch",
114+
"name": "frontend: Storybook (Chrome)",
115+
"url": "http://localhost:6006",
116+
"webRoot": "${workspaceFolder}/src/Exceptionless.Web/ClientApp",
117+
"preLaunchTask": "npm run storybook"
41118
}
42119
]
43-
}
120+
}

0 commit comments

Comments
 (0)