# gozareha/business-plan-generator architecture

> Architecture diagram of the GitHub repository gozareha/business-plan-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gozareha/business-plan-generator
- Repository: https://github.com/gozareha/business-plan-generator

## Overview

#### Purpose and status
This repository is currently a planning-only shell for a Persian/RTL web application that will generate 10-year financial business plans. No application source, build manifest, or runtime implementation exists yet; the only substantive project definition is `README.md`.

#### Intended entry points
The future primary user entry point is a structured questionnaire in a browser. It will collect business assumptions, run financial calculations, and expose downloadable Excel and PDF outputs. No actual UI or executable entry point is present in the file tree.

Grounding: `README.md`

#### Financial-model pipeline
The planned core domain flow is:

1. Capture and validate questionnaire inputs.
2. Calculate fixed investment and depreciation.
3. Calculate working capital, payroll, operating expenses, sales/advertising assumptions, and bank facilities.
4. Produce projected profit and loss over ten years.
5. Derive plan summary and IRR.
6. Render/export the resulting model as Excel and PDF.

The stated model is based on a nine-sheet Excel-style structure, making the financial calculation layer the architectural center rather than the UI.

Grounding: `README.md`

#### Planned application boundary
The intended frontend stack is React 18, Vite, and TypeScript, with Tailwind CSS configured for RTL presentation. React Hook Form and Zod are planned for the questionnaire/form-validation boundary. At present, none of their package, source, or configuration files are committed.

Grounding: `README.md`

#### Export boundary
Calculated financial-model data will be transformed into two document formats: Excel via SheetJS and PDF via jsPDF. Export adapters should consume a stable, computed plan model rather than form state directly, so spreadsheet sheets and PDF presentation remain separate from calculation rules.

Grounding: `README.md`

#### Repository state and planning artifact
The repository contains no implemented financial engine, UI, API, persistence layer, tests, or infrastructure definitions. The `.zcode` content is planning metadata rather than application runtime code.

Grounding: `.zcode/plans/plan-sess_8e1f5fff-569b-45f6-9485-1a04cacb29a6.md`, `README.md`

#### Material runtime and services
The planned runtime is a client-side Vite/React web application. No backend, database, authentication provider, deployment platform, or external financial service is identified. Calculations and document generation are therefore expected to run locally in the browser unless later architecture adds server-side concerns.

Grounding: `README.md`

