You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `ContosoDashboard/Data/` - ApplicationDbContext with EF Core configuration and seed data
245
+
- `ContosoDashboard/Services/` - 6 service implementations for business logic (TaskService, ProjectService, UserService, NotificationService, DashboardService, CustomAuthenticationStateProvider)
- 11 Blazor/Razor pages including Login.cshtml and Logout.cshtml for authentication
428
439
429
440
You'll use GitHub Spec Kit to plan and implement the new document upload and management feature as an addition to these existing capabilities. The spec-driven approach ensures the new feature integrates seamlessly with the existing architecture while maintaining code quality and security standards.
430
441
@@ -477,32 +488,39 @@ Use the `/speckit.constitution` command to create the project's governing princi
477
488
478
489
**Existing Application Context:**
479
490
- ContosoDashboard is a working ASP.NET Core 8.0 Blazor Server application
480
-
- Current features: task management, project tracking, team collaboration, notifications, user profiles
481
-
- Uses Entity Framework Core 8 with SQL Server LocalDB
491
+
- Current features: mock authentication (cookie-based user selection), task management, project tracking with team members, team directory, notifications center, user profiles, dashboard with summary cards
- Page loads under 2 seconds (match existing pages)
@@ -515,6 +533,7 @@ Use the `/speckit.constitution` command to create the project's governing princi
515
533
- XML documentation for public APIs
516
534
- WCAG 2.1 Level AA accessibility
517
535
- Code style consistent with existing codebase
536
+
- Bootstrap 5.3 classes for UI consistency
518
537
- Integration with existing navigation and layout components
519
538
```
520
539
@@ -592,11 +611,9 @@ In this task, you use GitHub Copilot's `/speckit.specify` command to generate a
592
611
593
612
Use the following steps to complete this task:
594
613
595
-
1. Review the high-level requirements document located in the lab materials:
614
+
1. Review the high-level requirements document:
596
615
597
-
Navigate to the following folder: spec-driven-development
598
-
599
-
1. Open the upload-manage-docs-feature-requirements-simplified.md file in Visual Studio Code or a text editor.
616
+
In Visual Studio Code, open the `StakeholderDocs/document-upload-and-management-feature.md` file from your ContosoDashboard project.
600
617
601
618
1. Take 1-2 minutes to read through the requirements document, paying particular attention to:
602
619
@@ -977,11 +994,11 @@ Use the following steps to complete this task:
977
994
978
995
1. **Create the Document entity model:**
979
996
980
-
In Visual Studio Code, create a new file in the existing `Models/` folder: `Models/Document.cs`
997
+
In Visual Studio Code, create a new file in the existing `ContosoDashboard/Models/` folder: `ContosoDashboard/Models/Document.cs`
981
998
982
-
The Document entity will follow the same pattern as existing entities (User, TaskItem, Project, etc.) in the Models folder.
999
+
The Document entity will follow the same pattern as existing entities (User, TaskItem, Project, ProjectMember, TaskComment, Notification, Announcement) in the ContosoDashboard/Models/ folder.
983
1000
984
-
1. Create the `Models/Document.cs` file and use GitHub Copilot to generate the entity:
1001
+
1. Create the `ContosoDashboard/Models/Document.cs` file and use GitHub Copilot to generate the entity:
985
1002
986
1003
Type the following comment in the file:
987
1004
@@ -996,9 +1013,9 @@ Use the following steps to complete this task:
996
1013
997
1014
1. **Implement the document upload service:**
998
1015
999
-
Create a new file in the existing `Services/` folder: `Services/DocumentService.cs`
1016
+
Create a new file in the existing `ContosoDashboard/Services/` folder: `ContosoDashboard/Services/DocumentService.cs`
1000
1017
1001
-
This service will follow the same pattern as existing services (TaskService, ProjectService, etc.).
1018
+
This service will follow the same pattern as existing services (TaskService, ProjectService, UserService, NotificationService, DashboardService) with authorization checks to prevent IDOR vulnerabilities.
1002
1019
1003
1020
```csharp
1004
1021
// DocumentService for business logic
@@ -1016,7 +1033,7 @@ Use the following steps to complete this task:
1016
1033
1017
1034
1. **Create the upload API endpoint:**
1018
1035
1019
-
If using Blazor Server (like the existing ContosoDashboard), you may create a code-behind file for a page. If adding Web API support, create `Controllers/DocumentsController.cs`:
1036
+
For the Blazor Server architecture used in ContosoDashboard, you'll implement upload functionality in the page's code-behind or inline code. If you choose to add Web API support for file uploads, create `ContosoDashboard/Controllers/DocumentsController.cs`:
1020
1037
1021
1038
```csharp
1022
1039
// DocumentsController API endpoints
@@ -1029,11 +1046,18 @@ Use the following steps to complete this task:
1029
1046
// Include XML documentation comments for Swagger
1030
1047
```
1031
1048
1032
-
1. **Create the upload UI component (Blazor example):**
1049
+
1. **Create the upload UI component (Blazor page):**
1050
+
1051
+
Create a new file in the existing `ContosoDashboard/Pages/` folder: `ContosoDashboard/Pages/Documents.razor`
1033
1052
1034
-
Create a new file in the existing `Pages/` folder: `Pages/Documents.razor`
1053
+
This page will follow the same pattern as existing pages (Tasks.razor, Projects.razor, ProjectDetails.razor, Team.razor, Notifications.razor, Profile.razor) and integrate with the existing MainLayout.razor and NavMenu.razor in the ContosoDashboard/Shared/ folder.
1035
1054
1036
-
This page will follow the same pattern as existing pages (Tasks.razor, Projects.razor, etc.) and integrate with the existing MainLayout and NavMenu.
1055
+
Don't forget to:
1056
+
- Add `@page "/documents"` directive at the top
1057
+
- Add `@attribute [Authorize]` for authentication enforcement
1058
+
- Inject DocumentService using `@inject`
1059
+
- Use Bootstrap 5.3 classes for consistent styling
1060
+
- Add navigation link to ContosoDashboard/Shared/NavMenu.razor
0 commit comments