Software Design Document (SDD)
AZ1.AI llm IDE - Browser-Based Development Environmentβ
Version: 0.1.0 Date: 2025-10-06 Author: AZ1.AI Development Team Status: Active Development
Table of Contentsβ
- Introduction
- System Overview
- Architecture Design
- Component Design
- Data Flow
- User Interface Design
- Security Design
- Performance Considerations
- Deployment Architecture
1. Introductionβ
1.1 Purposeβ
This document provides a comprehensive software design specification for the AZ1.AI llm IDE, a browser-based integrated development environment with dual-llm support, Monaco editor, terminal emulation, and file management capabilities.
1.2 Scopeβ
The system enables users to:
- Edit code using Monaco editor (VS Code engine)
- Interact with multiple llm providers (LM Studio, Claude Code)
- Execute terminal commands
- Manage files in browser storage
- Work with 4 distinct llm workflow modes
1.3 Goalsβ
- Privacy: All processing occurs locally (no cloud dependencies)
- Performance: Near-native IDE experience in browser
- Flexibility: Support multiple llm providers and workflow modes
- Usability: Familiar VS Code-like interface
2. System Overviewβ
2.1 High-Level Architectureβ
2.2 System Contextβ
2.3 Key Componentsβ
| Component | Technology | Purpose |
|---|---|---|
| Frontend UI | React 18 + TypeScript | User interface layer |
| editor | Monaco editor | Code editing engine |
| terminal | xterm.js | terminal emulation |
| State Management | Zustand | Application state |
| UI Framework | Chakra UI | Component library |
| llm Client | Custom MCP Client | llm communication |
| File System | OPFS | Browser-based storage |
3. Architecture Designβ
3.1 Component Architectureβ
3.2 Data Flow Architectureβ
4. Component Designβ
4.1 Core Componentsβ
4.1.1 IDE layout Componentβ
interface IDElayoutProps {
header: ReactNode;
fileExplorer: ReactNode;
editor: ReactNode;
terminal: ReactNode;
chatPanel: ReactNode;
footer: ReactNode;
}
Responsibilities:
- Manage layout structure
- Handle panel resizing
- Coordinate component communication
4.1.2 Monaco editor Integrationβ
interface editorPanelProps {
tabs: editorTab[];
activeTabId: string;
onTabChange: (id: string) => void;
onContentChange: (id: string, content: string) => void;
}
interface editorTab {
id: string;
path: string;
name: string;
content: string;
language: string;
isDirty: boolean;
}
Features:
- Multi-tab editing
- Syntax highlighting
- Auto-save indicators
- Language detection
4.1.3 llm Chat Panelβ
interface ChatPanelProps {
messages: Message[];
models: llmModel[];
mode: WorkflowMode;
onSend: (prompt: string) => void;
}
type WorkflowMode = 'single' | 'parallel' | 'sequential' | 'consensus';
Workflow Modes:
- Single Mode: One llm at a time
- Parallel Mode: Side-by-side comparison
- Sequential Mode: Chained responses
- Consensus Mode: Synthesized output
4.2 State Managementβ
5. Data Flowβ
5.1 llm Request Flowβ
5.2 File Operation Flowβ
6. User Interface Designβ
6.1 layout Structureβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β° [LOGO] AZ1.AI π/βοΈ β 40px Header
ββββββββββ¬βββββββββββββββββββββββ¬βββββββββββββββββββββ€
β β β β
β File β Monaco editor β llm Chat Panel β
β Tree β βββββββ¬ββββββ β ββββββββββββββββ β
β β βTab1 βTab2 β β βModel Select β β
β π β βββββββ΄ββββββ β ββββββββββββββββ€ β
β π β β βMessages β β
β π β [Code editor] β β β β
β β β β β β
β β β β[Input] β β
ββββββββββ΄βββββββββββββββββββββββ΄βββββββββββββββββββββ€
β π» terminal (xterm.js) β 150px
β $ _ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Β© 2025 AZ1.AI β’ π§ 1@az1.ai β 24px Footer
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
6.2 Responsive Designβ
- Minimum Width: 1024px
- Recommended: 1920px
- Panels: Resizable with drag handles
- Mobile: Not supported (complex IDE features)
6.3 Theme Supportβ
Dark Theme (Default):
- Background:
#1e1e1e - Sidebar:
#252526 - Border:
#3e3e42 - Text:
#cccccc
Light Theme:
- Background:
#ffffff - Sidebar:
#f5f5f5 - Border:
#e0e0e0 - Text:
#333333
7. Security Designβ
7.1 Security Architectureβ
7.2 Security Measuresβ
| Layer | Measure | Implementation |
|---|---|---|
| Network | HTTPS Only | Vite dev server + prod |
| API | Localhost restriction | LM Studio, Claude Code |
| Storage | Browser sandbox | OPFS isolation |
| Input | Sanitization | DOMPurify for markdown |
| Authentication | API keys | Environment variables |
8. Performance Considerationsβ
8.1 Performance Targetsβ
| Metric | Target | Measurement |
|---|---|---|
| Initial Load | < 2s | Time to interactive |
| editor Open | < 100ms | File to editor |
| llm Response (streaming) | < 50ms TTFB | First token |
| terminal Response | < 10ms | Command to output |
| Panel Resize | 60 FPS | Smooth animation |
8.2 Optimization Strategiesβ
9. Deployment Architectureβ
9.1 Development Environmentβ
9.2 Production Deploymentβ
9.3 Deployment Optionsβ
- Static Hosting: Vercel, Netlify, GitHub Pages
- Self-Hosted: nginx, Apache
- Desktop App: Electron wrapper (future)
Appendix A: Technology Stackβ
Frontendβ
- React 18.2.0
- TypeScript 5.3.3
- Chakra UI 2.8.2
- Monaco editor 0.45.0
- xterm.js 5.3.0
- Zustand 4.4.7
Build Toolsβ
- Vite 5.0.8
- TypeScript Compiler
- ESLint
- Prettier
llm Integrationβ
- LM Studio API (OpenAI-compatible)
- MCP Protocol
- Custom MCP Server
Appendix B: Glossaryβ
- OPFS: Origin Private File System (browser storage API)
- MCP: Model Context Protocol
- llm: Large Language Model
- IDE: Integrated Development Environment
- TTFB: Time To First Byte
Document Version: 1.0 Last Updated: 2025-10-06 Next Review: 2025-11-06