docs: add ARCHITECTURE.md + security ADRs (rounds 1-9) - #123
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds project documentation:
ARCHITECTURE.md(repo root) — a living architecture overview: product/businesscontext, requirements traceability (FR/NFR), tech stack, layered solution architecture,
the 12-table data model, API conventions, frontend architecture, multi-tenancy, auth,
SignalR, the invoice extraction pipeline (S3 → GuardDuty → Bedrock Nova), AWS
infrastructure, CI/CD, the security-hardening summary, local dev, conventions, a
round-by-round hardening timeline, and a glossary.
docs/adr/0001-0005— Architecture Decision Records for the security & CI/CDdecisions made across the hardening rounds:
0001Transport hardening (HSTS, security headers, CORS lock-down)0002Content Security Policy (API + SPA)0003Tenant isolation via EF Core global query filters0004JWT auth + DB-backed rotating refresh tokens0005Per-layer code coverage gates in CIEach ADR follows the standard format: Context → Alternatives Considered → Decision →
Implementation → Consequences → Testing & Verification → Related PRs → Follow-ups.
Why
We had substantial security/architecture work spread across rounds 0–9 and the
harden/prod-securitypass, but the reasoning behind those decisions lived only inPRs and chat history. This captures the "why" as durable, reviewable docs — useful for
onboarding, future maintenance, and the project's Documentation evaluation criterion.
Scope / safety
Notes for reviewer
current code: 404-vs-403 on cross-tenant reads (ADR-0003), access-token TTL = 20 min
(ADR-0004), and the RDS/super-admin infra follow-ups noted as planned.
ARCHITECTURE.md; links point todocs/adr/.Checklist