Main entry points: [`README.md`](https://github.com/gozareha/business-plan-generator/blob/main/README.md) (Financial calculation engine), [`.zcode/plans/plan-sess_8e1f5fff-569b-45f6-9485-1a04cacb29a6.md`](https://github.com/gozareha/business-plan-generator/blob/main/.zcode/plans/plan-sess_8e1f5fff-569b-45f6-9485-1a04cacb29a6.md) (Planning metadata)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planned_client["Planned browser application"]
  node_questionnaire["Structured questionnaire<br/>planned React UI<br/>[README.md]"]
  node_form_validation["Input validation<br/>[README.md]"]
end

subgraph group_financial_model["Financial model"]
  node_financial_engine{{"Financial calculation engine<br/>planned domain layer<br/>[README.md]"}}
  node_fixed_investment["Investment &amp; depreciation<br/>model stage<br/>[README.md]"]
  node_operating_assumptions["Working capital &amp; operations<br/>model stage<br/>[README.md]"]
  node_ten_year_pnl["10-year profit &amp; loss<br/>projection stage<br/>[README.md]"]
  node_plan_summary["Plan summary &amp; IRR<br/>derived metrics<br/>[README.md]"]
  node_computed_plan["Computed plan model<br/>stable export contract<br/>[README.md]"]
end

subgraph group_exports["Document exports"]
  node_excel_export["Excel export<br/>SheetJS adapter<br/>[README.md]"]
  node_pdf_export["PDF export<br/>jsPDF adapter<br/>[README.md]"]
end

node_planning_metadata["Planning metadata<br/>non-runtime artifact"]
node_repository_readme["Project definition<br/>README<br/>[README.md]"]

node_questionnaire -->|"submits assumptions"| node_form_validation
node_form_validation -->|"validated inputs"| node_financial_engine
node_financial_engine -->|"calculates"| node_fixed_investment
node_financial_engine -->|"calculates"| node_operating_assumptions
node_fixed_investment -->|"depreciation inputs"| node_ten_year_pnl
node_operating_assumptions -->|"operating inputs"| node_ten_year_pnl
node_ten_year_pnl -->|"projects"| node_plan_summary
node_plan_summary -->|"derives"| node_computed_plan
node_computed_plan -->|"renders"| node_excel_export
node_computed_plan -->|"renders"| node_pdf_export
node_repository_readme -.->|"defines planned UI"| node_questionnaire
node_planning_metadata -.->|"records planning"| node_repository_readme

click node_questionnaire "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_form_validation "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_financial_engine "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_fixed_investment "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_operating_assumptions "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_ten_year_pnl "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_plan_summary "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_computed_plan "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_excel_export "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_pdf_export "https://github.com/gozareha/business-plan-generator/blob/main/README.md"
click node_planning_metadata "https://github.com/gozareha/business-plan-generator/blob/main/.zcode/plans/plan-sess_8e1f5fff-569b-45f6-9485-1a04cacb29a6.md"
click node_repository_readme "https://github.com/gozareha/business-plan-generator/blob/main/README.md"

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_questionnaire,node_form_validation toneBlue
class node_financial_engine,node_fixed_investment,node_operating_assumptions,node_ten_year_pnl,node_plan_summary,node_computed_plan toneAmber
class node_excel_export,node_pdf_export toneMint
class node_planning_metadata,node_repository_readme toneNeutral
```

## Components

### Planned browser application

No implementation exists yet.

- [Structured questionnaire](https://github.com/gozareha/business-plan-generator/blob/main/README.md): planned React UI · Persian/RTL browser entry point for business assumptions. · `README.md`
- [Input validation](https://github.com/gozareha/business-plan-generator/blob/main/README.md): React Hook Form + Zod · `README.md`

### Financial model

Planned nine-sheet Excel-style calculation structure.

- [Financial calculation engine](https://github.com/gozareha/business-plan-generator/blob/main/README.md): planned domain layer · Stable computed plan model; architectural center. · `README.md`
- [Investment & depreciation](https://github.com/gozareha/business-plan-generator/blob/main/README.md): model stage · `README.md`
- [Working capital & operations](https://github.com/gozareha/business-plan-generator/blob/main/README.md): model stage · Working capital, payroll, operating expenses, sales, advertising, and bank facilities. · `README.md`
- [10-year profit & loss](https://github.com/gozareha/business-plan-generator/blob/main/README.md): projection stage · `README.md`
- [Plan summary & IRR](https://github.com/gozareha/business-plan-generator/blob/main/README.md): derived metrics · `README.md`
- [Computed plan model](https://github.com/gozareha/business-plan-generator/blob/main/README.md): stable export contract · Separates calculation rules from document presentation. · `README.md`

### Document exports

- [Excel export](https://github.com/gozareha/business-plan-generator/blob/main/README.md): SheetJS adapter · `README.md`
- [PDF export](https://github.com/gozareha/business-plan-generator/blob/main/README.md): jsPDF adapter · `README.md`

### Other components

- [Planning metadata](https://github.com/gozareha/business-plan-generator/blob/main/.zcode/plans/plan-sess_8e1f5fff-569b-45f6-9485-1a04cacb29a6.md): non-runtime artifact · Repository planning content, not application code. · `.zcode/plans/plan-sess_8e1f5fff-569b-45f6-9485-1a04cacb29a6.md`
- [Project definition](https://github.com/gozareha/business-plan-generator/blob/main/README.md): README · Only substantive current project definition. · `README.md`

## Connections

- Structured questionnaire → Input validation: submits assumptions
- Input validation → Financial calculation engine: validated inputs
- Financial calculation engine → Investment & depreciation: calculates
- Financial calculation engine → Working capital & operations: calculates
- Investment & depreciation → 10-year profit & loss: depreciation inputs
- Working capital & operations → 10-year profit & loss: operating inputs
- 10-year profit & loss → Plan summary & IRR: projects
- Plan summary & IRR → Computed plan model: derives
- Computed plan model → Excel export: renders
- Computed plan model → PDF export: renders
- Project definition → Structured questionnaire: defines planned UI
- Planning metadata → Project definition: records planning
