|
| 1 | +# DiskOH - Modern Disk Space Analyzer |
| 2 | + |
| 3 | +[](https://github.com/BeardedTech0o/DISK-OH/actions) |
| 4 | + |
| 5 | +A modern, beautiful disk space analyzer for Windows built with Electron, React, and TypeScript. |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- **Interactive Treemap Visualization** - See your disk usage at a glance with drill-down exploration |
| 10 | +- **Dark Mode Support** - System theme detection and manual toggle |
| 11 | +- **Multi-Drive Analysis** - Compare usage across multiple drives |
| 12 | +- **File Deletion** - Safely delete folders with confirmation dialogs |
| 13 | +- **Auto-Updates** - Automatic dependency and app updates with safety checks |
| 14 | +- **Windows Native** - NSIS installer, UAC elevation, full drive access |
| 15 | + |
| 16 | +## Installation |
| 17 | + |
| 18 | +Download the latest `DiskOH-Setup.exe` from [Releases](https://github.com/BeardedTech0o/DISK-OH/releases) and run it. |
| 19 | + |
| 20 | +## Development |
| 21 | + |
| 22 | +### Prerequisites |
| 23 | +- Node.js 18+ |
| 24 | +- npm or yarn |
| 25 | + |
| 26 | +### Setup |
| 27 | +```bash |
| 28 | +npm install |
| 29 | +``` |
| 30 | + |
| 31 | +### Commands |
| 32 | +```bash |
| 33 | +# Start development server with hot reload |
| 34 | +npm run dev |
| 35 | + |
| 36 | +# Build React bundle |
| 37 | +npm run build |
| 38 | + |
| 39 | +# Run Electron app with built bundle |
| 40 | +npm run electron-dev |
| 41 | + |
| 42 | +# Run smoke tests |
| 43 | +npm test |
| 44 | + |
| 45 | +# Build Windows installer (.exe) |
| 46 | +npm run dist |
| 47 | +``` |
| 48 | + |
| 49 | +## Architecture |
| 50 | + |
| 51 | +- **Main Process** (Node.js) - Handles file system access, disk scanning, updates |
| 52 | +- **Renderer Process** (React) - UI with treemap visualization and settings |
| 53 | +- **IPC Communication** - Safe bridge between main and renderer processes |
| 54 | + |
| 55 | +## Project Structure |
| 56 | + |
| 57 | +``` |
| 58 | +src/ |
| 59 | +├── main/ # Electron main process |
| 60 | +│ ├── main.ts # App entry point |
| 61 | +│ ├── preload.ts # IPC bridge |
| 62 | +│ ├── scanner.ts # Disk scanning logic |
| 63 | +│ ├── drive-utils.ts # Windows drive enumeration |
| 64 | +│ ├── file-ops.ts # File deletion |
| 65 | +│ ├── updater.ts # Auto-updates |
| 66 | +│ └── smoke-tests.ts # Post-update validation |
| 67 | +├── renderer/ # React UI |
| 68 | +│ ├── App.tsx |
| 69 | +│ ├── components/ # UI components |
| 70 | +│ └── main.tsx # React entry |
| 71 | +└── shared/ # Shared types & constants |
| 72 | +``` |
| 73 | + |
| 74 | +## Update Strategy |
| 75 | + |
| 76 | +**npm Dependencies**: Uses caret ranges (^) allowing minor/patch updates only. Major versions are pinned and require manual updates. |
| 77 | + |
| 78 | +**App Updates**: electron-updater checks GitHub releases on startup. Updates are silent and installed on next launch. |
| 79 | + |
| 80 | +**Safety**: Smoke tests run after updates validate core functionality. |
| 81 | + |
| 82 | +## CI/CD |
| 83 | + |
| 84 | +- **test.yml** - Runs on every push: type checking, tests, build |
| 85 | +- **release.yml** - Runs on version tags: builds installer and creates GitHub release |
| 86 | + |
| 87 | +## License |
| 88 | + |
| 89 | +MIT |
0 commit comments