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
Copy file name to clipboardExpand all lines: .specify/constitution.md
+32-26Lines changed: 32 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,15 @@
1
1
# Bike Tracking Application Constitution
2
-
<!-- Sync Impact Report v1.4
3
-
Rationale: Applied Aspire Dashboard UI requirement to cloud deployments in addition to local diagnostics.
2
+
<!-- Sync Impact Report v1.7
3
+
Rationale: Clarified that Blazor WASM frontend is fully orchestrated by Aspire locally; a single `dotnet run` command starts the entire application stack including API, database, and WASM frontend.
4
4
Modified Sections:
5
-
- Core Principles > VI. Performance, Scalability & Observability: Require Aspire Dashboard UI for local and cloud diagnostics
6
-
- Technology Stack Requirements > Infrastructure & DevOps: Logging & Monitoring updated to include cloud dashboard UI
7
-
- Monthly Technology Audit: Dashboard verification covers local and cloud
8
-
Status: Approved for Aspire Dashboard UI in all environments
5
+
- Technology Stack Requirements > Infrastructure & DevOps: Local Hosting clarified to show Aspire orchestrates both frontend and API
6
+
- Development Workflow: Updated to emphasize all services orchestrated by Aspire locally
7
+
- Onboarding Checklist: Simplified to single `dotnet run` command; no separate frontend build step needed for local dev
8
+
Status: Approved for Aspire-orchestrated local development
9
9
Previous Updates:
10
+
- v1.6: Adopted Blazor WebAssembly (WASM) as the frontend hosting model, enabling static site hosting for the UI while maintaining containerized API in both local and cloud.
11
+
- v1.5: Standardized containerized hosting for local development and cloud deployments using Azure Container Apps. Clarified that static hosting for the Blazor app is allowed only for Blazor WebAssembly builds.
12
+
- v1.4: Applied Aspire Dashboard UI requirement to cloud deployments in addition to local diagnostics.
10
13
- v1.3: Standardized telemetry on Aspire built-in OpenTelemetry for all services exporting to Application Insights and required the Aspire Dashboard UI for observability.
11
14
- v1.2: Changed Infrastructure as Code approach from Bicep to Azure CLI. Azure CLI scripts provide scriptable, imperative infrastructure management suitable for both automation and manual deployment workflows. Works seamlessly with azd and GitHub Actions.
12
15
- v1.1: Added local deployment optionality. Application can run entirely locally with local database or deploy to Azure. Azure services optional deployment targets. Local-first development supported with SQLite or SQL Server LocalDB.
@@ -84,11 +87,13 @@ All user input **MUST** be validated in three layers: (1) **Client-side (Blazor)
84
87
-**Domain-Infrastructure Interop**: EF Core value converters (FSharpValueConverters) enable transparent mapping of F# discriminated unions to database columns
85
88
86
89
### Frontend
87
-
-**Framework**: Microsoft Blazor .NET 10 (latest stable)
90
+
-**Framework**: Microsoft Blazor WebAssembly (WASM) .NET 10 (latest stable) — client-side compiled to WebAssembly
-**Hosting Model**: Static site hosting for compiled Blazor WASM; serves frontend as static assets (HTML, CSS, JavaScript/WASM) from CDN or blob storage
93
+
-**Authentication**: OAuth (via MSAL.js or Microsoft.Authentication.WebAssembly.Msal)
94
+
-**API Communication**: HttpClient with OAuth bearer token to containerized backend API
90
95
-**Design System**: Centralized DesignTheme with design tokens; theme colors locked to brand palette
91
-
-**Validation**: Microsoft DataAnnotationsAttributes for form validation (see Principle VII)
96
+
-**Validation**: Microsoft DataAnnotationsAttributes mirrored client-side (DataAnnotations attributes map to Blazor form validation)
92
97
93
98
### Data & Persistence
94
99
-**Primary Database**:
@@ -105,23 +110,23 @@ All user input **MUST** be validated in three layers: (1) **Client-side (Blazor)
105
110
106
111
### Infrastructure & DevOps
107
112
-**Hosting**:
108
-
-**Local Deployment**: Aspire orchestration runs all services locally; single `dotnet run` command starts API, frontend, and database
109
-
-**Cloud Deployment**: Azure Container Apps (managed Kubernetes) for API and Blazor frontend
113
+
-**Local Deployment**: Single `dotnet run` orchestrates entire stack via Aspire: (1) Blazor WASM frontend container serving compiled static assets, (2) .NET Minimal API container, (3) SQLite/LocalDB database container. All services discoverable via Aspire AppHost; frontend connects to API via `localhost:API_PORT`
114
+
-**Cloud Deployment**: Blazor WASM compiled to static assets, hosted in Azure Static Web Apps or Blob Storage + CDN. Containerized API runs in Azure Container Apps
110
115
-**Identity**:
111
116
-**Local Deployment**: User Secrets for local development; environment variables for configuration
112
117
-**Cloud Deployment**: Azure Managed Identity for service-to-service authentication; no connection strings in code
113
118
-**Secrets Management**:
114
119
-**Local Deployment**: .NET User Secrets (development) or local environment variables (production-local)
115
120
-**Cloud Deployment**: Azure Key Vault for database credentials, API keys, OAuth secrets
-**Cloud Deployment**: Aspire OpenTelemetry exporters to Application Insights for all services; centralized logs, metrics, traces in Application Insights; Aspire Dashboard UI deployed for cloud diagnostics
122
+
-**Local Deployment**: Aspire OpenTelemetry (logs, metrics, traces) with console/file exporters for backend API; browser console for frontend; Aspire Dashboard UI enabled
123
+
-**Cloud Deployment**: Aspire OpenTelemetry exporters to Application Insights for backend API; frontend telemetry optional (browser-side logging to Application Insights via SDK); centralized logs, metrics, traces in Application Insights; Aspire Dashboard UI deployed for cloud diagnostics
119
124
-**CI/CD**:
120
-
-**Local Deployment**: Manual `dotnet run` or local Docker Compose
125
+
-**Local Deployment**: Manual `dotnet run`(Aspire containers) or local Docker Compose
121
126
-**Cloud Deployment**: GitHub Actions with Aspire and azd (Azure Developer CLI) for orchestrated deployment
122
127
-**Deployment Artifacts**:
123
-
-**Local Deployment**: Executable binaries or Docker containers
124
-
-**Cloud Deployment**: IaC via Azure CLI scripts (imperative infrastructure provisioning and configuration)
128
+
-**Local Deployment**: Aspire AppHost (`Program.cs`) defines all services (frontend, API, database); `dotnet run` builds and runs containers locally. Frontend built as part of Aspire orchestration, served by embedded HTTP container
129
+
-**Cloud Deployment**: Blazor WASM static assets (HTML, CSS, JS, WASM binaries) deployed to Azure Static Web Apps or Blob Storage; API containerized in Azure Container Apps via Azure CLI scripts
125
130
126
131
### Package Management & Updates
127
132
- Check latest NuGet versions monthly; update patches for security; propose major/minor upgrades with test coverage
@@ -136,14 +141,14 @@ Each specification defines a **complete, deployable vertical slice**:
136
141
-**API**: One or more Minimal API endpoints handling commands/queries
137
142
-**Database**: Event table, read projection table, SQL migrations via .sqlproj
138
143
-**Integration**: Background function or event handler to materialize projections (if applicable)
139
-
-**Deployment**: Tested locally via Aspire, deployable to Azure Container Apps
144
+
-**Deployment**: Tested locally via single `dotnet run` (Aspire orchestrates frontend, API, database), deployable to Azure Static Web Apps (frontend) + Azure Container Apps (API)
140
145
141
146
Example: "User records a bike ride" slice includes:
142
-
- Blazor form component (RideRecorder.razor, styled with DesignTheme, with DataAnnotationsAttributes validation)
143
-
- POST /rides API endpoint (command handler with DataAnnotationsAttributes on DTO)
147
+
- Blazor WASM form component (RideRecorder.razor, styled with DesignTheme, with DataAnnotationsAttributes validation) compiled and served by Aspire
148
+
- POST /rides API endpoint (command handler with DataAnnotationsAttributes on DTO) in containerized backend
144
149
- Events table with RideRecorded event; Projections table (RideProjection)
145
150
- Background function listening to CES to update RideProjection
- Aspire AppHost configuration for frontend + API + database orchestration; Azure CLI deployment scripts for Static Web Apps (frontend) and Container Apps (API)
147
152
148
153
### Definition of Done: Vertical Slice Completeness
149
154
@@ -154,9 +159,9 @@ A vertical slice is **production-ready** only when all items are verified:
154
159
-[ ] All tests written and failing (red phase complete)
5.**Review test examples** (~20 min): Browse `/bikeTracking.Tests/Unit/` and `/bikeTracking.Tests/Integration/` to understand test patterns (F# unit tests, integration test fixtures, E2E Playwright)
303
309
6.**Pair with contributor on first spec** (~2–4 hours): Shadow an experienced team member through red-green-refactor cycle; understand test approval and code review gates
@@ -376,5 +382,5 @@ Always commit before continuing to a new phase.
0 commit comments