13 lines
1.6 KiB
Markdown
13 lines
1.6 KiB
Markdown
# Module Interactions
|
|
|
|
> Audit library doc. Findings come from reading source files — never from README/docs.
|
|
> Each pattern is one `### [slug] Title` entry (written via `audit.sh finding`), with an exemplar file.
|
|
> Further files that repeat a known pattern are logged with `audit.sh also`, not re-described.
|
|
|
|
**Scope:** How modules call each other and what data crosses each boundary. One entry per interaction (caller → callee for one purpose). "Module" means a workspace package; in a single-package app, use top-level feature/layer directories (e.g. `src/features/*`, `src/lib/*`, `server/`) instead.
|
|
|
|
**Look for:** imports of another package/feature; props/callbacks and context passed across feature boundaries; route params and search params between pages; client → server calls (fetch, server actions, tRPC, GraphQL) and their request/response types; server → DB/external API calls; events (custom events, event bus, BroadcastChannel, postMessage); shared stores read/written by several modules; queue/job payloads; webhook payloads; service-worker messages; shared DB tables/cache keys written by one module and read by another; layer violations.
|
|
|
|
**Each entry states:** **Kind** (`user-facing`: started by a user action or feeding what is on screen, including the request/response of a page load; `background`: no user waiting, e.g. cron, queue workers, webhooks, service-worker sync/push, revalidation, build-time generation, startup init), **From → To** (module + function/component, `path:line`), **Mechanism**, **Data passed** (types in each direction, where mapping/validation happens), **Trigger**.
|
|
|
|
## Findings
|