diff --git a/.ferrite/state.json b/.ferrite/state.json new file mode 100644 index 0000000..dc8179c --- /dev/null +++ b/.ferrite/state.json @@ -0,0 +1,11 @@ +{ + "recent_files": [ + "G:\\DEV\\proman2k\\README.md", + "G:\\DEV\\proman2k\\assets\\test.md" + ], + "expanded_paths": [ + "G:\\DEV\\proman2k" + ], + "file_tree_width": 250.0, + "show_file_tree": true +} \ No newline at end of file diff --git a/.ferrite/terminal-layout.json b/.ferrite/terminal-layout.json new file mode 100644 index 0000000..6a22e1b --- /dev/null +++ b/.ferrite/terminal-layout.json @@ -0,0 +1,20 @@ +{ + "name": "Workspace", + "tabs": [ + { + "name": "Tab 1", + "layout": { + "Terminal": 1 + }, + "terminals": { + "1": { + "shell": "Default", + "cwd": "G:\\DEV\\proman2k", + "title": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" + } + } + } + ], + "floating_windows": [], + "active_tab_index": 0 +} \ No newline at end of file diff --git a/README.md b/README.md index 8d6c5c8..b0f8565 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Ironpad +![Ironpad Banner](docs/graphics/ironpad-banner.png) + **A local-first, file-based project & knowledge management system.** ![Build](https://github.com/OlaProeis/ironPad/actions/workflows/release.yml/badge.svg) @@ -65,6 +67,8 @@ Open http://localhost:5173 in your browser. ## Tech Stack +![Tech Stack](docs/graphics/tech-stack.png) + | Component | Technology | |-----------|------------| | Backend | Rust, Axum 0.8, Tokio | @@ -78,6 +82,8 @@ Open http://localhost:5173 in your browser. ## Roadmap +![Roadmap](docs/graphics/roadmap.png) + Ironpad is under active development. Here's what's planned: - [ ] UI polish and animations @@ -94,6 +100,8 @@ See [CHECKLIST.md](docs/ai-workflow/CHECKLIST.md) for detailed implementation st ## Built With AI +![AI Workflow](docs/graphics/ai-workflow.png) + This entire application was built using AI-assisted development -- an approach we call **Open Method**. We share not just the code, but the complete process: the PRD, task breakdowns, handover documents, and workflow artifacts. Read about the method: @@ -113,6 +121,8 @@ Read about the method: ## Documentation +![Architecture](docs/graphics/architecture.png) + | Document | Description | |----------|-------------| | [docs/API.md](docs/API.md) | Complete REST API reference | diff --git a/ROADMAP.md b/ROADMAP.md index 2ec9882..95b2569 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,6 +18,12 @@ - **Monthly** — show on the day-of-month if set, else treat as “floating” - Requires frontend logic to compute occurrences from `recurrence`, `recurrence_interval`, and optionally `due_date` / `created` +#### 3. System tray mode +- **Replace CMD window** with a system tray icon (Windows, macOS, Linux) +- Tray menu: **Open in Browser** | **Quit** +- No console window on Windows in release builds +- Implementation doc: [docs/system-tray-implementation.md](docs/system-tray-implementation.md) + --- ## Suggested features (future releases) @@ -53,4 +59,4 @@ Ideas that fit the current architecture and local-first design: | Version | Status | Notes | |---------|---------|----------------------------------------------------| | 0.1.0 | Current | First public release, core features in place | -| 0.2.0 | Planned | Comments, recurring tasks on calendar | +| 0.2.0 | Planned | Comments, recurring tasks on calendar, system tray | diff --git a/docs/ai-workflow/.ferrite/state.json b/docs/ai-workflow/.ferrite/state.json new file mode 100644 index 0000000..9db6ccc --- /dev/null +++ b/docs/ai-workflow/.ferrite/state.json @@ -0,0 +1,8 @@ +{ + "recent_files": [], + "expanded_paths": [ + "G:\\DEV\\proman2k\\docs\\ai-workflow" + ], + "file_tree_width": 250.0, + "show_file_tree": true +} \ No newline at end of file diff --git a/docs/graphics/ai-workflow.png b/docs/graphics/ai-workflow.png new file mode 100644 index 0000000..4bb266f Binary files /dev/null and b/docs/graphics/ai-workflow.png differ diff --git a/docs/graphics/architecture.png b/docs/graphics/architecture.png new file mode 100644 index 0000000..751e407 Binary files /dev/null and b/docs/graphics/architecture.png differ diff --git a/docs/graphics/context-comparison.png b/docs/graphics/context-comparison.png new file mode 100644 index 0000000..5bb47d6 Binary files /dev/null and b/docs/graphics/context-comparison.png differ diff --git a/docs/graphics/electron-comparison.png b/docs/graphics/electron-comparison.png new file mode 100644 index 0000000..bb47a25 Binary files /dev/null and b/docs/graphics/electron-comparison.png differ diff --git a/docs/graphics/ironpad-banner.png b/docs/graphics/ironpad-banner.png new file mode 100644 index 0000000..858046b Binary files /dev/null and b/docs/graphics/ironpad-banner.png differ diff --git a/docs/graphics/roadmap.png b/docs/graphics/roadmap.png new file mode 100644 index 0000000..abcd3fa Binary files /dev/null and b/docs/graphics/roadmap.png differ diff --git a/docs/graphics/tech-stack.png b/docs/graphics/tech-stack.png new file mode 100644 index 0000000..4ac7339 Binary files /dev/null and b/docs/graphics/tech-stack.png differ diff --git a/docs/system-tray-implementation.md b/docs/system-tray-implementation.md new file mode 100644 index 0000000..0c3d7a4 --- /dev/null +++ b/docs/system-tray-implementation.md @@ -0,0 +1,105 @@ +# System Tray Implementation (v0.2.0) + +**Goal:** Replace the CMD window with a system tray icon. Users interact via tray menu: "Open in Browser" or "Quit". No console window on Windows. + +--- + +## Overview + +- **Scope:** Single codebase, cross-platform. CI/CD unchanged—same build pipeline produces one binary per OS. +- **Complexity:** Low–medium. Uses a cross-platform Rust crate; platform-specific code is minimal. + +--- + +## Implementation Steps + +### 1. Add Tray Crate Dependency + +Add to `backend/Cargo.toml`: + +```toml +# System tray (production mode) +tray-item = "0.10" +``` + +Alternative: `tray-icon` (more features, heavier; requires event loop integration). + +### 2. Windows: Hide Console Window + +Add near the top of `backend/src/main.rs` (after `mod` declarations if any, before `fn main`): + +```rust +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +``` + +- **Debug builds:** Console remains (for logs). +- **Release builds:** No CMD window on Windows. + +### 3. Remove Auto-Open Browser on Startup + +In `main.rs`, remove or conditionally disable the auto-open logic (the `tokio::spawn` block that calls `webbrowser::open()`). The user will open the browser from the tray menu instead. + +### 4. Add Tray Icon and Menu (Production Mode Only) + +When `has_frontend` is true (production mode): + +1. Create tray icon with an appropriate icon (or placeholder). +2. Add menu items: + - **"Open in Browser"** — calls `webbrowser::open()` with `http://localhost:{port}`. + - **"Quit"** — shuts down the server and exits the process. + +### 5. Threading Considerations + +- **macOS:** Some tray crates expect event handling on the main thread. May need to run tray logic on main thread and spawn the Axum server on a background thread, or use crate-specific patterns. +- **Windows/Linux:** Usually more flexible; verify with the chosen crate’s docs. + +### 6. CI/CD Changes (If Needed) + +Current `release.yml` builds for Windows, macOS, and Linux. Likely no changes required. + +If using a crate that needs GTK on Linux (e.g. `tray-icon`), add to the "Install system dependencies (Linux)" step: + +```yaml +sudo apt-get install -y cmake libgtk-3-dev libappindicator3-dev +``` + +Note: Linux users would then need GTK installed at runtime. For `tray-item`, check whether it has different Linux deps. + +--- + +## Behaviour Summary + +| Before (v0.1.0) | After (v0.2.0) | +|------------------------|--------------------------------| +| CMD window visible | No console window (Windows) | +| Browser opens on start | Browser opens via tray menu | +| Quit via Ctrl+C | Quit via tray menu | + +--- + +## Testing Checklist + +- [ ] Windows: No CMD window when running release binary. +- [ ] Windows: Tray icon appears; "Open in Browser" opens correct URL. +- [ ] Windows: "Quit" exits cleanly. +- [ ] macOS: Tray icon in menu bar; menu works. +- [ ] Linux: Tray icon in system tray; menu works. +- [ ] Development mode (`cargo run`): Behaviour unchanged (no tray, API-only). + +--- + +## Icon Asset + +You’ll need a tray icon (e.g. 16×16 or 32×32 PNG). Options: + +- Extract from existing branding/logo. +- Use a simple placeholder (e.g. filled circle) for initial implementation. +- Store in `backend/` or `backend/static/` and load at runtime. + +--- + +## References + +- [tray-item crate](https://crates.io/crates/tray-item) +- [tray-icon crate](https://crates.io/crates/tray-icon) (alternative) +- `#![windows_subsystem = "windows"]` — [Rust embed documentation](https://doc.rust-lang.org/reference/conditional-compilation.html#windows_subsystem)