# ponsivs/windows-ai-c-cpp-ide-pro architecture

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

- Interactive diagram: https://gitdiagram.com/ponsivs/windows-ai-c-cpp-ide-pro
- Repository: https://github.com/ponsivs/windows-ai-c-cpp-ide-pro

## Overview

1. **Repository shape**
   - This repo is a packaged Windows desktop application, not a multi-service codebase.
   - The visible artifacts are the launcher script `AI-C-C++IDE_Main.ps1`, a compiled app `AI-C-C++IDE.exe`, and the README/documentation.
   - The architecture is therefore centered on a single end-user IDE process with supporting local tools.

2. **Top-level runtime model**
   - The app runs on Windows and is described as requiring PowerShell 5.1+ and .NET Framework 4.5+.
   - The PowerShell script appears to be the main orchestration layer for starting the UI, invoking compilation, managing temp files, and coordinating AI/voice actions.
   - The EXE is likely a packaged build of the same product for simpler distribution.

3. **User interface subsystem**
   - The UI is a Windows desktop IDE with split panels: problem input, generated source, algorithm/explanation views, and console output.
   - The interface also exposes status indicators, language detection, voice controls, and keyboard shortcuts.
   - For an architecture diagram, this is the primary presentation boundary: user interaction stays inside the desktop app.

4. **AI code-generation subsystem**
   - Natural-language prompts are sent to an external NVIDIA AI service, described as using Llama-3-70B.
   - The system detects whether the request should produce C or C++ and returns a complete program rather than snippets.
   - This is the main cloud dependency and the only clearly required internet-backed integration.

5. **Code analysis and educational layer**
   - The app does more than generate code: it derives an algorithm view, code explanation text, and input requirements.
   - These features are educational overlays on top of the generated program, not separate execution services.
   - Diagrammatically, this sits between the AI output and the UI panels, transforming generated code into human-readable learning content.

6. **Local build and execution subsystem**
   - Compilation is done locally using a bundled GCC toolchain, so the application does not depend on a system-wide compiler install.
   - Generated source is written to temporary files in `%TEMP%\IGRF_IDE_[random]\...` and compiled into a local `.exe`.
   - Execution is then launched from that temp workspace, making compile/run a local isolated pipeline.

7. **Input detection and runtime orchestration**
   - The README indicates automatic input detection for generated programs.
   - During execution, the app prompts the user for runtime inputs, feeds them into the compiled program, and captures console output.
   - This makes the local runtime subsystem a coordinator between the console process, the UI, and the voice layer.

8. **Voice learning subsystem**
   - Voice output is provided through Windows Speech API, with selectable male/female personas.
   - The app speaks explanations, input prompts, compilation status, and runtime results.
   - This is a local offline capability and should be shown as a separate presentation/output channel fed by the same app state.

9. **Temporary file and process boundary**
   - A key architectural boundary is the temp workspace used for generated source and compiled executables.
   - The app spawns external processes for GCC compilation and program execution, which is why antivirus warnings are mentioned.
   - In a diagram, this boundary should be drawn between the IDE process and child processes/files in the OS temp directory.

10. **External dependencies and operational constraints**
   - External: NVIDIA AI API for generation, Windows Speech API for narration, bundled GCC for compilation.
   - Local-only: code editing, compilation, execution, and voice playback after code is generated.
   - Internet is required only for AI generation; the rest of the workflow can continue offline once code exists.

11. **What is not present in the repo**
   - There is no visible source tree, backend service, database, or web frontend.
   - That suggests a self-contained desktop application with packaging artifacts rather than a layered server architecture.
   - For diagramming, keep the scope to one desktop client plus its external AI and OS/runtime dependencies.

