# kumar-alok-anand/uwillget_audit architecture

> Architecture diagram of the GitHub repository kumar-alok-anand/uwillget_audit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kumar-alok-anand/uwillget_audit
- Repository: https://github.com/kumar-alok-anand/uwillget_audit

## Overview

UwillGet is a digital-presence audit and client-reporting tool. Employees enter client details and manually researched platform, competitor, branding, and trust information; the app scores the audit, prepares findings and service recommendations, lets employees review them, then previews and exports or shares the report. The README describes browser-only storage, but sampled storage code also attempts server sync, and the tree contains an Express/MongoDB backend. Backend route and model internals were not sampled, so their wiring is shown only where supported.

Main entry points: [`src/context/AuditContext.tsx`](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/context/AuditContext.tsx) (Audit state), [`src/pages/AuditForm.tsx`](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/pages/AuditForm.tsx) (Audit form), [`src/steps/StepPreview.tsx`](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepPreview.tsx) (Export and share controls), [`src/utils/storage.ts`](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/storage.ts) (Audit persistence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Audit workflow"]
  node_app["App shell<br/>[App.tsx]"]
  node_dashboard["Audit dashboard<br/>[Dashboard.tsx]"]
  node_form["Audit form<br/>[AuditForm.tsx]"]
  node_client["Client details<br/>[StepClient.tsx]"]
  node_platform["Platform audit<br/>[PlatformAudit.tsx]"]
  node_research["Research and competitors<br/>[StepResearch.tsx]"]
  node_competitors["Competitor research"]
  node_review["Audit review<br/>[StepReview.tsx]"]
end

subgraph group_analysis["Audit analysis"]
  node_auditstate["Audit state<br/>[AuditContext.tsx]"]
  node_questions["Question rules<br/>[index.ts]"]
  node_scoring["Score calculation<br/>[scoring.ts]"]
  node_findings["Findings rules<br/>[findings.ts]"]
  node_recommendations["Service recommendations<br/>[recommendations.ts]"]
end

subgraph group_reporting["Report and sharing"]
  node_preview["Report preview<br/>[ReportPreview.tsx]"]
  node_previewtools["Export and share controls<br/>[StepPreview.tsx]"]
  node_pdf["PDF generator<br/>[pdfGenerator.ts]"]
  node_whatsapp["WhatsApp message builder<br/>[whatsapp.ts]"]
end

subgraph group_persistence["Audit persistence"]
  node_storage["Audit persistence<br/>[storage.ts]"]
  node_browserstore[("Browser storage")]
  node_api["Audit API client<br/>[api.ts]"]
end

subgraph group_backend["Server storage"]
  node_server["Express API<br/>[index.js]"]
  node_routes["Audit routes<br/>[audits.js]"]
  node_auditmodel[("Audit model<br/>[Audit.js]")]
  node_mongo[("MongoDB")]
end

node_employee(("UwillGet employee"))
node_whatsappservice(("WhatsApp"))

node_employee -->|"opens"| node_app
node_app -->|"shows"| node_dashboard
node_app -->|"shows"| node_form
node_dashboard -->|"opens audit"| node_form
node_form -->|"presents step"| node_client
node_form -->|"presents step"| node_platform
node_form -->|"presents step"| node_research
node_form -->|"presents step"| node_competitors
node_form -->|"presents step"| node_review
node_form -->|"presents step"| node_previewtools
node_client -->|"updates"| node_auditstate
node_platform -->|"updates"| node_auditstate
node_research -->|"updates"| node_auditstate
node_competitors -->|"updates"| node_auditstate
node_auditstate -->|"reads rules"| node_questions
node_auditstate -->|"calculates scores"| node_scoring
node_auditstate -->|"evaluates rules"| node_findings
node_auditstate -->|"autosaves"| node_storage
node_review -->|"updates selections"| node_auditstate
node_review -->|"generates summary"| node_recommendations
node_form -->|"shows report"| node_preview
node_preview -->|"reads audit"| node_auditstate
node_previewtools -->|"generates PDF"| node_pdf
node_previewtools -->|"builds message"| node_whatsapp
node_previewtools -->|"exports JSON"| node_storage
node_previewtools -->|"renders"| node_preview
node_previewtools -->|"opens message"| node_whatsappservice
node_storage -->|"reads/writes"| node_browserstore
node_storage -.->|"syncs audits"| node_api
node_api -.->|"requests"| node_server
node_server -->|"mounts routes"| node_routes
node_routes -.->|"uses model"| node_auditmodel
node_auditmodel -.->|"persists audits"| node_mongo

click node_app "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/App.tsx"
click node_dashboard "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/pages/Dashboard.tsx"
click node_form "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/pages/AuditForm.tsx"
click node_client "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepClient.tsx"
click node_platform "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/components/PlatformAudit.tsx"
click node_research "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepResearch.tsx"
click node_competitors "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepCompetitors.tsx"
click node_auditstate "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/context/AuditContext.tsx"
click node_questions "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/data/questions/index.ts"
click node_scoring "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/scoring.ts"
click node_findings "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/findings.ts"
click node_recommendations "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/recommendations.ts"
click node_review "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepReview.tsx"
click node_preview "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/pages/ReportPreview.tsx"
click node_previewtools "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepPreview.tsx"
click node_pdf "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/pdfGenerator.ts"
click node_whatsapp "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/whatsapp.ts"
click node_storage "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/storage.ts"
click node_api "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/api.ts"
click node_server "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/server/index.js"
click node_routes "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/server/routes/audits.js"
click node_auditmodel "https://github.com/kumar-alok-anand/uwillget_audit/blob/main/server/models/Audit.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_dashboard,node_form,node_client,node_platform,node_research,node_competitors,node_review toneBlue
class node_auditstate,node_questions,node_scoring,node_findings,node_recommendations toneAmber
class node_preview,node_previewtools,node_pdf,node_whatsapp toneMint
class node_storage,node_browserstore,node_api toneRose
class node_server,node_routes,node_auditmodel,node_mongo,node_employee,node_whatsappservice toneIndigo
```

## Components

### Audit workflow

- [App shell](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/App.tsx): `src/App.tsx`
- [Audit dashboard](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Audit form](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/pages/AuditForm.tsx): `src/pages/AuditForm.tsx`
- [Client details](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepClient.tsx): `src/steps/StepClient.tsx`
- [Platform audit](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/components/PlatformAudit.tsx): `src/components/PlatformAudit.tsx`
- [Research and competitors](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepResearch.tsx): `src/steps/StepResearch.tsx`
- [Competitor research](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepCompetitors.tsx): `src/steps/StepCompetitors.tsx`
- [Audit review](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepReview.tsx): `src/steps/StepReview.tsx`

### Audit analysis

- [Audit state](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/context/AuditContext.tsx): `src/context/AuditContext.tsx`
- [Question rules](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/data/questions/index.ts): `src/data/questions/index.ts`
- [Score calculation](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/scoring.ts): `src/utils/scoring.ts`
- [Findings rules](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/findings.ts): `src/utils/findings.ts`
- [Service recommendations](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/recommendations.ts): `src/utils/recommendations.ts`

### Report and sharing

- [Report preview](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/pages/ReportPreview.tsx): `src/pages/ReportPreview.tsx`
- [Export and share controls](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/steps/StepPreview.tsx): `src/steps/StepPreview.tsx`
- [PDF generator](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/pdfGenerator.ts): `src/utils/pdfGenerator.ts`
- [WhatsApp message builder](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/whatsapp.ts): `src/utils/whatsapp.ts`

### Audit persistence

- [Audit persistence](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/storage.ts): `src/utils/storage.ts`
- **Browser storage**
- [Audit API client](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/src/utils/api.ts): `src/utils/api.ts`

### Server storage

- [Express API](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/server/index.js): `server/index.js`
- [Audit routes](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/server/routes/audits.js): `server/routes/audits.js`
- [Audit model](https://github.com/kumar-alok-anand/uwillget_audit/blob/main/server/models/Audit.js): `server/models/Audit.js`
- **MongoDB**

### Other components

- **UwillGet employee**
- **WhatsApp**

## Connections

- UwillGet employee → App shell: opens
- App shell → Audit dashboard: shows
- App shell → Audit form: shows
- Audit dashboard → Audit form: opens audit
- Audit form → Client details: presents step
- Audit form → Platform audit: presents step
- Audit form → Research and competitors: presents step
- Audit form → Competitor research: presents step
- Audit form → Audit review: presents step
- Audit form → Export and share controls: presents step
- Client details → Audit state: updates
- Platform audit → Audit state: updates
- Research and competitors → Audit state: updates
- Competitor research → Audit state: updates
- Audit state → Question rules: reads rules
- Audit state → Score calculation: calculates scores
- Audit state → Findings rules: evaluates rules
- Audit state → Audit persistence: autosaves
- Audit review → Audit state: updates selections
- Audit review → Service recommendations: generates summary
- Audit form → Report preview: shows report
- Report preview → Audit state: reads audit
- Export and share controls → PDF generator: generates PDF
- Export and share controls → WhatsApp message builder: builds message
- Export and share controls → Audit persistence: exports JSON
- Export and share controls → Report preview: renders
- Export and share controls → WhatsApp: opens message
- Audit persistence → Browser storage: reads/writes
- Audit persistence → Audit API client: syncs audits
- Audit API client → Express API: requests
- Express API → Audit routes: mounts routes
- Audit routes → Audit model: uses model
- Audit model → MongoDB: persists audits
