Home

CTrace GUI

A modern Electron-based GUI application for running CTrace analysis on C/C++ code.

Overview

CTrace GUI provides an intuitive interface for analyzing C/C++ source code using the CTrace analysis tool. The application features a VS Code-like interface with file management, syntax highlighting, and integrated analysis results.

Features

  • File Management: Open individual files or entire workspaces
  • File Tree Explorer: Navigate project structure with refresh and auto-watch capabilities
  • Code Editor: Syntax-highlighted editor with line numbers and search functionality
  • Tab Management: Multi-file editing with tab interface
  • CTrace Integration: Run static analysis directly from the GUI
  • Search: Global search across workspace files
  • Notifications: User-friendly notification system

Architecture

The application follows a modular architecture with separate managers for different concerns:

  • UIController: Main coordinator for all UI components
  • FileOperationsManager: Handles file I/O operations
  • TabManager: Manages editor tabs and file switching
  • EditorManager: Controls the code editor functionality
  • SearchManager: Handles search operations
  • NotificationManager: Manages user notifications

Getting Started

Prerequisites

  • Node.js (v18+)
  • npm
  • Electron
  • CTrace binary

Installation

npm install

Running the Application

npm start

Building the Application

npm run dist

Generating Documentation

npm run docs

Documentation

Complete API documentation is available in the docs/ directory after running npm run docs.

License

// To determine

src/main.js

Main entry point for the CTrace GUI Electron application.

This file initializes the Electron app, creates the main window, and sets up all IPC handlers for communication between the main and renderer processes.

Version:
  • 1.0.0
Author:
  • CTrace GUI Team
Source:

src/main/external_llm/AnthropicProvider.js

src/main/external_llm/BaseProvider.js

Base class for LLM providers

This defines the interface that all LLM providers must implement, ensuring consistent behavior across different services.

Version:
  • 1.0.0
Author:
  • CTrace GUI Team
Source:

src/main/external_llm/DeepseekProvider.js

src/main/external_llm/GenericOpenAIProvider.js

Generic OpenAI-Compatible Provider

A flexible provider for any LLM service that implements the OpenAI chat completions API. This includes services like:

  • Together AI
  • Groq
  • Perplexity
  • Local deployments (LM Studio, Ollama with OpenAI compatibility)
  • Azure OpenAI
  • And many others
Version:
  • 1.0.0
Author:
  • CTrace GUI Team
Source:

src/main/external_llm/GroqProvider.js

Groq API Provider (Example)

This is an example provider showing how easy it is to add support for new LLM services. Groq offers extremely fast inference.

Version:
  • 1.0.0
Author:
  • CTrace GUI Team
Source:

src/main/external_llm/OpenAIProvider.js

src/main/external_llm/PerplexityProvider.js

Perplexity API Provider (Example)

Perplexity offers LLMs with real-time internet search capabilities, perfect for getting up-to-date information and current best practices.

Version:
  • 1.0.0
Author:
  • CTrace GUI Team
Source:

src/main/external_llm/ProviderRegistry.js

Provider Registry

Central registry for all available LLM providers. Handles provider registration, instantiation, and discovery.

Version:
  • 1.0.0
Author:
  • CTrace GUI Team
Source:

src/main/ipc/assistantHandlers.js

IPC handlers for AI assistant (Ollama, External API, Local GGUF)

This module provides IPC handlers for chatting with various LLM providers. Now uses a modular provider system for easy extensibility.

Version:
  • 1.0.0
Author:
  • CTrace GUI Team
Source:

src/main/ipc/fileHandlers.js

IPC handlers for file operations in the main process.

This module provides all IPC handlers for file system operations including opening files/folders, saving files, reading file content, and managing file system watching for automatic UI updates.

Version:
  • 1.0.0
Author:
  • CTrace GUI Team
Source: