|
1 | | -# copilot-instructions.md |
| 1 | +# GitHub Copilot Instructions |
| 2 | + |
| 3 | +## Key Technologies |
2 | 4 |
|
3 | | -### Technologies |
4 | 5 | - **C# 13.0** |
5 | 6 | - **ASP.NET Core 9.0** |
6 | 7 | - **Blazor**: Component-based web UI framework |
7 | | -- **.NET MAUI**: Cross-platform app development |
| 8 | +- **.NET MAUI Blazor Hybrid**: Cross-platform app development |
8 | 9 | - **ASP.NET Core Identity**: Authentication and authorization |
9 | 10 | - **Entity Framework Core**: Data access |
10 | 11 | - **SignalR**: Real-time communication |
|
15 | 16 | - **TypeScript**: Type-safe JavaScript development |
16 | 17 | - **SCSS**: Advanced CSS preprocessing |
17 | 18 |
|
18 | | -### Best Practices |
| 19 | +## Coding Conventions & Best Practices |
19 | 20 |
|
20 | 21 | 1. **Follow the established project structure**: Adhere to the defined layout for consistency. |
21 | 22 | 2. **Use Bit.BlazorUI Components**: Prioritize using components from the Bit.BlazorUI library over generic HTML to ensure UI consistency and leverage built-in features. |
|
24 | 25 | 5. **Implement Structured Logging**: Use structured logging for clear, queryable application logs. |
25 | 26 | 6. **Adhere to Security Best Practices**: Implement robust authentication and authorization patterns. |
26 | 27 | 7. **Use Async Programming**: Employ `async/await` for I/O-bound operations to prevent blocking threads. |
27 | | -8. **Utilize Latest C# Features**: Write modern, concise, and efficient code by using the latest C# language features. |
28 | | -9. **Leverage Implicit Usings**: Take advantage of global using statements. |
| 28 | +8. **Modern C#**: Write modern, concise, and efficient code by using the latest C# language features, including implicit usings and global using statements. |
29 | 29 | 10. **Respect .editorconfig**: Adhere to the `.editorconfig` file for consistent code style across all IDEs. |
30 | | -12. **Prefer razor.cs code-behind files**: Use `.razor.cs` files for component logic instead of @code blocks in `.razor` files. |
31 | | -13. **Prefer razor.scss files**: Use `.razor.scss` files for component styles instead of inline styles in `.razor` files. |
| 30 | +11. **Prefer razor.cs code-behind files**: Use `.razor.cs` files for component logic instead of @code blocks in `.razor` files. |
| 31 | +12. **Prefer razor.scss files**: Use `.razor.scss` files for component styles instead of inline styles in `.razor` files. |
32 | 32 |
|
33 | 33 | ### Rules for Using DeepWiki |
34 | 34 |
|
35 | | -The `deepwiki` MCP tool is essential for this project. Use it not only to answer questions but also to guide **code modifications**. |
| 35 | +The deepwiki's `ask_question` mcp tool is essential for this project. Use it not only to answer questions but also to guide **code modifications**. |
36 | 36 | For the topics below, you **MUST** consult `deepwiki` to find correct implementations and usage patterns before writing or changing any code. |
37 | 37 |
|
38 | 38 | **RULE 1:** If a task (which includes answering a question or performing a code modification) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`), or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Besql`, or `bit Boilerplate`, |
39 | | -you **MUST** use the `deepwiki` mcp tool to find the correct implementation and usage patterns before writing or changing any code. |
| 39 | +you **MUST** use the deepwiki's `ask_question` mcp tool to find the correct implementation and usage patterns before writing or changing any code. |
40 | 40 |
|
41 | 41 | **RULE 1 Command:** |
42 | 42 | `deepwiki fetch bitfoundation/bitplatform` |
43 | 43 |
|
44 | 44 | **End of RULE 1** |
45 | 45 |
|
46 | | -**RULE 2:** If a task (question or code modification) involves mappers, or refers to `mapperly`, `map`, `project`, or `patch`, you **MUST** use the `deepwiki` mcp tool to find the correct implementation before writing or changing any code. |
| 46 | +**RULE 2:** If a task (question or code modification) involves mappers, or refers to `mapperly`, `map`, `project`, or `patch`, you **MUST** use the deepwiki's `ask_question` mcp tool to find the correct implementation before writing or changing any code. |
47 | 47 |
|
48 | 48 | **RULE 2 Command:** |
49 | 49 | `deepwiki fetch riok/mapperly` |
50 | 50 |
|
51 | 51 | **End of RULE 2** |
52 | 52 |
|
53 | | -**RULE 3:** If a task (question or code modification) involves .NET MAUI, or refers to `xaml`, `Android`, `iOS`, or `Windows`, you **MUST** use the `deepwiki` mcp tool to find the correct implementation before writing or changing any code. |
| 53 | +**RULE 3:** If a task (question or code modification) involves .NET MAUI, or refers to `xaml`, `Android`, `iOS`, or `Windows`, you **MUST** use the deepwiki's `ask_question` mcp tool to find the correct implementation before writing or changing any code. |
54 | 54 |
|
55 | 55 | **RULE 3 Command:** |
56 | 56 | `deepwiki fetch dotnet/maui` |
57 | 57 |
|
58 | 58 | **End of RULE 3** |
59 | 59 |
|
60 | | -**RULE 4:** If a task (question or code modification) involves Hangfire, or refers to `background job` or `recurring jobs`, you **MUST** use the `deepwiki` mcp tool to find the correct implementation before writing or changing any code. |
| 60 | +**RULE 4:** If a task (question or code modification) involves Hangfire, or refers to `background job` or `recurring jobs`, you **MUST** use the deepwiki's `ask_question` mcp tool to find the correct implementation before writing or changing any code. |
61 | 61 |
|
62 | 62 | **RULE 4 Command:** |
63 | 63 | `deepwiki fetch HangfireIO/Hangfire` |
64 | 64 |
|
65 | 65 | **End of RULE 4** |
66 | 66 |
|
67 | | -**RULE 5:** If a task (question or code modification) involves file storage, or refers to `fluent storage` or `S3`, you **MUST** use the `deepwiki` mcp tool to find the correct implementation before writing or changing any code. |
| 67 | +**RULE 5:** If a task (question or code modification) involves file storage, or refers to `fluent storage` or `S3`, you **MUST** use the deepwiki's `ask_question` mcp tool to find the correct implementation before writing or changing any code. |
68 | 68 |
|
69 | 69 | **RULE 5 Command:** |
70 | 70 | `deepwiki fetch robinrodricks/FluentStorage` |
|
0 commit comments