Skip to content

docs(architecture): add "the problem this exists to solve" section#16

Merged
rodrigobnogueira merged 1 commit into
mainfrom
docs/architecture-problem-section
May 25, 2026
Merged

docs(architecture): add "the problem this exists to solve" section#16
rodrigobnogueira merged 1 commit into
mainfrom
docs/architecture-problem-section

Conversation

@rodrigobnogueira
Copy link
Copy Markdown
Contributor

Summary

The architecture page at nest-native.dev/reference-app/architecture.html was jumping straight from a one-paragraph intro to the module graph. A reader landing there needs the "why should I care, what does this save me from figuring out" framing first — otherwise the architecture content reads as design-by-example with no clear question being answered.

This PR adds a single new H2 section between the intro and the module graph. Each bullet links to the relevant deeper section in this same doc, so the new content doubles as a TOC.

Changes

  • docs/architecture.md — new ## The problem this exists to solve section. Frames the app as a commitment to specific answers for the 5 composition questions an adopter would otherwise have to design from scratch:
    • threading currentUser / currentOrganization through middleware → tRPC createContext → guards → request-scoped DI
    • transactions across services with @InjectTransaction(), including the better-sqlite3 async-adapter trap
    • post-commit side effects via the transactional outbox (atomic claim, idempotency, backoff, stuck-claim recovery)
    • keeping the typed-client contract honest via client-smoke in CI
    • the "boring scaffolding" (ESLint complexity gate, drizzle-kit, node:test + c8, the CI chain, single-image Docker for API+worker)
  • Closes with a "commitment to specific answers" framing, not a "menu of options".

Modules Touched

  • Tooling / CI / docs only

Public Surface (libraries)

  • No use of library internals introduced.

Security Review

  • Docs only.

Dependency Review

  • No dependency or lockfile changes.

Migrations

  • No schema changes.

Validation

  • npm run ci unaffected (docs only).
  • Live render — verified after merge when GitHub Pages rebuilds; the new in-page anchor links (#request-lifecycle, #authentication, #why-a-custom-syncdrizzletransactionaladapter, #outbox, #the-worker-process) all map to existing H2/H3 headings in the same doc and will be auto-generated by Jekyll.

Release Notes

  • No release impact
  • User-visible doc change at nest-native.dev/reference-app/architecture.html.

…page

The architecture doc was jumping straight from a one-paragraph intro to
the module graph. A reader landing on nest-native.dev/reference-app/
architecture.html needs the "why should I care, what does this save me
from figuring out" framing first — otherwise the architecture content
reads as design-by-example with no clear question being answered.

New section sits between the intro and the module graph. It frames the
app as a commitment to specific answers for the 5 composition questions
an adopter would otherwise have to design from scratch: threading
current-user/org through the stack, transactions across services
(including the better-sqlite3 trap), post-commit side effects, keeping
the typed-client contract honest, and the boring CI/test/build
scaffolding. Each bullet links to the relevant deeper section in this
same doc, so the new content acts as both a "why" and a TOC.
@rodrigobnogueira rodrigobnogueira merged commit dee3889 into main May 25, 2026
2 checks passed
@rodrigobnogueira rodrigobnogueira deleted the docs/architecture-problem-section branch May 25, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant