# vadlamuriphanivarma-debug/slideforge-ai architecture

> Architecture diagram of the GitHub repository vadlamuriphanivarma-debug/slideforge-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vadlamuriphanivarma-debug/slideforge-ai
- Repository: https://github.com/vadlamuriphanivarma-debug/slideforge-ai

## Overview

SlideForge turns a topic and presentation options into generated slide content, then optionally renders that content as a downloadable PowerPoint. The main path is browser request → REST controller → content generation (OpenAI, with fallback) → presentation content; the generate endpoint additionally invokes the PPTX renderer, while preview returns JSON. The README documents health, preview, themes, and slide-count limits. Source excerpts establish the controller’s service calls and the generator’s layout work; unsampled frontend behavior and application wiring are shown only where documented.

Main entry points: [`backend/src/main/java/com/aippt/controller/PptController.java`](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/controller/PptController.java) (PPT controller), [`backend/src/main/java/com/aippt/service/OpenAiContentService.java`](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/service/OpenAiContentService.java) (Content service), [`backend/src/main/java/com/aippt/service/PptGenerationService.java`](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/service/PptGenerationService.java) (PPTX renderer), [`frontend/index.html`](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/frontend/index.html) (Browser form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interface"]
  node_frontend["Browser form<br/>[index.html]"]
end

subgraph group_api["HTTP API"]
  node_controller["PPT controller<br/>[PptController.java]"]
  node_request["Generation request<br/>[PptRequest.java]"]
  node_response["API response<br/>[ApiResponse.java]"]
  node_cors["CORS policy<br/>[CorsConfig.java]"]
end

subgraph group_content["Content generation"]
  node_content_service["Content service"]
  node_openai_config["OpenAI client config<br/>[OpenAiConfig.java]"]
  node_presentation["Presentation content"]
  node_slide["Slide content<br/>[SlideContent.java]"]
end

subgraph group_render["Presentation output"]
  node_renderer["PPTX renderer"]
  node_download["PPTX download"]
end

node_user(("Deck author"))
node_openai{{"OpenAI GPT"}}

node_user -->|"specifies deck"| node_frontend
node_frontend -->|"submits request"| node_controller
node_controller -->|"accepts payload"| node_request
node_controller -->|"requests content"| node_content_service
node_content_service -->|"requests completion"| node_openai
node_openai_config -->|"configures client"| node_openai
node_content_service -->|"builds content"| node_presentation
node_content_service -->|"builds slides"| node_slide
node_controller -->|"requests PPTX"| node_renderer
node_renderer -->|"reads content"| node_presentation
node_renderer -->|"renders slides"| node_slide
node_controller -->|"wraps JSON"| node_response
node_controller -->|"returns preview or file"| node_frontend
node_renderer -->|"produces binary"| node_download
node_cors -.->|"permits browser origin"| node_frontend

click node_frontend "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/frontend/index.html"
click node_controller "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/controller/PptController.java"
click node_request "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/model/PptRequest.java"
click node_response "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/model/ApiResponse.java"
click node_cors "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/config/CorsConfig.java"
click node_content_service "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/service/OpenAiContentService.java"
click node_openai_config "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/config/OpenAiConfig.java"
click node_presentation "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/model/PresentationContent.java"
click node_slide "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/model/SlideContent.java"
click node_renderer "https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/service/PptGenerationService.java"

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_frontend toneBlue
class node_controller,node_request,node_response,node_cors toneAmber
class node_content_service,node_openai_config,node_presentation,node_slide toneMint
class node_renderer,node_download toneRose
class node_user,node_openai toneIndigo
```

## Components

### User interface

- [Browser form](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/frontend/index.html): `frontend/index.html`

### HTTP API

- [PPT controller](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/controller/PptController.java): `backend/src/main/java/com/aippt/controller/PptController.java`
- [Generation request](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/model/PptRequest.java): `backend/src/main/java/com/aippt/model/PptRequest.java`
- [API response](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/model/ApiResponse.java): `backend/src/main/java/com/aippt/model/ApiResponse.java`
- [CORS policy](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/config/CorsConfig.java): `backend/src/main/java/com/aippt/config/CorsConfig.java`

### Content generation

- [Content service](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/service/OpenAiContentService.java): `backend/src/main/java/com/aippt/service/OpenAiContentService.java`
- [OpenAI client config](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/config/OpenAiConfig.java): `backend/src/main/java/com/aippt/config/OpenAiConfig.java`
- [Presentation content](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/model/PresentationContent.java): `backend/src/main/java/com/aippt/model/PresentationContent.java`
- [Slide content](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/model/SlideContent.java): `backend/src/main/java/com/aippt/model/SlideContent.java`

### Presentation output

- [PPTX renderer](https://github.com/vadlamuriphanivarma-debug/slideforge-ai/blob/main/backend/src/main/java/com/aippt/service/PptGenerationService.java): `backend/src/main/java/com/aippt/service/PptGenerationService.java`
- **PPTX download**

### Other components

- **Deck author**
- **OpenAI GPT**

## Connections

- Deck author → Browser form: specifies deck (evidence: `README.md`)
- Browser form → PPT controller: submits request (evidence: `README.md`)
- PPT controller → Generation request: accepts payload (evidence: `backend/src/main/java/com/aippt/controller/PptController.java`)
- PPT controller → Content service: requests content (evidence: `backend/src/main/java/com/aippt/controller/PptController.java`)
- Content service → OpenAI GPT: requests completion (evidence: `backend/src/main/java/com/aippt/service/OpenAiContentService.java`)
- OpenAI client config → OpenAI GPT: configures client (evidence: `backend/src/main/java/com/aippt/config/OpenAiConfig.java`)
- Content service → Presentation content: builds content (evidence: `backend/src/main/java/com/aippt/service/OpenAiContentService.java`)
- Content service → Slide content: builds slides (evidence: `backend/src/main/java/com/aippt/service/OpenAiContentService.java`)
- PPT controller → PPTX renderer: requests PPTX (evidence: `backend/src/main/java/com/aippt/controller/PptController.java`)
- PPTX renderer → Presentation content: reads content (evidence: `backend/src/main/java/com/aippt/service/PptGenerationService.java`)
- PPTX renderer → Slide content: renders slides (evidence: `backend/src/main/java/com/aippt/service/PptGenerationService.java`)
- PPT controller → API response: wraps JSON (evidence: `backend/src/main/java/com/aippt/controller/PptController.java`)
- PPT controller → Browser form: returns preview or file (evidence: `README.md`)
- PPTX renderer → PPTX download: produces binary (evidence: `README.md`)
- CORS policy → Browser form: permits browser origin (evidence: `backend/src/main/java/com/aippt/config/CorsConfig.java`)
