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/memory/constitution.md
+38-17Lines changed: 38 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Bike Tracking Application Constitution
2
-
<!-- Sync Impact Report v1.10
3
-
Rationale: Replaced frontend direction with React (latest stable) + TypeScript + Vite. Updated Principle V and all frontend-related sections for consistency. Added an explicit rule to always reference official React documentation at https://react.dev/.
2
+
<!-- Sync Impact Report v1.10.1
3
+
Rationale: Clarified the local deployment approach for end-user machines by standardizing SQLite local-file storage as the default profile and documenting safety expectations for storage path and upgrades.
4
4
Modified Sections:
5
-
- Core Principles > V: Frontend stack standardized on React
- Technology Stack Requirements > Frontend: Framework, UI, hosting, API communication, validation, and documentation guidance updated for React
8
-
- Development Workflow and checklists: frontend examples and validation references updated to React equivalents
9
-
- Monthly Technology Audit and onboarding notes: frontend package/version checks aligned with React
10
-
Status: Approved — React is the frontend standard; official React docs are the canonical implementation reference
5
+
- Mission > Decision Record: Added rationale for SQLite local-file default on user machines
6
+
- Technology Stack Requirements > Data & Persistence: Clarified local database default and user-machine storage profile
7
+
- Guardrails: Added explicit local SQLite file safety rule for user-machine installs
8
+
Status: Approved — local user-machine deployments default to SQLite local-file storage for simplicity and offline reliability
11
9
Previous Updates:
10
+
- v1.10: Added an explicit engineering mindset for small-batch experimentation, continuous learning, complexity management, mandatory change validation, and proactive security teaching/remediation.
11
+
- v1.9: Replaced Blazor WebAssembly frontend direction with Aurelia 2. Updated Principle V and all frontend-related sections for consistency. Added an explicit rule to always reference official Aurelia documentation at https://docs.aurelia.io/.
12
12
- v1.8: Scoped Aspire Dashboard to local development only; removed cloud Aspire Dashboard requirement. Clarified local-first deployment priority with Azure as a future target. Strengthened public GitHub repository secret safety guidance.
13
13
- v1.7: 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.
14
14
- 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.
@@ -33,6 +33,7 @@ Previous Updates:
33
33
- Why React? Mature, widely adopted TypeScript frontend ecosystem with composable UI patterns, strong tooling, and flexible static hosting for local-first development
34
34
- Why Minimal API? Lightweight, performant, integrates seamlessly with Aspire and domain layers
35
35
- Why local-first architecture? Users own their data locally; cloud deployment optional for sharing/collaboration
36
+
- Why SQLite local-file default for user-machine installs? No separate database install, reliable offline operation, and simpler support/backup through a single user-owned database file
36
37
37
38
For detailed amendment history, see [DECISIONS.md](./DECISIONS.md).
38
39
@@ -80,6 +81,14 @@ All user input **MUST** be validated in three layers: (1) **Client-side (React)*
80
81
81
82
**Rationale**: Defense-in-depth prevents invalid data from corrupting event store or projections; client-side validation improves UX responsiveness; server-side validation prevents bypass attacks; database constraints provide last-line guarantees. Combined approach ensures data integrity without redundant checks.
82
83
84
+
### VIII. Experimentation, Learning & Secure Validation
85
+
86
+
Engineering work should prioritize experimentation in small, reversible batches to discover what software creates the best user value while keeping complexity manageable. Continuous learning is expected in every slice: document what was learned, what complexity was reduced, and what the next increment should test.
87
+
88
+
Every change **MUST** be validated end-to-end before merge and before phase transitions: solution compiles, coding standards pass, automated tests confirm behavior, and deployment pipeline checks succeed. Security is a first-class requirement on every change: identify issues, explain risks and mitigations to contributors, and remediate vulnerabilities before release.
89
+
90
+
**Rationale**: Small batches reduce blast radius and improve feedback speed. Continuous learning drives better product decisions under uncertainty. Mandatory validation and security remediation protect reliability, delivery confidence, and user trust.
91
+
83
92
## Technology Stack Requirements
84
93
85
94
### Backend & Orchestration
@@ -102,7 +111,7 @@ All user input **MUST** be validated in three layers: (1) **Client-side (React)*
102
111
103
112
### Data & Persistence
104
113
-**Primary Database**:
105
-
-**Local Deployment**: SQLite (single-user) or SQL Server LocalDB/Express (multi-user local)
114
+
-**Local Deployment**: SQLite local file database (default for single-user and user-machine installs); SQL Server LocalDB/Express optional for advanced multi-user local scenarios
106
115
-**Cloud Deployment**: Azure SQL Database (serverless elastic pools in production)
107
116
-**Database abstraction**: EF Core provider configured via connection string; application code database-agnostic
108
117
-**ORM & Data Access**: Entity Framework Core (latest .NET 10 compatible version) for all database interactions; DbContext per aggregate root; repositories abstract EF Core from domain layer. EF Core value converters integrated for F# type marshaling.
@@ -112,6 +121,10 @@ All user input **MUST** be validated in three layers: (1) **Client-side (React)*
112
121
-**Change Event Streaming**:
113
122
-**Local Deployment**: In-process event handlers or polling-based projection updates
-[ ] Validation rule consistency: if field required in React form, enforced in API DTOs and database constraints
@@ -328,11 +348,12 @@ Breaking these guarantees causes architectural decay and technical debt accrual:
328
348
-**OAuth token required on all user endpoints** — anonymous access forbidden for personal data. Public data endpoints explicitly marked; separate authorization logic. (Optional for single-user local deployment; mandatory for cloud/multi-user.)
329
349
-**SAMPLE_/DEMO_ data never in production** — automated linting prevents prefixed data from deploying. Merge blocked if test data detected.
330
350
-**Database provider abstraction** — application code must work across SQLite (local), SQL Server LocalDB (local), and Azure SQL (cloud) without provider-specific queries. Use EF Core abstractions; avoid raw SQL unless necessary and provider-agnostic.
351
+
-**User-machine local data safety** — local deployments on end-user machines default to SQLite local-file storage in a user-writable app-data path; do not require a separate DB server for single-user installs. Before schema migration, create a backup copy of the SQLite file.
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)
@@ -372,7 +393,7 @@ Breaking these guarantees causes architectural decay and technical debt accrual:
372
393
## Governance
373
394
374
395
### Constitution as Governing Document
375
-
This constitution supersedes all other project guidance. All architectural decisions, code reviews, deployment approvals, and spec acceptance gates must verify compliance with these seven core principles and technology stack requirements.
396
+
This constitution supersedes all other project guidance. All architectural decisions, code reviews, deployment approvals, and spec acceptance gates must verify compliance with these eight core principles and technology stack requirements.
376
397
377
398
### Amendment Procedure
378
399
Amendments must:
@@ -412,5 +433,5 @@ Always commit before continuing to a new phase.
0 commit comments