Code Summarizer is a desktop application that combines a React frontend, a Rust/Tauri backend, and a locally installed Ollama runtime.
The design goal is simple: keep code analysis local, structured, and easy to review.
- React + TypeScript
- Presents the UI for code input, language selection, model selection, and result rendering
- Validates structured model output with Zod before displaying it
- Rust command handlers exposed through Tauri
- Performs secret scanning and optional redaction
- Builds prompts for each analysis mode
- Sends requests to the local Ollama instance
- Ollama running on the local machine
- Provides installed local models selected by the user
- Receives prompts over localhost only
User snippet
-> secret scan
-> optional redaction
-> prompt construction
-> localhost Ollama request
-> JSON model response
-> schema validation
-> local UI rendering
SummarizeExplain for JuniorRisk ScanValidate
Important note:
Validateis currently LLM-guided validation, not compiler-backed analysis
- Localhost-only model communication
- Optional secret redaction before model use
- No external AI service integration in the application code
- Structured JSON output expectations
- Sensitive Mode to enforce redaction and suppress raw model output
src/App.tsx: Main UI state and interaction flowsrc/lib/languages.ts: Supported language list and analysis modessrc/lib/schemas.ts: Structured output schema validationsrc-tauri/src/main.rs: Tauri command wiringsrc-tauri/src/commands/secrets.rs: Secret scanning and redactionsrc-tauri/src/commands/prompt.rs: Prompt constructionsrc-tauri/src/commands/ollama.rs: Ollama API integration