Skip to content

Commit b44b26a

Browse files
Merge pull request #10 from microting/master
Master changes
2 parents a6ab3b9 + 135340f commit b44b26a

File tree

6 files changed

+588
-415
lines changed

6 files changed

+588
-415
lines changed

.github/copilot-instructions.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,35 @@ This is **eForm Angular Frontend**, a multi-component application consisting of:
88
- **Docker Configuration** - Containerization setup
99
- **GitHub Actions** - CI/CD workflows
1010

11+
## Task Suitability for Copilot
12+
13+
### ✅ Well-Suited Tasks for Copilot
14+
Copilot coding agent excels at:
15+
- **Bug fixes** - Fixing identified issues with clear reproduction steps
16+
- **UI improvements** - Making visual adjustments and accessibility enhancements
17+
- **Test additions** - Adding unit tests, integration tests, or E2E tests
18+
- **Documentation updates** - Updating README, API docs, or inline comments
19+
- **Code refactoring** - Improving code quality while maintaining functionality
20+
- **Dependency updates** - Updating package versions and fixing breaking changes
21+
- **Translation updates** - Adding or updating localization files
22+
- **Accessibility improvements** - Adding ARIA labels, keyboard navigation, etc.
23+
24+
### ❌ Tasks to Avoid Assigning to Copilot
25+
Do not assign these complex tasks:
26+
- **Architectural changes** - Major structural redesigns requiring deep domain knowledge
27+
- **Business logic** - Critical business rules and decision-making code
28+
- **Security implementations** - Authentication, authorization, encryption logic
29+
- **Database migrations** - Complex schema changes affecting multiple systems
30+
- **Performance optimizations** - System-wide performance improvements requiring profiling
31+
- **Third-party integrations** - Initial setup of complex external service integrations
32+
33+
### 💡 Tips for Creating Good Issues for Copilot
34+
- Provide clear, specific descriptions of the problem or feature
35+
- Include acceptance criteria (e.g., "should have tests", "should update docs")
36+
- Specify affected files or components when known
37+
- Include examples or screenshots for UI changes
38+
- Reference related issues or pull requests for context
39+
1140
## Prerequisites and Environment
1241

1342
### Required Software Versions
@@ -257,6 +286,96 @@ This is a **full-stack application** with separate frontend and backend componen
257286
- Authentication/authorization spans both components
258287
- Build processes are independent but coordinated
259288

