# amirbekbaxshilloyev/buxsoft-clean architecture

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

- Interactive diagram: https://gitdiagram.com/amirbekbaxshilloyev/buxsoft-clean
- Repository: https://github.com/amirbekbaxshilloyev/buxsoft-clean

## Overview

BuxSoft is a bilingual accounting and tax-outsourcing marketing site with a quote-and-consultation lead wizard. The documented user journey runs from the site’s service and pricing content into a multi-step request, then submits the confirmed lead. Google Sheets supplies runtime CMS content and receives leads through Apps Script. The excerpts establish the CMS client and final wizard submission; some page-loading and Apps Script internals are not sampled, so those links reflect README documentation rather than inspected implementation details.

Main entry points: [`sections/wizard/Wizard.tsx`](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/Wizard.tsx) (Wizard controller), [`services/cms.ts`](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/services/cms.ts) (CMS service), [`app/page.tsx`](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/app/page.tsx) (Page entry), [`sections/BuxSoftApp.tsx`](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/BuxSoftApp.tsx) (Marketing content)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Marketing Site"]
  node_page["Page entry<br/>[page.tsx]"]
  node_sitecontent["Marketing content<br/>[BuxSoftApp.tsx]"]
  node_localization["Bilingual text<br/>[i18n.tsx]"]
end

subgraph group_lead["Lead Wizard"]
  node_wizard["Wizard controller<br/>[Wizard.tsx]"]
  node_registration["Contact details"]
  node_activity["Business activity<br/>[StepActivity.tsx]"]
  node_tariff["Tariff selection<br/>[StepTariff.tsx]"]
  node_services["Extra services<br/>[StepServices.tsx]"]
  node_summary["Confirm request<br/>[StepSummary.tsx]"]
  node_selection["Selection pricing<br/>[wizard.ts]"]
  node_wizarddata["Wizard form model<br/>[wizard.ts]"]
end

subgraph group_cms["CMS Client"]
  node_cmsservice["CMS service<br/>[cms.ts]"]
  node_cmsmodel["CMS data model<br/>[cms.ts]"]
end

subgraph group_backend["Sheets Backend"]
  node_apps_script["Apps Script API<br/>[Code.gs]"]
  node_sheets[("Google Sheets")]
end

node_visitor(("Site visitor"))
node_endpoint["Apps Script endpoint"]

node_visitor -->|"opens"| node_page
node_page -->|"loads CMS"| node_cmsservice
node_cmsservice -->|"fetches content"| node_endpoint
node_endpoint -->|"dispatches request"| node_apps_script
node_apps_script -->|"reads or writes"| node_sheets
node_cmsservice -->|"normalizes as"| node_cmsmodel
node_page -->|"renders"| node_sitecontent
node_sitecontent -->|"gets translations"| node_localization
node_sitecontent -->|"opens consultation"| node_wizard
node_wizard -->|"presents step"| node_registration
node_wizard -->|"presents step"| node_activity
node_wizard -->|"presents step"| node_tariff
node_wizard -->|"presents step"| node_services
node_wizard -->|"presents step"| node_summary
node_registration -->|"updates form"| node_wizarddata
node_activity -->|"updates form"| node_wizarddata
node_tariff -->|"updates form"| node_wizarddata
node_services -->|"derives total"| node_selection
node_summary -->|"derives total"| node_selection
node_summary -->|"submits lead"| node_cmsservice
node_cmsservice -->|"posts lead"| node_endpoint

click node_page "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/app/page.tsx"
click node_sitecontent "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/BuxSoftApp.tsx"
click node_localization "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/lib/i18n.tsx"
click node_cmsservice "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/services/cms.ts"
click node_cmsmodel "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/types/cms.ts"
click node_wizard "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/Wizard.tsx"
click node_registration "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepRegistration.tsx"
click node_activity "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepActivity.tsx"
click node_tariff "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepTariff.tsx"
click node_services "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepServices.tsx"
click node_summary "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepSummary.tsx"
click node_selection "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/lib/wizard.ts"
click node_wizarddata "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/types/wizard.ts"
click node_apps_script "https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/apps-script/Code.gs"

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_page,node_sitecontent,node_localization toneBlue
class node_wizard,node_registration,node_activity,node_tariff,node_services,node_summary,node_selection,node_wizarddata toneAmber
class node_cmsservice,node_cmsmodel toneMint
class node_apps_script,node_sheets toneRose
class node_visitor,node_endpoint toneIndigo
```

## Components

### Marketing Site

- [Page entry](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/app/page.tsx): `app/page.tsx`
- [Marketing content](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/BuxSoftApp.tsx): `sections/BuxSoftApp.tsx`
- [Bilingual text](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/lib/i18n.tsx): `lib/i18n.tsx`

### Lead Wizard

- [Wizard controller](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/Wizard.tsx): `sections/wizard/Wizard.tsx`
- [Contact details](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepRegistration.tsx): `sections/wizard/StepRegistration.tsx`
- [Business activity](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepActivity.tsx): `sections/wizard/StepActivity.tsx`
- [Tariff selection](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepTariff.tsx): `sections/wizard/StepTariff.tsx`
- [Extra services](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepServices.tsx): `sections/wizard/StepServices.tsx`
- [Confirm request](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/sections/wizard/StepSummary.tsx): `sections/wizard/StepSummary.tsx`
- [Selection pricing](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/lib/wizard.ts): `lib/wizard.ts`
- [Wizard form model](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/types/wizard.ts): `types/wizard.ts`

### CMS Client

- [CMS service](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/services/cms.ts): `services/cms.ts`
- [CMS data model](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/types/cms.ts): `types/cms.ts`

### Sheets Backend

- [Apps Script API](https://github.com/amirbekbaxshilloyev/buxsoft-clean/blob/main/apps-script/Code.gs): `apps-script/Code.gs`
- **Google Sheets**

### Other components

- **Site visitor**
- **Apps Script endpoint**

## Connections

- Site visitor → Page entry: opens
- Page entry → CMS service: loads CMS
- CMS service → Apps Script endpoint: fetches content
- Apps Script endpoint → Apps Script API: dispatches request
- Apps Script API → Google Sheets: reads or writes
- CMS service → CMS data model: normalizes as
- Page entry → Marketing content: renders
- Marketing content → Bilingual text: gets translations
- Marketing content → Wizard controller: opens consultation
- Wizard controller → Contact details: presents step
- Wizard controller → Business activity: presents step
- Wizard controller → Tariff selection: presents step
- Wizard controller → Extra services: presents step
- Wizard controller → Confirm request: presents step
- Contact details → Wizard form model: updates form
- Business activity → Wizard form model: updates form
- Tariff selection → Wizard form model: updates form
- Extra services → Selection pricing: derives total
- Confirm request → Selection pricing: derives total
- Confirm request → CMS service: submits lead
- CMS service → Apps Script endpoint: posts lead
