Web Client Audit — Audit Guide¶
What this is: A self-contained guide for auditing the web client component of the Someli platform. Drop this file into the web client repository (alongside its source code) and follow it.
What this is for: The findings produced by following this guide will eventually be merged into a platform-level Technical Due Diligence (TDD) report. To make that merge clean, this guide enforces a specific output structure and methodology.
Independence: This guide is self-sufficient. It does not require access to the API repository's documentation tree to run the audit. References to the broader platform context are inline.
0. Quick Start¶
If you have one hour:
- Read §1 (Context) and §3 (Output Structure) — 10 minutes
- Run the data-collection commands in §4.1 — 15 minutes
- Skim the source tree to answer the 30 questions in §5 — 30 minutes
- Note open questions and dispatch follow-ups — 5 minutes
If you have one week (a real audit), follow the full methodology in §4–§9 and produce the full output in §3.
1. Context¶
1.1 What you are auditing¶
The Someli web client is the customer-facing user interface of the Someli platform. The platform is a B2B SaaS for AI-driven social media content management — users upload brand assets, the platform generates social media posts via AI, users approve and schedule them across multiple social platforms.
The web client is one of three components that together make up the platform:
| Component | Audit status (at the time you read this) |
|---|---|
| someli-api (backend HTTP API + ~108 background workers) | ✅ Audited |
| Web Client (this audit) | ⏳ This is what you're producing |
| Admin Dashboard (internal staff UI) | ⏳ Pending |
The backend is a Node.js + MySQL application with ~728 REST endpoints and 49,422 lines of route handlers across two monolithic route files. It has significant accumulated technical debt (the audit has been candid about this). Treat the backend as a known quantity, not an aspirational target.
1.2 Why this audit is happening¶
The audit feeds into a master Technical Due Diligence (TDD) report that will be:
- Read by the engineering leadership / CTO
- Read by board members and prospective investors
- Submitted to enterprise customers as part of their procurement security review
- Referenced in eventual SOC 2 Type I / ISO 27001 / GDPR readiness work
- Used as the technical due-diligence baseline by an acquirer or strategic partner
The TDD report's quality depends on the per-component audits being comprehensive, accurate, and consistently structured. This guide enforces structure so the eventual platform-level synthesis is straightforward.
1.3 What good looks like¶
A successful audit produces:
- A comprehensive component documentation tree (per §3) that an external reader could use to understand the web client without reading the source code
- A clear list of findings with severity ratings and remediation paths
- A maturity assessment using the 14-pillar CMMI 1–5 model (per §6)
- A risk register for component-specific risks
- A roadmap for component-specific improvements, sequenced into phases
- A verification report confirming that the documentation matches the codebase
- Findings that integrate cleanly into the master TDD (per §9)
Output should be honest about gaps. The backend audit found and documented 5 critical issues, 14 drifts between docs and reality, and ~30 strategic recommendations. Expect a similar profile here. Quality of the audit is judged by what it surfaces, not by how positive it sounds.
2. Methodology¶
The methodology mirrors what was used on the backend:
2.1 Phases¶
| Phase | Goal | Output |
|---|---|---|
| Phase A — Inventory | Catalog what exists | Per-domain documents listing routes, components, dependencies, integrations |
| Phase B — Subsystem deep-dives | Document how subsystems work | Architecture, auth-client, API-consumption, build, observability docs |
| Phase C — Cross-cutting findings | Identify platform-level concerns | Security, performance, accessibility, error handling docs |
| Phase D — Strategic synthesis | Produce the readiness assessment | enterprise-readiness.md per §7 |
| Phase E — Verification | Confirm docs match reality | verification-report.md per §8 |
| Phase F — Integration | Feed findings into the master TDD | Component summaries per §9 |
2.2 Order matters¶
Phase A must complete before Phase B; B before C; C before D. Phase E happens after D, then loops back to fix any drift. Phase F happens after E completes.
The single most common failure mode of audits like this is trying to write the strategic synthesis before the inventory is complete. The synthesis will be wrong if the inventory is wrong. Resist the temptation to skip ahead.
2.3 Honesty principles¶
- Cite sources for every claim. A claim of "uses React 18" should reference
package.json:lineor similar. - Mark uncertain claims
[VERIFY]. Anything not directly verifiable from the code goes in a tracking list. - Document what's missing. "No accessibility testing exists" is a finding. "Accessibility not assessed" is a doc gap.
- Don't invent maturity. If a practice doesn't exist, the rating is 1, not "we plan to."
- Number all findings for traceability into the master TDD.
3. Output Structure¶
The audit produces a documentation subtree shaped exactly like the backend's. This consistency is what makes platform-level synthesis tractable.
3.1 Files to produce¶
web-client/
├── README.md # Component-level index
├── architecture-overview.md # Frontend architecture and tech stack
├── routing-and-state.md # SPA routing, state management
├── api-consumption.md # How the client talks to the backend API
├── authentication-client.md # Token storage, refresh, session handling
├── ui-component-library.md # Design system, component inventory
├── accessibility.md # WCAG posture
├── performance.md # Bundle, Core Web Vitals
├── security.md # CSP, XSS, dependency CVEs
├── testing.md # Unit / integration / e2e
├── build-and-deploy.md # Bundler, CDN, deployment
├── observability.md # Sentry, RUM, analytics
├── i18n.md # Internationalization (or note absence)
├── seo-and-metadata.md # SEO, OG tags, structured data
├── dependencies-inventory.md # All npm packages with usage / status
├── verification-report.md # Quantitative + control-flow audit
├── enterprise-readiness.md # Maturity model + roadmap + risk register
├── verify-markers.md # Open questions / [VERIFY] tracker
└── visuals-tracking.md # Suggested diagrams (optional)
Each file's expected content is templated in §10.
3.2 Naming conventions¶
- All filenames are kebab-case (
api-consumption.md, notapiConsumption.md) - All files use
.mdextension README.mdis the entry point — every other doc is linked from it- Filenames match those in the API subtree where the topic is the same (e.g.,
dependencies-inventory.mdexists in both)
3.3 Linking discipline¶
- Internal links use relative paths within the subtree (
./architecture-overview.md, not absolute paths) - Cross-component links go through the master document layer when the platform-level docs are eventually authored — for now, just note "see backend authentication.md for the API side of this contract"
- External links (to libraries, standards, RFCs) are fine but use stable URLs
4. Phase A — Inventory¶
The first task is to catalog what's in the repository. Run these commands (or AI-assisted equivalents) and capture the output.
4.1 Data-collection commands¶
# Repository basics
ls -la
cat README.md # if any
# Tech stack
cat package.json | jq '{name, version, engines, scripts, type, dependencies, devDependencies}'
# Bundle / build configuration
ls -la *.config.js *.config.ts *.config.mjs vite.config.* webpack.config.* next.config.* nuxt.config.* 2>/dev/null
ls .babelrc* tsconfig*.json 2>/dev/null
# Source structure
find src -type d | head -40
find src -type f -name '*.tsx' -o -name '*.ts' -o -name '*.jsx' -o -name '*.js' | wc -l
find src -type f -name '*.tsx' -o -name '*.ts' -o -name '*.jsx' -o -name '*.js' | xargs wc -l 2>/dev/null | tail -1
# Tests
find . -path ./node_modules -prune -o -name '*.test.*' -print -o -name '*.spec.*' -print 2>/dev/null | wc -l
find . -path ./node_modules -prune -o -name 'cypress' -print -o -name 'playwright' -print -o -name 'e2e' -print 2>/dev/null | head
# Public / static
ls public/ static/ 2>/dev/null
# CI / deploy
cat .github/workflows/*.yml 2>/dev/null
ls .gitlab-ci.yml Jenkinsfile vercel.json netlify.toml 2>/dev/null
# Env vars referenced (frontend-specific patterns)
grep -roE 'import\.meta\.env\.[A-Z_]+|process\.env\.[A-Z_]+|VITE_[A-Z_]+|REACT_APP_[A-Z_]+|NEXT_PUBLIC_[A-Z_]+' src 2>/dev/null | awk -F. '{print $NF}' | sort -u
# Routes (depends on framework — common patterns)
grep -rEn "<Route\b|createBrowserRouter|createRouter|definePage|router\.addRoute" src 2>/dev/null | head -30
# API call sites (look for fetch / axios / etc.)
grep -rEn "axios\.|fetch\(|useFetch\(|useQuery\(|apiClient\." src 2>/dev/null | wc -l
# Auth-related code (token storage)
grep -rEn "localStorage|sessionStorage|document\.cookie|setCookie|getCookie" src 2>/dev/null | head -20
# Bundle / deps weight
du -sh node_modules 2>/dev/null
du -sh dist build .next .nuxt out 2>/dev/null | head
4.2 What to record¶
For each command's output, capture into the relevant target document:
| Command output | Target document |
|---|---|
package.json summary |
architecture-overview.md, dependencies-inventory.md |
| Build config files | build-and-deploy.md |
src/ structure |
architecture-overview.md |
| Test discovery | testing.md |
| CI / deploy files | build-and-deploy.md |
| Env-var inventory | architecture-overview.md (consider a separate configuration.md if many) |
| Route inventory | routing-and-state.md |
| API call site count | api-consumption.md |
| Token-storage patterns | authentication-client.md, security.md |
| Bundle sizes | performance.md |
4.3 Inventory output: the catalog¶
By end of Phase A, produce first drafts of these files:
architecture-overview.md— at minimum: framework, version, build tool, routing approach, state management approachdependencies-inventory.md— at minimum: complete list of dependencies with versionsrouting-and-state.md— at minimum: list of routes and the state-management library in use
These become the foundation for Phases B–D.
5. Phase B — Subsystem Deep-Dives¶
For each subsystem, answer the questions in this section. Findings populate the corresponding document.
5.1 Architecture (architecture-overview.md)¶
- Framework and version? (React 18 / Vue 3 / Angular 17 / Svelte 4 / Next.js / Nuxt / etc.) Cite
package.json. - Build tool? (Webpack / Vite / Rollup / Turbopack / Bun) — version and config approach.
- Module system? (ESM / CJS / mixed) Cite
tsconfig.jsonorpackage.json:type. - TypeScript or JavaScript? If TS, is
strict: true? Verify intsconfig.json. - Source structure — is it organized by feature, by type, by layer? List the top-level directories under
src/with one-line descriptions of each. - Component tree depth — how deeply nested is the typical component? Pick a complex page and show its tree.
- Code style enforcement — ESLint? Prettier? Stylelint? Pre-commit hooks?
- Largest files —
find src -type f \( -name "*.tsx" -o -name "*.ts" -o -name "*.jsx" -o -name "*.js" \) -exec wc -l {} \; | sort -rn | head -20. Are any files over 500 lines? Over 1000? (Mirror the backend's "21k-line file" finding if it applies.) - Dead code — any commented-out blocks larger than 20 lines? Any
_old.tsx/.bak.tspatterns? - Build process — what does
npm run buildproduce? What's in the output directory?
5.2 Routing & State (routing-and-state.md)¶
- Routing library? (react-router / vue-router / Next.js routing / file-based / TanStack Router)
- Total number of routes — list them all with auth requirement (public / authenticated / admin)
- Deep linking — does it work? Are there routes that lose state on refresh?
- Code splitting — is it route-based? Component-based? Manual chunks? Cite the build config.
- State management library? (Redux / Zustand / MobX / Recoil / Jotai / Pinia / Vuex / Context / SWR / TanStack Query)
- Global state shape — what's stored at the root? User session, brand profile, schedule data, etc.?
- Persistence — does state persist across reloads? In what storage? Watch for tokens in local state — cross-reference §5.4.
- Error boundaries — are React error boundaries (or framework equivalent) wrapping the app?
5.3 API Consumption (api-consumption.md)¶
- HTTP client? (axios / fetch / ky / native + wrapper / TanStack Query / RTK Query)
- Wrapper layer — is there a single API client module, or are calls scattered? List the locations.
- Base URL configuration — env var? hardcoded? per-environment?
- Authentication header — what header name does the client send? Does it match
TOKEN_HEADER_KEYfrom the backend? - Token attachment — is auth automatic via interceptor, or per-call?
- Token refresh — how is it handled? On 401 response? Proactively before expiry? Not at all?
- Error handling — is there a single error handler? Toast notifications? Re-throw to component?
- Retries — are network errors retried? With backoff?
- Request cancellation — does the client cancel in-flight requests on unmount / route change?
- Endpoints used — list which backend endpoints are exercised. Cross-reference backend's API inventory if available.
- Response shape handling — backend has inconsistent response shapes (envelope vs raw vs string). How does the client cope?
5.4 Authentication (Client-side) (authentication-client.md)¶
- Where is the token stored? localStorage / sessionStorage / httpOnly cookie / in-memory only / IndexedDB?
- What's the security implication? localStorage is XSS-readable; httpOnly cookie is not. Is the choice deliberate?
- Login flow — POST
/auth/login(backend); what does the client do with the response? - OAuth flow — does the client kick off OAuth, or does the backend handle redirects?
- Logout — is the token cleared client-side? Is there a server-side revocation call?
- Token expiry handling — does the client detect expiry and prompt re-login, or wait for a 401?
- MFA / 2FA — is it supported? What's the flow?
- Session persistence — does "remember me" exist? How does it differ from default?
- Multi-tab synchronization — if a user logs out in one tab, do other tabs handle it (storage events)?
- CSRF protection — if the client uses cookies, is there a CSRF token? How is it set?
5.5 UI Component Library (ui-component-library.md)¶
- Design system in use? (Material-UI / Ant Design / Chakra / shadcn/ui / Tailwind UI / custom)
- CSS approach? (Tailwind / CSS Modules / styled-components / emotion / SCSS / vanilla CSS)
- Internal component library — is there a
src/components/with reusable primitives? List the top 20 primitives. - Component count — total components in the codebase.
find src/components -type f | wc -l - Pattern consistency — pick 5 forms in the app. Do they use the same form-handling library? Same validation patterns?
- Theming — light/dark mode? Brand-color customization?
- Storybook or similar — is there a component-development sandbox?
5.6 Accessibility (accessibility.md)¶
- WCAG compliance level claimed? (A / AA / AAA / unstated)
- Automated checks — is
eslint-plugin-jsx-a11y(or framework equivalent) configured? What's the rule severity? - Manual testing — has the team done keyboard-only testing? Screen-reader testing? Documented?
- Color contrast — is contrast tested? Tooling? Failing combinations?
- Focus management — do modals trap focus? Do route changes shift focus? Is there a "skip to content" link?
- Semantic HTML — is the markup semantically correct, or div-soup?
- ARIA usage — is ARIA used correctly, or as a band-aid?
- Form labels — are inputs properly labeled?
- Image alt text — are images required to have alt text? Is this enforced?
- Known accessibility issues — any open tickets / known bugs?
5.7 Performance (performance.md)¶
- Initial bundle size — gzipped main chunk size. Run
npm run buildand inspect. - Total JS shipped on first page load — including async chunks if route-loaded.
- Largest dependency contributions — use bundlephobia or
webpack-bundle-analyzer. Top 5 heaviest deps. - Code splitting — route-based? Component-based?
React.lazy/defineAsyncComponent/loading()patterns? - Tree shaking — is the build tool configured for it? Are there imports defeating it (
import * as)? - Image optimization — Next/Image / NuxtImage / vanilla
<img>? CDN serving WebP/AVIF? - Font loading —
font-display: swap? Self-hosted? Google Fonts? - Core Web Vitals — has the team measured? LCP / FID / CLS / INP. Any RUM data?
- Caching strategy — service worker? Cache-Control headers? CDN?
- Render performance — any virtualized lists for long content? Memoization patterns?
5.8 Security (security.md)¶
- Content Security Policy (CSP) — is one set? Read the headers (
curl -I) on a deployed page.unsafe-inline/unsafe-eval? - Subresource Integrity (SRI) — are 3rd-party scripts SRI-protected?
dangerouslySetInnerHTML— count instances; review each for sanitization.eval/new Function— count instances; are they justified?- Token in URL — does the client ever put the token in URL params? Logged in browser history / referer.
- Hardcoded secrets — run
gitleaksover the repo. What's found? - Public env vars — Vite's
VITE_*/ Next'sNEXT_PUBLIC_*are baked into the bundle. Are any sensitive? - Dependency CVEs —
yarn audit/npm audit. Critical / High count? - Dependabot / Snyk in CI?
- CORS — is the client served from the same origin as the API, or different? CORS implications?
- Mixed content — any
http://URLs in production? - Click-jacking —
X-Frame-Options/frame-ancestorsset? - Auth-related XSS — if the token is in localStorage, what's the XSS exposure surface?
5.9 Testing (testing.md)¶
- Test framework? (Jest / Vitest / Mocha / Karma / Cypress / Playwright)
- Unit test count —
find . -name '*.test.*' -o -name '*.spec.*' | wc -l - Integration test count
- E2E test count — list the user journeys covered.
- Code coverage — if measured, what's the percentage? Is there a gate?
- Visual regression testing — Chromatic / Percy / Loki?
- Cross-browser testing — manual? BrowserStack? Playwright multi-browser?
- CI test execution — do tests run on every PR? Time to run?
- Flaky test handling — known flaky tests? Quarantined?
- Mock strategy — how is the API mocked in tests? MSW? jest.mock? Test fixtures?
5.10 Build & Deploy (build-and-deploy.md)¶
- Build tool and version (cited from
package.json) - Build command —
npm run builddoes what? - Build time — typical local build time on a developer machine?
- Build artifact — directory? Size?
- Source maps — generated? Included in production? (Risk: leaks code.)
- Deployment target — Vercel / Netlify / AWS S3+CloudFront / custom?
- Hosting platform configuration —
vercel.json/netlify.toml/cloudfront-config.json/ etc.? - CI/CD pipeline — list the workflows. What runs on push? On PR?
- Preview deployments — does each PR get a preview URL?
- Rollback mechanism — how is a bad deploy reverted?
- Environment configuration — how do dev / staging / prod differ? Env-var management?
- CDN configuration — cache headers? Invalidation strategy?
5.11 Observability (observability.md)¶
- Error tracking — Sentry / Bugsnag / Rollbar / nothing?
- Real User Monitoring (RUM) — Sentry RUM / Datadog RUM / SpeedCurve / nothing?
- Analytics — Google Analytics / Mixpanel / Amplitude / Segment / Plausible / nothing?
- Console logging — is there logging in production code? (Equivalent to backend's
console.logfinding.) - Source-map upload — does CI upload source maps to the error-tracking service?
- User session replay — Sentry / FullStory / LogRocket?
- Performance monitoring — Web Vitals reported anywhere?
- Error boundary handling — is the error reported to tracking, or just shown to user?
- Feature flag system — LaunchDarkly / Statsig / Flagsmith / homegrown / none?
5.12 i18n / Localization (i18n.md)¶
- Library? (i18next / react-intl / vue-i18n / lingui / nothing)
- Languages supported — list them.
- Translation source — JSON files in repo? Translation management system (TMS)?
- Coverage — do all UI strings flow through the i18n layer, or are there hardcoded strings?
- Pluralization / formatting — handled correctly per locale?
- RTL languages — Arabic / Hebrew / etc.? CSS / layout impact?
- Date / number / currency formatting — locale-aware?
5.13 SEO & Metadata (seo-and-metadata.md)¶
- SSR / SSG / SPA — what's the rendering model? (Affects SEO heavily.)
- Meta tags — title / description / OG / Twitter Card per page?
- Structured data — JSON-LD?
- Sitemap — generated?
robots.txt— appropriate?- Canonical URLs — set per page?
- 404 handling — proper HTTP 404, not 200 with error content?
6. Phase C — Cross-Cutting Findings + Maturity¶
6.1 Maturity assessment¶
Use the same 14-pillar CMMI 1–5 model as the backend audit. You apply this to the web client, not the platform. Platform-level rating happens in the master TDD by taking the worst-of-components per pillar.
For each pillar, rate the web client current state on the 1–5 scale below and propose a 12-month target.
The 5 levels:
| Level | CMMI name | Plain reading |
|---|---|---|
| 1 | Initial | Ad-hoc, heroic, undocumented, single point of human failure |
| 2 | Repeatable / Managed | Same person can do it twice; partly documented |
| 3 | Defined | Codified, anyone on the team can do it, low truck-factor risk |
| 4 | Quantitatively Managed | Instrumented, measured, bounded by SLOs / coverage thresholds |
| 5 | Optimizing | Continuous-improvement loop, automated remediation |
The 14 pillars (apply each to the web client):
| Pillar | Web-client lens |
|---|---|
| Architecture & Modularity | File / component / module organization; max file size; lint enforcement |
| API Contract & Versioning | Does the client consume a versioned API contract? OpenAPI types generated? |
| Data Architecture | State management discipline; persistence approach; cache invalidation |
| Background Processing | Service worker / Web Workers / async patterns |
| Security & Compliance | CSP, XSS, deps, auth client posture |
| Observability | Error tracking, RUM, analytics, source maps |
| Reliability & Resilience | Error boundaries, offline handling, retry logic |
| Scalability | Bundle size, code-splitting, performance under load |
| Testing & Quality Gates | Unit / integration / e2e coverage; CI gates |
| CI/CD & Deployment | Pipeline maturity, preview deploys, rollback |
| Infrastructure as Code | Hosting config, CDN config in code |
| Cost Visibility & FinOps | CDN egress, RUM data costs, third-party costs visible? |
| Documentation & Knowledge Management | Internal docs, component docs, ADRs |
| Team Practices & Governance | PR reviews, code-review checklist, postmortems |
Output: a maturity table in enterprise-readiness.md.
6.2 Cross-cutting risks¶
After deep-dives complete, identify cross-cutting risks. These are risks that span subsystems or have platform-level implications. Examples:
- "Token in localStorage means any XSS = full account takeover"
- "No source-map upload to error tracker means production errors are unreadable"
- "Bundle is 3 MB gzipped — Lighthouse performance score < 50"
- "No automated accessibility testing — WCAG compliance unverifiable"
- "Public env var includes API key for [vendor X]"
Add these to enterprise-readiness.md § Risk Register.
6.3 Strategic recommendations¶
For each significant finding, propose a remediation. Categorize:
- Phase 0a — This week: Trivial high-impact fixes (e.g., upgrade vulnerable packages with known patches; turn on a CI gate)
- Phase 0 — Stabilize (months 0–3): Security hygiene; basic observability; testing infrastructure
- Phase 1 — Foundation (months 3–9): TypeScript adoption; design system consolidation; performance optimization
- Phase 2 — Modular Refactor (months 9–18): Component-library refactor; state-management consolidation
- Phase 3 — Selective Extraction (months 18+): Optional; trigger-driven
Output: a roadmap table in enterprise-readiness.md.
7. Phase D — enterprise-readiness.md¶
This is the strategic deliverable. Structure:
# Web Client — Enterprise Readiness Assessment
## 1. Executive Summary
- Verdict (1 paragraph)
- Top 3 strengths
- Top 5 risks
- Top 5 recommendations
## 2. Methodology & Scope
- Frameworks used
- Source documents
- What was audited / what was not
## 3. Maturity Assessment
- 14-pillar table: current / 12-mo target / 24-mo target
- Per-pillar narrative
## 4. Findings (by pillar or by subsystem)
- Each finding with severity, evidence, mitigation phase
## 5. Strategic Decisions
- Framework / runtime decisions
- Bundling / build tool decisions
- State management strategy
- Component library strategy
## 6. Roadmap
- Phase 0a / 0 / 1 / 2 / 3
- Effort estimates per item
## 7. Risk Register
- Per-risk: ID, description, likelihood, impact, mitigation phase
- Tag platform-level risks with [ALL] for the master TDD
## 8. Standards Compliance
- WCAG (accessibility)
- OWASP Top 10 (web app security)
- Core Web Vitals targets
## 9. Open Questions
- [VERIFY] markers for follow-up
This document mirrors the backend's enterprise-readiness.md and is the input for the master TDD's §5.2 Web Client section.
8. Phase E — Verification¶
Before the audit is "done," produce a verification report that confirms the documentation matches reality.
8.1 Quantitative checks¶
For every numeric claim in the docs, re-run the underlying command and confirm. Examples:
- "Bundle is 412 KB gzipped" →
du -sh dist/assets/*.js | headand verify - "94 dependencies" →
jq '.dependencies | length' package.jsonand verify - "47 routes" → recount
<Route>declarations in source
Produce a verification-report.md listing:
- Claims verified ✅
- Claims that drifted 🔧 (with the corrected number)
- Claims that need follow-up ⚠
8.2 Control-flow / narrative checks¶
For narrative claims (e.g., "the client sends Authorization: Bearer <token> on every authenticated request"), trace the actual code and confirm. Examples:
- "Token refresh on 401" → find the axios interceptor / equivalent; confirm the behavior
- "Service worker caches assets" → find the SW registration; confirm what it caches
- "Forms use Zod for validation" → spot-check 5 forms
Document any drift in the same verification-report.md.
8.3 Apply the corrections¶
If verification finds drift, fix the docs in the same PR as the verification report. The doc tree should be accurate by the end of Phase E.
9. Phase F — Integration into the Master TDD¶
Once Phases A–E are complete, the audit findings need to feed into the platform-level master TDD report.
9.1 Hand-off package¶
The audit output (the web-client/ documentation subtree) is delivered as a complete, self-contained directory. Its contents:
| File | Purpose for the master TDD |
|---|---|
README.md |
Component-level index |
architecture-overview.md |
Source for master § 3.2 (Tech stack per component) |
enterprise-readiness.md |
Source for master § 5.2 (Web Client summary), § 6 (Risk Register), § 7 (Roadmap) |
security.md |
Source for master § 4.1 (Security cross-cutting) |
observability.md |
Source for master § 4.2 (Observability cross-cutting) |
authentication-client.md |
Source for master § 4.4 (Identity end-to-end) |
verification-report.md |
Source for master § 9 (Audit trail) |
| Other detail docs | Appendix B references |
9.2 Integration steps for the master TDD author¶
When integrating these findings into the master TDD:
- Read the component's
enterprise-readiness.md§ Executive Summary — the verdict goes into master § 1 with appropriate caveats - Read the component's maturity ratings — the platform-level rating is the worst-of-components per pillar
- Read the component's risk register — append risks to master § 6 with
[WC]tags - Read the component's roadmap — append items to master § 7 with
[WC]tags - Cross-reference the security findings — combine with backend findings; reconcile (e.g., "backend issues plaintext login token + frontend stores it in localStorage = double exposure")
- Cross-reference the auth findings — produce the end-to-end identity flow narrative for master § 4.4
- Update master § 5.2 with the web-client component summary
- Bump the master TDD version — v0.1 → v0.2
The master TDD is at <platform-doc-tree>/tdd-report.md. The author of that update has the platform-level context and is responsible for the synthesis. Your job is to deliver the complete, accurate component subtree — they take it from there.
10. Document Templates¶
Use these as starting skeletons. Fill in evidence-cited content per §4–§5.
10.1 README.md template¶
# Web Client — Component Documentation
This is the documentation subtree for the Someli platform's customer-facing web client.
## Index
### Architecture & Code Organization
- [Architecture Overview](./architecture-overview.md)
- [Routing & State Management](./routing-and-state.md)
- [UI Component Library](./ui-component-library.md)
- [i18n](./i18n.md)
- [SEO & Metadata](./seo-and-metadata.md)
### Behavior & Integration
- [API Consumption](./api-consumption.md)
- [Authentication (Client-side)](./authentication-client.md)
### Cross-Cutting Concerns
- [Performance](./performance.md)
- [Accessibility](./accessibility.md)
- [Security](./security.md)
- [Observability](./observability.md)
- [Testing](./testing.md)
### Operations
- [Build & Deploy](./build-and-deploy.md)
- [Dependencies Inventory](./dependencies-inventory.md)
### Strategy
- [Enterprise Readiness](./enterprise-readiness.md)
### Audit Trail
- [Verification Report](./verification-report.md)
- [Verify Markers](./verify-markers.md)
---
## Component Summary
| | |
|--|--|
| Component name | Web Client |
| Purpose | Customer-facing UI for Someli platform |
| Tech stack | (to be populated from architecture-overview.md) |
| Audit version | 0.1 |
| Last verified | YYYY-MM-DD |
10.2 verification-report.md template¶
# Web Client — Verification Report
Audit of quantitative and narrative claims in the web-client documentation subtree against the actual codebase.
## Summary
| Category | Count |
|----------|------:|
| Claims verified ✅ | TBD |
| Claims with drift 🔧 | TBD |
| Claims requiring follow-up ⚠ | TBD |
## A. Verified Claims
| Claim | Where claimed | Reality |
|-------|---------------|---------|
| (e.g.) Uses React 18.2.0 | `architecture-overview.md` | ✅ confirmed in `package.json` |
## B. Drifted Claims
| Drift | Recommended fix |
|-------|-----------------|
| (e.g.) Doc says 94 deps; actual is 97 | Update `dependencies-inventory.md` § At a Glance |
## C. Follow-up Needed
| Item | Why deferred |
|------|--------------|
| (e.g.) Production CSP header | Need to access deployed site to verify; doc claim is inferred from build config |
10.3 enterprise-readiness.md template¶
(See §7 above for full structure.)
11. Quality Bar¶
The audit is "done" when:
- Every file in §3.1 exists and has content
- Every claim in every doc cites a source (file:line, command output, or external standard)
-
verification-report.mdexists and shows zero unaddressed drifts -
verify-markers.mdlists all open questions with owners -
enterprise-readiness.md§ Executive Summary reads cleanly to a non-engineer - At least one cross-cutting integration insight is identified (e.g., backend + frontend security combine in some way the master TDD must address)
12. Pitfalls to Avoid¶
These are the failure modes seen in similar audits:
- Skipping Phase A. Without a proper inventory, the deep-dives miss things. Spend the time.
- "Looks fine to me" claims without sourcing. Cite or don't claim.
- Hiding bad news. The audit's value is what it surfaces. Politeness damages credibility.
- Using superlatives. "Excellent" / "fragile" / "amazing" — replace with cite-able assertions.
- Inventing maturity. If a practice doesn't exist, the rating is 1, not "we're working on it."
- Comparing to backend. Don't. The web client is its own component; rate it on its own merits.
- Forgetting to integrate. Phase F is the deliverable; the docs are inputs.
- Letting the audit drift. When the codebase changes, the docs must be re-verified. Set a re-audit cadence (every 6 months recommended).
13. Estimated Effort¶
| Audit depth | Effort (one experienced auditor) |
|---|---|
| Surface — inventory only (Phase A) | 1–2 days |
| Standard — inventory + deep-dives (Phases A–B) | 3–5 days |
| Full — all phases including verification (Phases A–E) | 5–10 days |
| Full + integration into master TDD (Phases A–F) | 7–14 days |
For a typical web client of moderate size (~50 routes, ~400 components, ~200 dependencies), expect 7–10 working days for a thorough audit by one experienced auditor with appropriate codebase access.
If you have AI assistance (Claude, GPT-4, or similar), expect to compress to 3–5 working days for a thorough audit, with the human reviewing AI-generated drafts and probing follow-up questions.
14. Frameworks Cited¶
The audit references these external frameworks. They don't need to be re-authored — just point at them when relevant:
- OWASP Top 10 (2021) — web application security risks
- OWASP ASVS — application security verification standard
- WCAG 2.1 AA — accessibility minimum target
- Core Web Vitals (Google) — performance metrics
- Twelve-Factor App — operational hygiene
- CMMI 1–5 — maturity scale
- ISO/IEC 25010 — software quality model
- NIST CSF — cybersecurity risk-framing
When citing a finding, anchor it to one of these (e.g., "this is OWASP A03 — Injection").
15. Where to Send Questions¶
If something in this guide is unclear or doesn't fit your context:
- Check the equivalent backend doc for an example of the pattern (the master TDD report's Appendix A points at all backend docs)
- If still unclear, raise it with the engineering lead
The master TDD report (tdd-report.md in the platform doc tree) is the integration target — when in doubt, "does this finding affect what the TDD says?" is a useful framing.
16. Final Note¶
This audit guide is itself a deliverable — it can be improved over time. If you find a category that's missing, a question that's poorly framed, or a template that's unhelpful, fix it in this file. The next auditor (whether for this component again or for a different component) will benefit.
When the platform's third component (admin dashboard) is audited, this guide is the starting point — adapted with admin-specific concerns (RBAC, audit logging, sensitive-data handling, MFA, etc.). The structure should remain consistent.
End of guide.