289+
## Code Style and Conventions
290+
291+
### Angular Frontend (TypeScript)
292+
- **Angular Style Guide**: Follow the [Official Angular Style Guide](https://angular.io/guide/styleguide)
293+
- **Component Structure**: Use standalone components where appropriate
294+
- **Naming Conventions**:
295+
- Components: `PascalCase` (e.g., `UserListComponent`)
296+
- Services: `PascalCase` with `Service` suffix (e.g., `UserService`)
297+
- Modules: `PascalCase` with `Module` suffix (e.g., `CoreModule`)
298+
- Files: `kebab-case` (e.g., `user-list.component.ts`)
299+
- **TypeScript**: Use strict type checking, avoid `any` when possible
300+
- **Imports**: Organize imports in order: Angular, third-party, local
301+
- **RxJS**: Use the pipe operator, avoid nested subscribes
302+
- **Translations**: Use translation keys from `src/assets/i18n/` files
303+
304+
### .NET Core API (C#)
305+
- **Naming Conventions**: Follow Microsoft's C# conventions
306+
- PascalCase for public members, methods, classes
307+
- camelCase for private fields
308+
- Prefix interfaces with `I` (e.g., `IUserService`)
309+
- **Async/Await**: Use async/await for all I/O operations
310+
- **Dependency Injection**: Register services in `Program.cs`
311+
- **API Controllers**: Use attribute routing, return ActionResult types
312+
- **Error Handling**: Use try-catch blocks, return appropriate HTTP status codes
313+
- **Testing**: Write unit tests for business logic, integration tests for API endpoints
314+
315+
### General Practices
316+
- **Comments**: Write self-documenting code; add comments only for complex logic
317+
- **Git Commits**: Use conventional commit format (feat:, fix:, docs:, etc.)
318+
- **Pull Requests**: Keep PRs small and focused on a single issue
319+
- **Code Reviews**: Address all review comments before merging
320+
321+
## Pull Request Workflow with Copilot
322+
323+
### Creating Pull Requests
324+
- Copilot automatically creates PRs for assigned issues
325+
- PR title follows format: `[Issue Type] Brief description`
326+
- PR description includes implementation details and testing notes
327+
328+
### Iterating on Pull Requests
329+
- **Provide feedback** by commenting on specific lines or the PR overall
330+
- **Tag @copilot** in comments to request changes
331+
- Be specific in feedback: "Please add error handling for null values"
332+
- Copilot will update the PR based on your feedback
333+
334+
### Before Merging
335+
- Ensure all CI/CD checks pass (build, tests, linting)
336+
- Review code changes manually for logic errors
337+
- Verify documentation updates are included if needed
338+
- Confirm tests are added for new functionality
339+
340+
## Validation Guidelines for Copilot
341+
342+
When making changes, always:
343+
344+
1. **Run Linters**:
345+
```bash
346+
# Frontend
347+
cd eform-client && yarn lint
348+
349+
# Backend (if applicable linters exist)
350+
cd eFormAPI && dotnet format --verify-no-changes
351+
```
352+
353+
2. **Build the Project**:
354+
```bash
355+
# Build both frontend and backend
356+
cd eFormAPI && dotnet build
357+
cd ../eform-client && yarn build
358+
```
359+
360+
3. **Run Tests**:
361+
```bash
362+
# Run relevant tests for changed code
363+
cd eFormAPI && dotnet test
364+
cd ../eform-client && yarn test:unit
365+
```
366+
367+
4. **Manual Verification**:
368+
- For UI changes: Start dev server and verify visually
369+
- For API changes: Test endpoints with sample requests
370+
- For bug fixes: Verify the original issue is resolved
371+
- For new features: Test happy path and edge cases
372+
373+
5. **Documentation**:
374+
- Update inline comments if logic is complex
375+
- Update README.md if user-facing changes exist
376+
- Update API documentation if endpoints change
377+
- Update translation files if UI text is added
378+
260379
## Security Considerations
261380

262381
- API endpoints require proper authentication

eFormAPI/eFormAPI.Web.Integration.Tests/eFormAPI.Web.Integration.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ItemGroup>
1010
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
1111
<PackageReference Include="NUnit" Version="4.4.0" />
12-
<PackageReference Include="NUnit.Analyzers" Version="4.11.0">
12+
<PackageReference Include="NUnit.Analyzers" Version="4.11.1">
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
<PrivateAssets>all</PrivateAssets>
1515
</PackageReference>

eFormAPI/eFormAPI.Web.Tests/eFormAPI.Web.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ItemGroup>
1010
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
1111
<PackageReference Include="NUnit" Version="4.4.0" />
12-
<PackageReference Include="NUnit.Analyzers" Version="4.11.0">
12+
<PackageReference Include="NUnit.Analyzers" Version="4.11.1">
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
<PrivateAssets>all</PrivateAssets>
1515
</PackageReference>

eFormAPI/eFormAPI.Web/eFormAPI.Web.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.10" />
5656
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.10" />
5757
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
58-
<PackageReference Include="Microting.eForm" Version="9.0.68" />
59-
<PackageReference Include="Microting.EformAngularFrontendBase" Version="9.0.55" />
60-
<PackageReference Include="Microting.eFormApi.BasePn" Version="9.0.60" />
58+
<PackageReference Include="Microting.eForm" Version="9.0.69" />
59+
<PackageReference Include="Microting.EformAngularFrontendBase" Version="9.0.57" />
60+
<PackageReference Include="Microting.eFormApi.BasePn" Version="9.0.61" />
6161
<PackageReference Include="PureOtp" Version="1.0.0.1" />
62-
<PackageReference Include="Sentry" Version="5.16.1" />
62+
<PackageReference Include="Sentry" Version="5.16.2" />
6363
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.6" />
6464
<PackageReference Include="McMaster.NETCore.Plugins" Version="2.0.0" />
6565
<PackageReference Include="sendgrid" Version="9.29.3" />

eform-client/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@
8484
"@ngx-translate/core": "17.0.0",
8585
"@sentry/angular": "^10.22.0",
8686
"@sentry/cli": "^2.56.1",
87-
"@swimlane/ngx-charts": "23.0.1",
87+
"@swimlane/ngx-charts": "23.1.0",
8888
"@types/ramda": "^0.31.1",
8989
"@userback/widget": "^0.3.11",
9090
"build": "^0.1.4",
91-
"core-js": "3.45.1",
91+
"core-js": "3.46.0",
9292
"d3": "7.9.0",
9393
"date-fns": "4.1.0",
9494
"date-fns-tz": "3.2.0",
@@ -104,7 +104,7 @@
104104
"ng2-file-upload": "^9.0.0",
105105
"ng2-pdf-viewer": "^10.3.4",
106106
"ngx-auto-unsubscribe": "3.0.1",
107-
"ngx-cookie-service": "20.1.0",
107+
"ngx-cookie-service": "20.1.1",
108108
"ngx-editor": "^18.0.0",
109109
"ngx-mask": "^20.0.3",
110110
"ngx-material-timepicker": "^13.1.1",
@@ -128,12 +128,12 @@
128128
"@angular-devkit/schematics": "20.3.7",
129129
"@angular-eslint/builder": "20.3.0",
130130
"@angular-eslint/eslint-plugin": "20.4.0",
131-
"@angular-eslint/eslint-plugin-template": "20.1.1",
131+
"@angular-eslint/eslint-plugin-template": "20.5.0",
132132
"@angular-eslint/schematics": "20.5.0",
133133
"@angular-eslint/template-parser": "20.5.0",
134134
"@angular/cli": "20.3.7",
135135
"@angular/compiler-cli": "20.1.2",
136-
"@angular/language-service": "20.3.6",
136+
"@angular/language-service": "20.3.9",
137137
"@types/chai": "^5.2.2",
138138
"@types/d3": "^7.4.3",
139139
"@types/dragula": "^2.1.34",
@@ -152,8 +152,8 @@
152152
"@wdio/spec-reporter": "9.20.0",
153153
"angular-mocks": "^1.8.3",
154154
"chai": "^6.0.1",
155-
"chromedriver": "^140.0.4",
156-
"cypress": "15.3.0",
155+
"chromedriver": "^142.0.0",
156+
"cypress": "15.5.0",
157157
"eslint": "^8.57.1",
158158
"fs-extra": "^11.3.1",
159159
"guid-typescript": "^1.0.9",

0 commit comments

Comments
 (0)