|
| 1 | +# GitHub Copilot Instructions |
| 2 | + |
| 3 | +## Key Technologies |
| 4 | + |
| 5 | +- **C# 13.0** |
| 6 | +- **ASP.NET Core 9.0** |
| 7 | +- **Blazor**: Component-based web UI framework |
| 8 | +- **.NET MAUI Blazor Hybrid**: Cross-platform app development |
| 9 | +- **ASP.NET Core Identity**: Authentication and authorization |
| 10 | +- **Entity Framework Core**: Data access |
| 11 | +- **SignalR**: Real-time communication |
| 12 | +- **Hangfire**: Background job processing |
| 13 | +- **OData**: Advanced querying capabilities |
| 14 | +- **Bit.BlazorUI**: Primary UI component library |
| 15 | +- **Microsoft.Extensions.AI**: AI integration |
| 16 | +- **TypeScript**: Type-safe JavaScript development |
| 17 | +- **SCSS**: Advanced CSS preprocessing |
| 18 | + |
| 19 | +## Coding Conventions & Best Practices |
| 20 | + |
| 21 | +1. **Follow the established project structure**: Adhere to the defined layout for consistency. |
| 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. |
| 23 | +3. **Embrace Nullable Reference Types**: All new code must be nullable-aware, as nullability is enabled project-wide. |
| 24 | +4. **Leverage Dependency Injection**: Register and resolve services using the built-in DI container. |
| 25 | +5. **Implement Structured Logging**: Use structured logging for clear, queryable application logs. |
| 26 | +6. **Adhere to Security Best Practices**: Implement robust authentication and authorization patterns. |
| 27 | +7. **Use Async Programming**: Employ `async/await` for I/O-bound operations to prevent blocking threads. |
| 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 | +10. **Respect .editorconfig**: Adhere to the `.editorconfig` file for consistent code style across all IDEs. |
| 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 | +13. **After applying changes, make sure project builds successfully**: Always verify that the project builds without errors after making changes. |
| 33 | + |
| 34 | +### Rules for Using MCP |
| 35 | + |
| 36 | +**RULE 1:** If a task (question, code modification or review) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`), |
| 37 | +or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Besql`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit, |
| 38 | +you **MUST** use the deepwiki's `ask_question` mcp tool to find the correct implementation and usage patterns of `bitfoundation/bitplatform` deep wiki before writing or changing any code. |
| 39 | + |
| 40 | +**End of RULE 1** |
| 41 | + |
| 42 | +**RULE 2 Command:** |
| 43 | +Use Playwright MCP tools like browser_navigate for URLs, browser_click for interactions, and browser_snapshot for page analysis. |
| 44 | + |
| 45 | +**End of RULE 2** |
0 commit comments