┌─────────────────────────────────────────────────────────────┐
│ Desktop Window (Tauri) │
│ 1200x800, Centered │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ Web UI (HTML/CSS/JS) │ │
│ │ │ │
│ │ ┌─────────────┬──────────────────────────────────┐ │ │
│ │ │ │ Request Bar │ │ │
│ │ │ Sidebar ├──────────────────────────────────┤ │ │
│ │ │ (History) │ Request Editor (Tabs) │ │ │
│ │ │ ├──────────────────────────────────┤ │ │
│ │ │ │ Response Viewer │ │ │
│ │ └─────────────┴──────────────────────────────────┘ │ │
│ │ │ │
│ │ Mock Responses (JavaScript) │ │
│ │ localStorage for History │ │
│ │ │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
│ Rust Backend (Minimal) │
│ - No commands yet │
│ - Ready for IPC │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Desktop Window (Tauri) │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Web UI (HTML/CSS/JS) │ │
│ │ │ │
│ │ User clicks "Send" ──────────────────┐ │ │
│ │ │ │ │
│ │ JavaScript calls: │ │ │
│ │ invoke('send_request', {...}) │ │ │
│ └────────────────────────────────────────┼──────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Tauri IPC Bridge │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Rust Backend │ │
│ │ │ │
│ │ #[tauri::command] │ │
│ │ async fn send_request(...) │ │
│ │ │ │
│ │ ┌──────────────────────────────────────────────┐ │ │
│ │ │ HTTP Client (reqwest) │ │ │
│ │ │ - Build request │ │ │
│ │ │ - Add headers/auth │ │ │
│ │ │ - Send to API │ │ │
│ │ │ - Measure time │ │ │
│ │ │ - Parse response │ │ │
│ │ └──────────────────────────────────────────────┘ │ │
│ │ │ │
│ │ Returns: ApiResponse { status, body, time, ... } │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Response flows back to UI │ │
│ │ - Display status badge │ │
│ │ - Show formatted JSON │ │
│ │ - Update history │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌──────────────────┐
│ External API │
│ (Real HTTP) │
└──────────────────┘
prism/
│
├── src/ # Frontend (Web UI)
│ ├── index.html # Main HTML structure
│ ├── styles/ # CSS styling
│ │ ├── variables.css # Design tokens
│ │ ├── base.css # Global styles
│ │ ├── layout.css # Layout grid
│ │ ├── theme-dark.css # Dark theme
│ │ └── components/ # Component styles
│ │ ├── sidebar.css
│ │ ├── request-bar.css
│ │ ├── tabs.css
│ │ ├── response.css
│ │ └── buttons.css
│ ├── scripts/ # JavaScript logic
│ │ ├── state.js # State management
│ │ ├── app.js # Bootstrap
│ │ ├── ui/ # UI modules
│ │ │ ├── sidebar.js
│ │ │ ├── requestBar.js
│ │ │ ├── tabs.js
│ │ │ ├── responseView.js
│ │ │ └── authForm.js
│ │ └── mock/ # Mock responses
│ │ └── mockResponse.js # ← Will call Tauri in Phase 2
│ └── assets/ # Static assets
│
├── src-tauri/ # Backend (Rust)
│ ├── src/
│ │ └── main.rs # ← HTTP engine goes here
│ ├── Cargo.toml # Rust dependencies
│ ├── tauri.conf.json # Tauri configuration
│ ├── build.rs # Build script
│ └── icons/ # App icons
│
├── .gitignore # Git ignore patterns
├── package.json # npm scripts
│
└── Documentation/
├── README.md # Main readme
├── QUICKSTART.md # Getting started
├── NEXT_STEPS.md # Implementation guide
├── TAURI_SETUP_COMPLETE.md # Setup verification
├── test-setup.md # Testing checklist
├── IMPLEMENTATION_SUMMARY.md # Summary
└── ARCHITECTURE.md # This file
User Action (Click Send)
│
▼
JavaScript (requestBar.js)
│
▼
handleSendRequest()
│
▼
generateMockResponse() ← Mock data
│
▼
renderResponse()
│
▼
Update UI + History
User Action (Click Send)
│
▼
JavaScript (requestBar.js)
│
▼
handleSendRequest()
│
▼
Check if Tauri available
│
├─ Yes ──▶ invoke('send_request', config)
│ │
│ ▼
│ Rust HTTP Client
│ │
│ ▼
│ External API
│ │
│ ▼
│ Parse Response
│ │
│ ▼
│ Return to JavaScript
│ │
└───────────────────┘
│
▼
renderResponse()
│
▼
Update UI + History
- HTML5: Semantic structure
- CSS3: Custom properties, Grid, Flexbox
- JavaScript: ES6+, Vanilla (no frameworks)
- Storage: localStorage for history
- Rust: Systems programming language
- Tauri: Desktop framework (v2.x)
- Future: reqwest (HTTP client), tokio (async runtime)
- Cargo: Rust package manager
- Tauri CLI: Build and dev tools
- npm: Optional, for convenience scripts
- No network access (mock responses)
- localStorage only
- No sensitive data handling
- Tauri IPC for secure communication
- Rust handles all HTTP requests
- No direct network access from JavaScript
- CSP policies enforced
- Native OS security features
- Cold start: <1 second
- Memory: ~50-100MB
- CPU: Minimal
- UI: 60fps (CSS transitions)
- Mock responses: ~800ms delay
- Real HTTP: Network dependent
- History: Instant (localStorage)
- First build: 5-10 minutes
- Incremental: 5-10 seconds
- Bundle size: ~5-10MB (compressed)
- ✅ Windows (tested)
- ✅ macOS (ready)
- ✅ Linux (ready)
- ⏳ iOS (icons ready, not tested)
- ⏳ Android (icons ready, not tested)
┌─────────────────────────────────────────────────────────┐
│ Developer │
│ │
│ 1. Edit UI files (src/) │
│ - HTML/CSS/JS changes │
│ - Hot reload in browser │
│ │
│ 2. Edit Rust files (src-tauri/src/) │
│ - Add Tauri commands │
│ - Implement HTTP logic │
│ │
│ 3. Run: cargo tauri dev │
│ - Compiles Rust │
│ - Opens desktop window │
│ - Hot reload on changes │
│ │
│ 4. Test in app │
│ - Make requests │
│ - Check responses │
│ - Verify history │
│ │
│ 5. Build: cargo tauri build │
│ - Creates installer │
│ - Platform-specific bundle │
│ - Ready for distribution │
└─────────────────────────────────────────────────────────┘
See NEXT_STEPS.md for detailed implementation guide.
Key changes needed:
- Add
reqwestandtokioto Cargo.toml - Implement
send_requestcommand in main.rs - Update
mockResponse.jsto use Tauri invoke - Test with real APIs
- Handle errors and edge cases
Current Status: Phase 1 Complete ✅ Next Phase: HTTP Engine Implementation