Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .entire/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tmp/
settings.local.json
metadata/
logs/
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24.0"
go-version: "1.25.0"
check-latest: true

- name: Setup Bun
Expand Down
64 changes: 64 additions & 0 deletions KNOWN_ISSUES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Known Issues

## macOS: Tray "Show DevToolbox" doesn't restore hidden window

**GitHub Issue:** [#51](https://github.com/vuon9/devtoolbox/issues/51)
**Status:** Open
**Platform:** macOS only
**Severity:** Medium
**Component:** System Tray / Window Management

### Description
When the window is hidden to the system tray (via close button with "Close minimizes to tray" setting enabled), clicking "Show DevToolbox" from the tray menu does not restore the window.

### Steps to Reproduce
1. Enable "Close button minimizes to tray" in Settings
2. Click the window's close button (X)
3. Window hides to tray (app continues running)
4. Click the tray icon and select "Show DevToolbox"
5. Window does not appear (logs show `Window visible: false`)

### Expected Behavior
Window should be restored and shown when clicking "Show DevToolbox" from the tray menu.

### Actual Behavior
Window remains hidden. Logs show:
```
Tray menu 'Show DevToolbox' clicked
Window visible: false, minimized: false
Activating application
Window is not visible, showing it
Focusing window
After show - Window visible: false, minimized: false
```

### Technical Details
The current implementation attempts:
1. `app.Show()` - calls `[NSApp unhide:nil]` to activate the app
2. `mainWindow.Show()` - show the window
3. `mainWindow.Focus()` - focus the window

However, on macOS, when a window is hidden via `Hide()` (which calls `[window orderOut:nil]`), the standard `Show()` and `Focus()` methods are insufficient to restore it.

### Potential Solutions

1. **Use `AttachedWindow` pattern** (recommended by Wails docs):
- Attach the window to the system tray
- Let Wails handle the show/hide toggle automatically
- This is the built-in mechanism for tray-attached windows

2. **Platform-specific handling**:
- On macOS, may need to use `makeKeyAndOrderFront` directly
- Or use different window state management

3. **Window state tracking**:
- Instead of `Hide()`, minimize the window
- `Minimise()` + `Restore()` works correctly on macOS

### References
- Wails v3 System Tray docs: https://v3alpha.wails.io/features/menus/systray/
- Wails v3 Window docs: https://v3alpha.wails.io/reference/window/
- Related code: `main.go` tray menu click handler

### Workaround
Users can use the global hotkey `Cmd+Ctrl+M` to open the command palette, which will also show the window.
143 changes: 18 additions & 125 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,149 +1,42 @@
# DevToolbox

[![Tests & Build](https://github.com/vuon9/devtoolbox/actions/workflows/ci.yml/badge.svg)](https://github.com/vuon9/devtoolbox/actions/workflows/ci.yml)
[![Wails Build](https://github.com/vuon9/devtoolbox/actions/workflows/release.yml/badge.svg)](https://github.com/vuon9/devtoolbox/actions/workflows/release.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Go Version](https://img.shields.io/badge/Go-1.25+-00ADD8?style=flat&logo=go&logoColor=white)](https://go.dev)
> [Download for macOS](https://github.com/vuon9/devtoolbox/releases) · [Windows](https://github.com/vuon9/devtoolbox/releases) · [Linux](https://github.com/vuon9/devtoolbox/releases)

Essential software development tools for everyday tasks.
A single app for 45+ common development tasks. Works offline, zero setup.

<img width="1552" height="922" alt="image" src="https://github.com/user-attachments/assets/7dc24777-7330-485a-b6b4-b522739536c0" />
Base64, JWT, JSON formatting, hashing, encoding, escaping, color conversion, regex testing, cron parsing, diff checking, Unix time conversion, barcode generation, mock data, and 30+ more.

<img width="1552" height="922" alt="DevToolbox interface" src="https://github.com/user-attachments/assets/7dc24777-7330-485a-b6b4-b522739536c0" />

## Features
No browser tabs. No data sent to servers. Just open and use.

### **Browser Support**
## Desktop or Browser

DevToolbox now works in both desktop and browser modes:

- **Desktop**: Native Wails application with native performance (default)
- **Browser**: Access via `http://localhost:8081` when the desktop app is running

The frontend automatically detects the environment and uses the appropriate API (Wails runtime for desktop, HTTP for browser). See [docs/BROWSER_MODE.md](docs/BROWSER_MODE.md) for details.

### **Text Based Converter** (Unified Tool)
The central hub with 45+ algorithms across 5 categories:

| Category | Algorithms |
|----------|------------|
| **🔐 Encrypt / Decrypt** | AES, AES-GCM, DES, Triple DES, ChaCha20, Salsa20, XOR, RC4 |
| **🔀 Encode / Decode** | Base64, Base64URL, Base32, Base58, Base16 (Hex), URL, HTML Entities, Binary, Morse Code, ROT13, ROT47, Quoted-Printable |
| **✂️ Escape / Unescape** | String Literal, Unicode/Hex, HTML/XML, URL, Regex |
| **🔄 Convert** | JSON ↔ YAML, JSON ↔ XML, JSON ↔ CSV, YAML ↔ TOML, CSV ↔ TSV, Properties ↔ JSON, INI ↔ JSON, Key-Value ↔ Query String, Number Bases, Case Swapping, Color Codes |
| **#️⃣ Hash** | MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-3, BLAKE2b, BLAKE3, RIPEMD-160, bcrypt, scrypt, Argon2, HMAC, CRC32, Adler-32, MurmurHash3, xxHash, FNV-1a |

**Special Features:**
- **"All Hashes" view** - Compute all 19 hash algorithms at once with copy buttons for each
- **Quick Action Tags** - Save frequently used conversions for instant access
- **Base64 Image Preview** - Automatically displays base64 images in output pane
- **Smart key/IV detection** - Automatically shows configuration pane when needed
- **Auto-run mode** - Results update instantly as you type
- **Horizontal/Vertical layout toggle** - Customize the workspace layout

### **Other Tools**

| Tool | Description |
|------|-------------|
| **JWT Debugger** | Decode and verify JWT tokens with header/payload inspection |
| **Barcode / QR Code Generator** | Create QR codes and 1D barcodes (EAN-13, EAN-8, Code 128, Code 39) with preview and download |
| **Data Generator** | Generate mock data with templates using Faker library (UUID, ULID, Random String, Lorem Ipsum, User Profiles, API responses, SQL inserts, and more) |
| **Code Formatter** | Format and minify JSON, XML, HTML, SQL, CSS, and JavaScript with advanced filtering support (jq for JSON, XPath for XML, CSS selectors for HTML) |
| **Color Converter** | Pick colors with eyedropper and generate code snippets for 11+ programming languages (CSS, Swift, .NET, Java, Android, Obj-C, Flutter, Unity, React Native, OpenGL, SVG) |
| **RegExp Tester** | Test regular expressions with real-time matching |
| **Unix Time Converter** | Convert between Unix timestamps and human-readable dates |
| **String Utilities** | Sort/Dedupe lines, Case conversion (camelCase, snake_case, etc.), String Inspector |
| **Cron Job Parser** | Parse and explain cron expressions |
| **Text Diff Checker** | Compare two text blocks and highlight differences |
| **Number Converter** | Convert between Decimal, Hex, Octal, and Binary |
- **Desktop:** Native app (default). Fast, works offline.
- **Browser:** Access at `http://localhost:8081` when desktop app is running.

## Installation

### Download Pre-built Binaries
Download the latest release for your platform from the [Releases](https://github.com/vuon9/devtoolbox/releases) page.

**Supported Platforms:**
- Windows (x64)
- macOS (Intel & Apple Silicon)
- Linux (x64)

### Build from Source

**Prerequisites:**
- Bun (>= 1.0) - Required for frontend dependencies
- Go (>= 1.22)
- Wails CLI: `go install github.com/wailsapp/wails/v2/cmd/wails@latest`
### macOS

**Build Steps:**
```bash
# Clone the repository
git clone https://github.com/your-org/devtoolbox.git
cd devtoolbox

# Install dependencies and build
wails build

# Or run in development mode
wails dev
# Download from releases, then:
xattr -cr /Applications/devtoolbox.app # First run only
```

## Installation

Download the latest release for your platform from the [Releases](https://github.com/vuon9/devtoolbox/releases) page.

### macOS

⚠️ **Note:** The macOS build is not signed with an Apple Developer certificate (requires $99/year). You may see a security warning when opening the app.

**To bypass the security warning:**

1. Download the `devtoolbox-macos.dmg` file
2. Open the DMG and drag the app to your Applications folder
3. **First time only:** Open Terminal and run:
```bash
xattr -cr /Applications/devtoolbox.app
```
Or alternatively:
- Go to **System Settings** → **Privacy & Security**
- Scroll down to the "Security" section
- Click **"Open Anyway"** next to the message about "devtoolbox"
- Click **"Open"** in the dialog that appears

4. The app will now open normally

### Windows

1. Download `devtoolbox-windows.exe`
2. Run the executable
3. If Windows Defender shows a warning, click **"More info"** → **"Run anyway"**
Download `devtoolbox-windows.exe` from releases and run.

### Linux

1. Download `devtoolbox-linux.tar.gz`
2. Extract: `tar -xzf devtoolbox-linux.tar.gz`
3. Run: `./devtoolbox`

## Key Features

✅ **Works Offline** - All tools run locally, no internet connection required
✅ **Dark/Light Themes** - Switch between themes or use system preference
✅ **Pin Tools** - Pin frequently used tools to the top of the sidebar
✅ **Keyboard Shortcuts** - `Cmd/Ctrl + B` to toggle sidebar
✅ **Copy to Clipboard** - One-click copy buttons on all output fields
✅ **Auto-run** - See results instantly as you type (can be disabled)
✅ **Responsive Layout** - Horizontal or vertical split panes

## UI Design
```bash
tar -xzf devtoolbox-linux.tar.gz
./devtoolbox
```

Built with **Carbon Design System** for a consistent, professional look:
- Clean, modern interface
- Accessible components
- Consistent spacing and typography
- Monospace fonts for code/data
Build from source: [docs/BUILD.md](docs/BUILD.md)

## License

MIT License - free to use, modify, and distribute.

---

*Built with ❤️ using Go, React, and Wails.*
MIT
53 changes: 53 additions & 0 deletions docs/BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Build from Source

## Prerequisites

- Go 1.25+
- Bun 1.0+
- Wails CLI: `go install github.com/wailsapp/wails/v2/cmd/wails@latest`

## Quick Build

```bash
# Clone
git clone https://github.com/vuon9/devtoolbox.git
cd devtoolbox

# Build
wails build

# Or run in development mode
wails dev
```

## Development

```bash
# Frontend only (hot reload)
cd frontend && bun dev

# Backend only
go run .

# Both (separate terminals)
wails dev # Terminal 1
cd frontend && bun dev # Terminal 2
```

## Output

Built binaries are in `build/bin/`:
- `devtoolbox` (Linux/macOS)
- `devtoolbox.exe` (Windows)

## Troubleshooting

**Frontend build fails:**
```bash
cd frontend && bun install
```

**Wails not found:**
```bash
go install github.com/wailsapp/wails/v2/cmd/wails@latest
```
Loading