Main entry points: [`AI-C-C++IDE_Main.ps1`](https://github.com/ponsivs/windows-ai-c-cpp-ide-pro/blob/main/AI-C-C++IDE_Main.ps1) (Launcher), [`AI-C-C++IDE.exe`](https://github.com/ponsivs/windows-ai-c-cpp-ide-pro/blob/main/AI-C-C++IDE.exe) (IDE EXE), [`README.md`](https://github.com/ponsivs/windows-ai-c-cpp-ide-pro/blob/main/README.md) (README)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_repo_artifacts["Repo artifacts"]
  node_readme["README<br/>docs<br/>[README.md]"]
  node_launcher_ps1["Launcher<br/>powershell entrypoint"]
  node_packaged_exe["IDE EXE<br/>packaged desktop app<br/>[AI-C-C++IDE.exe]"]
end

subgraph group_desktop_runtime["Desktop runtime"]
  node_desktop_ide["IDE shell<br/>windows desktop ui"]
  node_problem_panel["Problem input<br/>input panel"]
  node_source_panel["Source view<br/>code panel"]
  node_explain_panel["Explain view<br/>learning panel"]
  node_console_panel["Console output<br/>runtime output"]
  node_voice_layer(("Voice output<br/>speech feedback"))
  node_ai_pipeline{{"AI pipeline<br/>code generation flow"}}
  node_analysis_layer{{"Analysis layer<br/>postprocess transform"}}
  node_build_run{{"Build and run<br/>local compile-exec"}}
end

subgraph group_local_boundary["Local boundary"]
  node_temp_workspace[("Temp workspace<br/>filesystem boundary")]
end

subgraph group_external_services["External services"]
  node_gcc_toolchain["Bundled GCC<br/>compiler toolchain"]
  node_nvidia_ai(("NVIDIA AI<br/>llm api"))
  node_wsa(("Speech API"))
  node_user(("User"))
end

node_readme -->|"documents"| node_launcher_ps1
node_launcher_ps1 -->|"starts"| node_packaged_exe
node_packaged_exe -->|"hosts"| node_desktop_ide
node_user -->|"uses"| node_desktop_ide
node_desktop_ide -->|"collects"| node_problem_panel
node_desktop_ide -->|"renders"| node_source_panel
node_desktop_ide -->|"renders"| node_explain_panel
node_desktop_ide -->|"renders"| node_console_panel
node_desktop_ide -->|"speaks via"| node_voice_layer
node_desktop_ide -->|"coordinates"| node_ai_pipeline
node_ai_pipeline -->|"calls"| node_nvidia_ai
node_ai_pipeline -->|"feeds"| node_analysis_layer
node_analysis_layer -->|"populates"| node_explain_panel
node_analysis_layer -->|"narrates"| node_voice_layer
node_desktop_ide -->|"invokes"| node_build_run
node_build_run -->|"writes"| node_temp_workspace
node_build_run -->|"compiles with"| node_gcc_toolchain
node_build_run -->|"streams"| node_console_panel
node_build_run -->|"announces"| node_wsa
node_desktop_ide -->|"prompts"| node_user
node_build_run -->|"asks input"| node_user

click node_readme "https://github.com/ponsivs/windows-ai-c-cpp-ide-pro/blob/main/README.md"
click node_launcher_ps1 "https://github.com/ponsivs/windows-ai-c-cpp-ide-pro/blob/main/AI-C-C++IDE_Main.ps1"
click node_packaged_exe "https://github.com/ponsivs/windows-ai-c-cpp-ide-pro/blob/main/AI-C-C++IDE.exe"

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_readme,node_launcher_ps1,node_packaged_exe toneBlue
class node_desktop_ide,node_problem_panel,node_source_panel,node_explain_panel,node_console_panel,node_voice_layer,node_ai_pipeline,node_analysis_layer,node_build_run toneAmber
class node_temp_workspace toneMint
class node_gcc_toolchain,node_nvidia_ai,node_wsa,node_user toneRose
```

## Components

### Repo artifacts

Packaged Windows app and documentation in the repository

- [README](https://github.com/ponsivs/windows-ai-c-cpp-ide-pro/blob/main/README.md): docs · Product overview and usage notes · `README.md`
- [Launcher](https://github.com/ponsivs/windows-ai-c-cpp-ide-pro/blob/main/AI-C-C++IDE_Main.ps1): powershell entrypoint · Main orchestration script for starting and coordinating the app · `AI-C-C++IDE_Main.ps1`
- [IDE EXE](https://github.com/ponsivs/windows-ai-c-cpp-ide-pro/blob/main/AI-C-C++IDE.exe): packaged desktop app · Compiled distributable of the Windows IDE · `AI-C-C++IDE.exe`

### Desktop runtime

Single-user IDE process and its local subsystems

- **IDE shell**: windows desktop ui · Main end-user IDE surface with split panels and status views
- **Problem input**: input panel · Collects user prompts and problem statements
- **Source view**: code panel · Displays generated C or C++ source code
- **Explain view**: learning panel · Shows algorithm, explanation, and input requirements
- **Console output**: runtime output · Shows build and program execution output
- **Voice output**: speech feedback · Speaks prompts, explanations, status, and results
- **AI pipeline**: code generation flow · Detects language, sends prompts, and receives full programs
- **Analysis layer**: postprocess transform · Derives algorithm and educational text from generated code
- **Build and run**: local compile-exec · Writes temp files, compiles with bundled GCC, and launches the program

### Local boundary

Temporary workspace and child processes spawned by the IDE

- **Temp workspace**: filesystem boundary · Isolated %TEMP% directory for generated sources and executables

### External services

Cloud and OS-level dependencies used by the app

- **Bundled GCC**: compiler toolchain · Local compiler used to build generated C/C++ programs
- **NVIDIA AI**: llm api · External Llama-3-70B generation service
- **Speech API**: windows speech api · Offline speech synthesis used for narration
- **User**: end user · Inputs problems, reviews code, and runs generated programs

## Connections

- README → Launcher: documents · Explains how to start and use the packaged IDE
- Launcher → IDE EXE: starts · Launcher script can invoke the packaged desktop application
- IDE EXE → IDE shell: hosts · Single desktop process provides the main IDE shell
- User → IDE shell: uses · User interacts with the IDE surface
- IDE shell → Problem input: collects · Accepts problem statements and prompts
- IDE shell → Source view: renders · Shows generated source code
- IDE shell → Explain view: renders · Shows explanation and algorithm views
- IDE shell → Console output: renders · Displays build and execution output
- IDE shell → Voice output: speaks via · Same app state can be narrated through speech output
- IDE shell → AI pipeline: coordinates · Routes user prompts into the generation flow
- AI pipeline → NVIDIA AI: calls · Sends natural-language prompts to the external AI service
- AI pipeline → Analysis layer: feeds · Generated code becomes the basis for explanations and learning views
- Analysis layer → Explain view: populates · Transforms code into human-readable educational content
- Analysis layer → Voice output: narrates · Explanation text can be spoken aloud
- IDE shell → Build and run: invokes · Starts the local compile-and-run pipeline
- Build and run → Temp workspace: writes · Stores generated source and build artifacts in temp files
- Build and run → Bundled GCC: compiles with · Uses the bundled compiler toolchain
- Build and run → Console output: streams · Captures compile and runtime output into the UI
- Build and run → Speech API: announces · Build and runtime status can be spoken through Windows speech
- IDE shell → User: prompts · Requests runtime input and shows results back to the user
- Build and run → User: asks input · Auto-detects and forwards runtime input to the child program
