# vasundhara-331/zyra-srs-generation-module architecture

> Architecture diagram of the GitHub repository vasundhara-331/zyra-srs-generation-module, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vasundhara-331/zyra-srs-generation-module
- Repository: https://github.com/vasundhara-331/zyra-srs-generation-module

## Overview

ZYRA is a web-based IEEE 830 SRS authoring tool. A user supplies project details, then completes template-driven sections manually or uses Ollama-powered autofill or full-draft generation; the wizard exports the resulting specification as JSON, PDF, or DOCX. The README documents standardized structured requirements and local Phi-3 inference. Some wizard implementation is excerpted, so the graph shows only supported API calls and export paths; unshown UI-to-template wiring is not inferred.

Main entry points: [`src/components/SRS-Wizard.tsx`](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/components/SRS-Wizard.tsx) (SRS wizard), [`src/app/api/generate-full/route.ts`](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/api/generate-full/route.ts) (Full draft endpoint), [`src/app/api/autofill/route.ts`](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/api/autofill/route.ts) (Autofill endpoint), [`src/app/page.tsx`](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/page.tsx) (Home entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["SRS authoring"]
  node_wizard["SRS wizard<br/>[SRS-Wizard.tsx]"]
  node_template["IEEE 830 template<br/>[srs-template.ts]"]
  node_metadata["Project details<br/>[SRS-Wizard.tsx]"]
  node_section_answers["Section answers<br/>[SRS-Wizard.tsx]"]
end

subgraph group_generation["AI generation"]
  node_autofill_api["Autofill endpoint<br/>[route.ts]"]
  node_full_api["Full draft endpoint<br/>[route.ts]"]
  node_ollama["Ollama Phi-3"]
end

subgraph group_export["Document export"]
  node_pdf_docx["PDF and DOCX builder"]
  node_download_api["Download endpoint<br/>[route.ts]"]
  node_downloads[("Server Downloads folder")]
end

subgraph group_app["Web application"]
  node_home["Home entry<br/>[page.tsx]"]
  node_guide["Technical guide<br/>[page.tsx]"]
  node_layout["Root layout<br/>[layout.tsx]"]
end

node_user(("SRS author"))

node_user -->|"opens"| node_home
node_home -->|"renders"| node_wizard
node_user -->|"enters details"| node_wizard
node_wizard -->|"requests suggestions"| node_autofill_api
node_autofill_api -->|"generates text"| node_ollama
node_ollama -->|"returns text"| node_autofill_api
node_autofill_api -->|"returns suggestion"| node_wizard
node_wizard -->|"requests full draft"| node_full_api
node_full_api -->|"gets required fields"| node_template
node_full_api -->|"generates draft"| node_ollama
node_ollama -->|"returns JSON"| node_full_api
node_full_api -->|"returns answers"| node_wizard
node_wizard -->|"builds PDF or DOCX"| node_pdf_docx
node_pdf_docx -->|"sends encoded file"| node_download_api
node_wizard -->|"sends JSON export"| node_download_api
node_download_api -->|"writes file"| node_downloads
node_user -->|"opens guide"| node_guide
node_home -->|"renders within"| node_layout
node_guide -->|"renders within"| node_layout

click node_home "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/page.tsx"
click node_wizard "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/components/SRS-Wizard.tsx"
click node_template "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/constants/srs-template.ts"
click node_metadata "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/components/SRS-Wizard.tsx"
click node_section_answers "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/components/SRS-Wizard.tsx"
click node_autofill_api "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/api/autofill/route.ts"
click node_full_api "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/api/generate-full/route.ts"
click node_pdf_docx "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/utils/document-generator.ts"
click node_download_api "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/api/download/route.ts"
click node_guide "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/guide/page.tsx"
click node_layout "https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/layout.tsx"

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_wizard,node_template,node_metadata,node_section_answers toneBlue
class node_autofill_api,node_full_api,node_ollama toneAmber
class node_pdf_docx,node_download_api,node_downloads toneMint
class node_home,node_guide,node_layout toneRose
class node_user toneIndigo
```

## Components

### SRS authoring

- [SRS wizard](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/components/SRS-Wizard.tsx): `src/components/SRS-Wizard.tsx`
- [IEEE 830 template](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/constants/srs-template.ts): `src/constants/srs-template.ts`
- [Project details](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/components/SRS-Wizard.tsx): `src/components/SRS-Wizard.tsx`
- [Section answers](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/components/SRS-Wizard.tsx): `src/components/SRS-Wizard.tsx`

### AI generation

- [Autofill endpoint](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/api/autofill/route.ts): `src/app/api/autofill/route.ts`
- [Full draft endpoint](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/api/generate-full/route.ts): `src/app/api/generate-full/route.ts`
- **Ollama Phi-3**

### Document export

- [PDF and DOCX builder](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/utils/document-generator.ts): `src/utils/document-generator.ts`
- [Download endpoint](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/api/download/route.ts): `src/app/api/download/route.ts`
- **Server Downloads folder**

### Web application

- [Home entry](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Technical guide](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/guide/page.tsx): `src/app/guide/page.tsx`
- [Root layout](https://github.com/vasundhara-331/zyra-srs-generation-module/blob/main/src/app/layout.tsx): `src/app/layout.tsx`

### Other components

- **SRS author**

## Connections

- SRS author → Home entry: opens
- Home entry → SRS wizard: renders
- SRS author → SRS wizard: enters details
- SRS wizard → Autofill endpoint: requests suggestions
- Autofill endpoint → Ollama Phi-3: generates text
- Ollama Phi-3 → Autofill endpoint: returns text
- Autofill endpoint → SRS wizard: returns suggestion
- SRS wizard → Full draft endpoint: requests full draft
- Full draft endpoint → IEEE 830 template: gets required fields
- Full draft endpoint → Ollama Phi-3: generates draft
- Ollama Phi-3 → Full draft endpoint: returns JSON
- Full draft endpoint → SRS wizard: returns answers
- SRS wizard → PDF and DOCX builder: builds PDF or DOCX
- PDF and DOCX builder → Download endpoint: sends encoded file
- SRS wizard → Download endpoint: sends JSON export
- Download endpoint → Server Downloads folder: writes file
- SRS author → Technical guide: opens guide
- Home entry → Root layout: renders within
- Technical guide → Root layout: renders within
