Sniffly Project Summary
Status: Planning Complete ✅ Date: 2025-11-04 Next Step: Begin Phase 1 Development
What We're Building
Sniffly is a pure Fortran GUI application that visualizes disk space usage with interactive treemap diagrams. It's a near 1:1 clone of SpaceSniffer (a popular Windows tool) but for Unix systems (macOS and Linux).
The Big Idea
Prove that Fortran isn't just for scientific computing—it can build beautiful, modern GUI applications that rival commercial software written in C++/C#.
Technology Stack (Final Decision)
| Component | Technology | Why |
|---|---|---|
| Language | Fortran 2008+ | Pure Fortran philosophy, performance |
| GUI Framework | GTK4 | Modern, cross-platform, has Fortran bindings |
| Bindings | gtk-fortran 3.24.41+ | Only mature Fortran GUI library |
| Graphics | Cairo 1.18+ | Hardware-accelerated 2D drawing |
| Text | Pango | Font rendering, ellipsization |
| Build System | Meson (primary) | GTK standard, handles dependencies |
| Platforms | macOS, Linux | Priority targets (no Windows) |
Core Features
Must-Have (v1.0)
-
Real-time Treemap Visualization
- Animated growth during scanning
- Nested rectangles proportional to file sizes
- Smooth layout transitions
-
Two Layout Algorithms
- Squarified treemap (already implemented in sniffert)
- Cushioned treemap (3D shading effect like SpaceSniffer)
-
Interactive Navigation
- Click to zoom into directories
- Breadcrumb navigation bar
- Context menus (right-click)
- Keyboard shortcuts (same as sniffert: q, c, d, arrows)
-
Search and Filter
- Search by filename (regex support)
- Filter by file type, size, date
- Highlight matching files
-
Safe File Deletion
- Delete with confirmation dialog
- Show full path and size
- Large deletions require typing name
-
Visual Customization
- Multiple color schemes (Light, Dark, High Contrast)
- Color by file type, age, or custom
- Configurable fonts and sizes
-
High Performance
- Handle 1M+ files
- 60fps rendering
- Background scanning without blocking UI
Nice-to-Have (Post-v1.0)
- Export treemap as PNG/SVG
- Compare two directory snapshots
- Bookmarks for frequent directories
- Hidden files toggle
- Multiple tabs
Architecture Overview
┌─────────────────────────────────────────┐
│ GTK4 Main Window │
│ ┌───────────────────────────────────┐ │
│ │ Toolbar: Scan | Layout | Search │ │
│ ├───────────────────────────────────┤ │
│ │ │ │
│ │ Treemap Widget (Custom) │ │
│ │ ┌───────────────────────────┐ │ │
│ │ │ Cairo Drawing Surface │ │ │
│ │ │ (Rectangles, gradients) │ │ │
│ │ └───────────────────────────┘ │ │
│ │ │ │
│ ├───────────────────────────────────┤ │
│ │ Status: Scanning /foo/bar │ │
│ └───────────────────────────────────┘ │
└─────────────────────────────────────────┘
│
↓
┌─────────────────────────────────────────┐
│ Application State Manager │
│ • Directory tree (file_node) │
│ • Layout cache │
│ • Selection state │
│ • Scan progress │
└─────────────────────────────────────────┘
│
┌──────┴───────┐
↓ ↓
┌────────┐ ┌────────┐
│Scanner │ │Renderer│
│(thread)│ │(Cairo) │
└────────┘ └────────┘
Module Organization
src/
├── core/ # Reused from sniffert
│ ├── types.f90
│ ├── file_system.f90
│ ├── disk_scanner.f90
│ └── utils.f90
│
├── layout/ # Treemap algorithms
│ ├── squarified.f90 (port from sniffert)
│ ├── cushioned.f90 (new implementation)
│ └── layout_manager.f90
│
├── gui/ # GTK4 interface
│ ├── gtk_app.f90
│ ├── main_window.f90
│ ├── treemap_widget.f90
│ └── dialogs.f90
│
├── rendering/ # Cairo drawing
│ ├── cairo_renderer.f90
│ ├── colors.f90
│ └── effects.f90
│
└── state/ # App state
├── app_state.f90
├── selection.f90
└── scan_manager.f90
Development Timeline
Total Duration: 12-14 weeks to v1.0
| Phase | Weeks | Goal | Key Deliverables |
|---|---|---|---|
| Phase 1 | 1-2 | Foundation & GTK Setup | Basic GTK window, Cairo drawing |
| Phase 2 | 3-4 | Core Data & Scanning | Background scanning, state management |
| Phase 3 | 5-6 | Layout Algorithms | Squarified + Cushioned layouts |
| Phase 4 | 7-8 | Cairo Rendering | Beautiful rendering, cushion effects |
| Phase 5 | 9-10 | Interactivity | Navigation, context menus, keyboard |
| Phase 6 | 11 | Search & Filter | Search box, filtering UI |
| Phase 7 | 12 | Polish & Config | Settings, animations, accessibility |
| Phase 8 | 13-14 | Testing & Packaging | Packages for macOS/Linux |
Current Status
✅ Planning Complete (Week 0)
- All documentation written
- Architecture designed
- Stack chosen and validated
🚧 Phase 1 Starting (Week 1)
- Install dependencies
- Build hello world GTK app
- Set up project structure
Key Technical Decisions
1. Pure Fortran (No C++/Python hybrid)
Decision: Use ONLY Fortran via gtk-fortran Rationale: Proves the point that Fortran can do GUIs Trade-off: Steeper learning curve, less examples Mitigation: gtk-fortran is mature and well-documented
2. GTK4 (Not Qt, wxWidgets, or custom OpenGL)
Decision: GTK4 via gtk-fortran Rationale:
- Only mature Fortran GUI bindings exist
- Native on Linux, good on macOS (Cocoa backend)
- Cairo integration for custom drawing
Trade-off: Not as native-looking on macOS as Qt Mitigation: GTK4 is much better than GTK3 on macOS
3. Cushioned Treemap (Not Spiral)
Decision: Implement cushioned treemap (like SpaceSniffer) Rationale: Research shows SpaceSniffer uses cushioned, not spiral Implementation: Van Wijk algorithm with Cairo gradients Benefit: More visually appealing than flat squarified
4. Meson Build System (Not Make or pure FPM)
Decision: Meson primary, FPM fallback Rationale:
- Meson is GTK standard
- Handles pkg-config dependencies elegantly
- Cross-platform without pain
Trade-off: Fortran community less familiar with Meson Mitigation: Provide clear build instructions
5. Package Manager Distribution (Not just GitHub releases)
Decision: Target Homebrew, apt, pacman
Rationale: Users expect brew install sniffly, not "build from source"
Implementation: Create packages in Phase 8
Benefit: Wider adoption, professional image
Success Metrics
Technical Success
- ✅ Builds on macOS and Linux without errors
- ✅ Handles 1M+ files in < 10 seconds scan time
- ✅ Renders at 60fps with 1000s of visible nodes
- ✅ Uses < 1GB RAM for 1M files
- ✅ No memory leaks (valgrind clean)
Community Success
- 🎯 1,000 GitHub stars in first 3 months
- 🎯 10,000 downloads in first 6 months
- 🎯 Accepted into Homebrew and major Linux repos
- 🎯 5+ external contributors
- 🎯 Featured on Hacker News or /r/programming
Philosophy Success
- 🎯 Proves Fortran can build modern GUIs
- 🎯 Becomes showcase example for gtk-fortran
- 🎯 Inspires other Fortran GUI projects
- 🎯 Mentioned in "Fortran can do that?!" articles
Risk Assessment
| Risk | Probability | Impact | Mitigation |
|---|---|---|---|
| gtk-fortran bugs/limitations | Medium | High | Join community early, contribute fixes |
| Performance insufficient | Low | High | Profile early, optimize, viewport culling |
| GTK4 not native on macOS | Low | Medium | Accept "good enough", focus on functionality |
| Build complexity scares users | Medium | Medium | Package managers, pre-built binaries |
| Cushion algorithm too complex | Low | Low | Well-documented (Van Wijk paper), examples exist |
| Timeline slips | Medium | Low | Phases are independent, can adjust scope |
Documentation Created
All planning documents are complete and ready:
- README.md - Project overview, status, quick links
- SNIFFLY_MASTER_PLAN.md - Complete 14-week roadmap (comprehensive!)
- TECHNICAL_STACK.md - Deep dive on all technology choices
- QUICKSTART.md - 30-minute setup guide with examples
- GETTING_STARTED.md - Contributor guide, workflow, style
- PROJECT_SUMMARY.md - This document
- LICENSE - MIT License
- meson.build - Build configuration
- .gitignore - Git ignore rules
Total Documentation: ~15,000 words across 9 files
Project Structure Created
sniffly/
├── README.md
├── SNIFFLY_MASTER_PLAN.md
├── TECHNICAL_STACK.md
├── QUICKSTART.md
├── GETTING_STARTED.md
├── PROJECT_SUMMARY.md
├── LICENSE
├── meson.build
├── .gitignore
│
├── app/ # (empty, ready for main.f90)
├── src/
│ ├── core/ # (empty, ready for modules)
│ ├── layout/
│ ├── gui/
│ ├── rendering/
│ └── state/
├── test/ # (empty, ready for tests)
├── docs/ # (empty, ready for docs)
└── examples/ # (empty, ready for examples)
Next Steps (Immediate)
Week 1: Environment Setup
-
Install Dependencies
# macOS brew install gtk4 gfortran meson ninja # Ubuntu sudo apt install libgtk-4-dev gfortran meson ninja-build -
Build gtk-fortran
git clone https://github.com/vmagnin/gtk-fortran.git cd gtk-fortran cmake -B build && cmake --build build sudo cmake --install build -
Test GTK4 Works
- Follow QUICKSTART.md hello world example
- Verify window opens
- Verify Cairo drawing works
-
Create First Modules
- Port
src/types.f90from sniffert - Port
src/file_system.f90from sniffert - Create
app/main.f90with basic GTK app
- Port
Week 2: Basic UI
-
Create gtk_app Module
- Initialize GTK application
- Create main window
- Add menu bar skeleton
-
Create treemap_widget Module
- Custom GtkDrawingArea
- Connect draw signal
- Draw static rectangles (test)
-
Test Build System
- Update meson.build with sources
- Build and run
- Verify end-to-end compilation
Long-term Vision
Version 1.0 (Week 14)
- ✅ Feature parity with terminal sniffert
- ✅ Beautiful GUI with cushion effects
- ✅ Packages for macOS and Linux
- ✅ Documentation complete
Version 1.x (Months 2-6)
- Multiple tabs for different scans
- Export treemap as images
- Compare directory snapshots
- Cloud storage integration (?)
Version 2.0 (6+ months)
- Plugin system for custom layouts
- Network drive scanning
- Advanced filtering (by owner, permissions)
- Duplicate file detection
Relationship to sniffert
Sniffly is the GUI companion to sniffert:
| Feature | sniffert (terminal) | sniffly (GUI) |
|---|---|---|
| Interface | Terminal (ncurses) | Native window (GTK4) |
| Input | Keyboard only | Mouse + keyboard |
| Visual | ASCII art | Beautiful cushion maps |
| Performance | Lightweight | More resource-intensive |
| Use Case | SSH, servers | Desktop workstations |
| Shared Code | Types, scanning, layout algorithms |
Both prove Fortran can do modern UIs!
Why This Will Succeed
-
Solid Foundation
- Proven algorithms from sniffert
- gtk-fortran is mature and maintained
- GTK4 is modern and well-documented
-
Clear Plan
- 8 phases with specific deliverables
- Each phase builds on previous
- Realistic timeline with buffer
-
Technical Excellence
- Performance targets defined
- Testing strategy planned
- Package distribution planned
-
Community Appeal
- "Fortran can do that?!" factor
- Useful tool people actually need
- Open source, easy to contribute
-
Proven Demand
- SpaceSniffer is popular on Windows
- Unix users want equivalent
- No good open-source alternative exists
Quotes to Remember
"Why Fortran?" "Why not? It's fast, proven, and this proves it can do anything."
"Is gtk-fortran mature enough?" "Yes! It's been around since 2011, actively maintained, and production-ready."
"Can Fortran really do GUIs?" "Watch us. We're building a SpaceSniffer clone that will blow your mind."
Final Checklist
Planning Phase Complete:
- ✅ Research SpaceSniffer features
- ✅ Research gtk-fortran capabilities
- ✅ Choose technology stack
- ✅ Design architecture
- ✅ Create module structure
- ✅ Write comprehensive documentation
- ✅ Create project structure
- ✅ Define success metrics
- ✅ Assess risks
- ✅ Create timeline
Status: Ready to Begin Development! 🚀
Contact & Links
- Project Location:
/Users/matthewwolffe/Documents/GithubOrgs/FortranGoingOnForty/sniffly - Related Project:
../sniffert(terminal version) - Main Documentation:
SNIFFLY_MASTER_PLAN.md - Quick Start:
QUICKSTART.md
Sniffly: Proving Fortran Can Build Beautiful GUIs
Created: 2025-11-04 Planning Phase: Complete ✅ Next Phase: Development Begins 🚀
View source
| 1 | # Sniffly Project Summary |
| 2 | |
| 3 | **Status:** Planning Complete ✅ |
| 4 | **Date:** 2025-11-04 |
| 5 | **Next Step:** Begin Phase 1 Development |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## What We're Building |
| 10 | |
| 11 | **Sniffly** is a pure Fortran GUI application that visualizes disk space usage with interactive treemap diagrams. It's a near 1:1 clone of SpaceSniffer (a popular Windows tool) but for Unix systems (macOS and Linux). |
| 12 | |
| 13 | ### The Big Idea |
| 14 | |
| 15 | Prove that Fortran isn't just for scientific computing—it can build beautiful, modern GUI applications that rival commercial software written in C++/C#. |
| 16 | |
| 17 | --- |
| 18 | |
| 19 | ## Technology Stack (Final Decision) |
| 20 | |
| 21 | | Component | Technology | Why | |
| 22 | |-----------|-----------|-----| |
| 23 | | **Language** | Fortran 2008+ | Pure Fortran philosophy, performance | |
| 24 | | **GUI Framework** | GTK4 | Modern, cross-platform, has Fortran bindings | |
| 25 | | **Bindings** | gtk-fortran 3.24.41+ | Only mature Fortran GUI library | |
| 26 | | **Graphics** | Cairo 1.18+ | Hardware-accelerated 2D drawing | |
| 27 | | **Text** | Pango | Font rendering, ellipsization | |
| 28 | | **Build System** | Meson (primary) | GTK standard, handles dependencies | |
| 29 | | **Platforms** | macOS, Linux | Priority targets (no Windows) | |
| 30 | |
| 31 | --- |
| 32 | |
| 33 | ## Core Features |
| 34 | |
| 35 | ### Must-Have (v1.0) |
| 36 | |
| 37 | 1. **Real-time Treemap Visualization** |
| 38 | - Animated growth during scanning |
| 39 | - Nested rectangles proportional to file sizes |
| 40 | - Smooth layout transitions |
| 41 | |
| 42 | 2. **Two Layout Algorithms** |
| 43 | - Squarified treemap (already implemented in sniffert) |
| 44 | - Cushioned treemap (3D shading effect like SpaceSniffer) |
| 45 | |
| 46 | 3. **Interactive Navigation** |
| 47 | - Click to zoom into directories |
| 48 | - Breadcrumb navigation bar |
| 49 | - Context menus (right-click) |
| 50 | - Keyboard shortcuts (same as sniffert: q, c, d, arrows) |
| 51 | |
| 52 | 4. **Search and Filter** |
| 53 | - Search by filename (regex support) |
| 54 | - Filter by file type, size, date |
| 55 | - Highlight matching files |
| 56 | |
| 57 | 5. **Safe File Deletion** |
| 58 | - Delete with confirmation dialog |
| 59 | - Show full path and size |
| 60 | - Large deletions require typing name |
| 61 | |
| 62 | 6. **Visual Customization** |
| 63 | - Multiple color schemes (Light, Dark, High Contrast) |
| 64 | - Color by file type, age, or custom |
| 65 | - Configurable fonts and sizes |
| 66 | |
| 67 | 7. **High Performance** |
| 68 | - Handle 1M+ files |
| 69 | - 60fps rendering |
| 70 | - Background scanning without blocking UI |
| 71 | |
| 72 | ### Nice-to-Have (Post-v1.0) |
| 73 | |
| 74 | - Export treemap as PNG/SVG |
| 75 | - Compare two directory snapshots |
| 76 | - Bookmarks for frequent directories |
| 77 | - Hidden files toggle |
| 78 | - Multiple tabs |
| 79 | |
| 80 | --- |
| 81 | |
| 82 | ## Architecture Overview |
| 83 | |
| 84 | ``` |
| 85 | ┌─────────────────────────────────────────┐ |
| 86 | │ GTK4 Main Window │ |
| 87 | │ ┌───────────────────────────────────┐ │ |
| 88 | │ │ Toolbar: Scan | Layout | Search │ │ |
| 89 | │ ├───────────────────────────────────┤ │ |
| 90 | │ │ │ │ |
| 91 | │ │ Treemap Widget (Custom) │ │ |
| 92 | │ │ ┌───────────────────────────┐ │ │ |
| 93 | │ │ │ Cairo Drawing Surface │ │ │ |
| 94 | │ │ │ (Rectangles, gradients) │ │ │ |
| 95 | │ │ └───────────────────────────┘ │ │ |
| 96 | │ │ │ │ |
| 97 | │ ├───────────────────────────────────┤ │ |
| 98 | │ │ Status: Scanning /foo/bar │ │ |
| 99 | │ └───────────────────────────────────┘ │ |
| 100 | └─────────────────────────────────────────┘ |
| 101 | │ |
| 102 | ↓ |
| 103 | ┌─────────────────────────────────────────┐ |
| 104 | │ Application State Manager │ |
| 105 | │ • Directory tree (file_node) │ |
| 106 | │ • Layout cache │ |
| 107 | │ • Selection state │ |
| 108 | │ • Scan progress │ |
| 109 | └─────────────────────────────────────────┘ |
| 110 | │ |
| 111 | ┌──────┴───────┐ |
| 112 | ↓ ↓ |
| 113 | ┌────────┐ ┌────────┐ |
| 114 | │Scanner │ │Renderer│ |
| 115 | │(thread)│ │(Cairo) │ |
| 116 | └────────┘ └────────┘ |
| 117 | ``` |
| 118 | |
| 119 | ### Module Organization |
| 120 | |
| 121 | ``` |
| 122 | src/ |
| 123 | ├── core/ # Reused from sniffert |
| 124 | │ ├── types.f90 |
| 125 | │ ├── file_system.f90 |
| 126 | │ ├── disk_scanner.f90 |
| 127 | │ └── utils.f90 |
| 128 | │ |
| 129 | ├── layout/ # Treemap algorithms |
| 130 | │ ├── squarified.f90 (port from sniffert) |
| 131 | │ ├── cushioned.f90 (new implementation) |
| 132 | │ └── layout_manager.f90 |
| 133 | │ |
| 134 | ├── gui/ # GTK4 interface |
| 135 | │ ├── gtk_app.f90 |
| 136 | │ ├── main_window.f90 |
| 137 | │ ├── treemap_widget.f90 |
| 138 | │ └── dialogs.f90 |
| 139 | │ |
| 140 | ├── rendering/ # Cairo drawing |
| 141 | │ ├── cairo_renderer.f90 |
| 142 | │ ├── colors.f90 |
| 143 | │ └── effects.f90 |
| 144 | │ |
| 145 | └── state/ # App state |
| 146 | ├── app_state.f90 |
| 147 | ├── selection.f90 |
| 148 | └── scan_manager.f90 |
| 149 | ``` |
| 150 | |
| 151 | --- |
| 152 | |
| 153 | ## Development Timeline |
| 154 | |
| 155 | **Total Duration:** 12-14 weeks to v1.0 |
| 156 | |
| 157 | | Phase | Weeks | Goal | Key Deliverables | |
| 158 | |-------|-------|------|-----------------| |
| 159 | | **Phase 1** | 1-2 | Foundation & GTK Setup | Basic GTK window, Cairo drawing | |
| 160 | | **Phase 2** | 3-4 | Core Data & Scanning | Background scanning, state management | |
| 161 | | **Phase 3** | 5-6 | Layout Algorithms | Squarified + Cushioned layouts | |
| 162 | | **Phase 4** | 7-8 | Cairo Rendering | Beautiful rendering, cushion effects | |
| 163 | | **Phase 5** | 9-10 | Interactivity | Navigation, context menus, keyboard | |
| 164 | | **Phase 6** | 11 | Search & Filter | Search box, filtering UI | |
| 165 | | **Phase 7** | 12 | Polish & Config | Settings, animations, accessibility | |
| 166 | | **Phase 8** | 13-14 | Testing & Packaging | Packages for macOS/Linux | |
| 167 | |
| 168 | ### Current Status |
| 169 | |
| 170 | ✅ **Planning Complete** (Week 0) |
| 171 | - All documentation written |
| 172 | - Architecture designed |
| 173 | - Stack chosen and validated |
| 174 | |
| 175 | 🚧 **Phase 1 Starting** (Week 1) |
| 176 | - Install dependencies |
| 177 | - Build hello world GTK app |
| 178 | - Set up project structure |
| 179 | |
| 180 | --- |
| 181 | |
| 182 | ## Key Technical Decisions |
| 183 | |
| 184 | ### 1. Pure Fortran (No C++/Python hybrid) |
| 185 | |
| 186 | **Decision:** Use ONLY Fortran via gtk-fortran |
| 187 | **Rationale:** Proves the point that Fortran can do GUIs |
| 188 | **Trade-off:** Steeper learning curve, less examples |
| 189 | **Mitigation:** gtk-fortran is mature and well-documented |
| 190 | |
| 191 | ### 2. GTK4 (Not Qt, wxWidgets, or custom OpenGL) |
| 192 | |
| 193 | **Decision:** GTK4 via gtk-fortran |
| 194 | **Rationale:** |
| 195 | - Only mature Fortran GUI bindings exist |
| 196 | - Native on Linux, good on macOS (Cocoa backend) |
| 197 | - Cairo integration for custom drawing |
| 198 | |
| 199 | **Trade-off:** Not as native-looking on macOS as Qt |
| 200 | **Mitigation:** GTK4 is much better than GTK3 on macOS |
| 201 | |
| 202 | ### 3. Cushioned Treemap (Not Spiral) |
| 203 | |
| 204 | **Decision:** Implement cushioned treemap (like SpaceSniffer) |
| 205 | **Rationale:** Research shows SpaceSniffer uses cushioned, not spiral |
| 206 | **Implementation:** Van Wijk algorithm with Cairo gradients |
| 207 | **Benefit:** More visually appealing than flat squarified |
| 208 | |
| 209 | ### 4. Meson Build System (Not Make or pure FPM) |
| 210 | |
| 211 | **Decision:** Meson primary, FPM fallback |
| 212 | **Rationale:** |
| 213 | - Meson is GTK standard |
| 214 | - Handles pkg-config dependencies elegantly |
| 215 | - Cross-platform without pain |
| 216 | |
| 217 | **Trade-off:** Fortran community less familiar with Meson |
| 218 | **Mitigation:** Provide clear build instructions |
| 219 | |
| 220 | ### 5. Package Manager Distribution (Not just GitHub releases) |
| 221 | |
| 222 | **Decision:** Target Homebrew, apt, pacman |
| 223 | **Rationale:** Users expect `brew install sniffly`, not "build from source" |
| 224 | **Implementation:** Create packages in Phase 8 |
| 225 | **Benefit:** Wider adoption, professional image |
| 226 | |
| 227 | --- |
| 228 | |
| 229 | ## Success Metrics |
| 230 | |
| 231 | ### Technical Success |
| 232 | |
| 233 | - ✅ Builds on macOS and Linux without errors |
| 234 | - ✅ Handles 1M+ files in < 10 seconds scan time |
| 235 | - ✅ Renders at 60fps with 1000s of visible nodes |
| 236 | - ✅ Uses < 1GB RAM for 1M files |
| 237 | - ✅ No memory leaks (valgrind clean) |
| 238 | |
| 239 | ### Community Success |
| 240 | |
| 241 | - 🎯 1,000 GitHub stars in first 3 months |
| 242 | - 🎯 10,000 downloads in first 6 months |
| 243 | - 🎯 Accepted into Homebrew and major Linux repos |
| 244 | - 🎯 5+ external contributors |
| 245 | - 🎯 Featured on Hacker News or /r/programming |
| 246 | |
| 247 | ### Philosophy Success |
| 248 | |
| 249 | - 🎯 Proves Fortran can build modern GUIs |
| 250 | - 🎯 Becomes showcase example for gtk-fortran |
| 251 | - 🎯 Inspires other Fortran GUI projects |
| 252 | - 🎯 Mentioned in "Fortran can do that?!" articles |
| 253 | |
| 254 | --- |
| 255 | |
| 256 | ## Risk Assessment |
| 257 | |
| 258 | | Risk | Probability | Impact | Mitigation | |
| 259 | |------|------------|--------|------------| |
| 260 | | gtk-fortran bugs/limitations | Medium | High | Join community early, contribute fixes | |
| 261 | | Performance insufficient | Low | High | Profile early, optimize, viewport culling | |
| 262 | | GTK4 not native on macOS | Low | Medium | Accept "good enough", focus on functionality | |
| 263 | | Build complexity scares users | Medium | Medium | Package managers, pre-built binaries | |
| 264 | | Cushion algorithm too complex | Low | Low | Well-documented (Van Wijk paper), examples exist | |
| 265 | | Timeline slips | Medium | Low | Phases are independent, can adjust scope | |
| 266 | |
| 267 | --- |
| 268 | |
| 269 | ## Documentation Created |
| 270 | |
| 271 | All planning documents are complete and ready: |
| 272 | |
| 273 | 1. **README.md** - Project overview, status, quick links |
| 274 | 2. **SNIFFLY_MASTER_PLAN.md** - Complete 14-week roadmap (comprehensive!) |
| 275 | 3. **TECHNICAL_STACK.md** - Deep dive on all technology choices |
| 276 | 4. **QUICKSTART.md** - 30-minute setup guide with examples |
| 277 | 5. **GETTING_STARTED.md** - Contributor guide, workflow, style |
| 278 | 6. **PROJECT_SUMMARY.md** - This document |
| 279 | 7. **LICENSE** - MIT License |
| 280 | 8. **meson.build** - Build configuration |
| 281 | 9. **.gitignore** - Git ignore rules |
| 282 | |
| 283 | **Total Documentation:** ~15,000 words across 9 files |
| 284 | |
| 285 | --- |
| 286 | |
| 287 | ## Project Structure Created |
| 288 | |
| 289 | ``` |
| 290 | sniffly/ |
| 291 | ├── README.md |
| 292 | ├── SNIFFLY_MASTER_PLAN.md |
| 293 | ├── TECHNICAL_STACK.md |
| 294 | ├── QUICKSTART.md |
| 295 | ├── GETTING_STARTED.md |
| 296 | ├── PROJECT_SUMMARY.md |
| 297 | ├── LICENSE |
| 298 | ├── meson.build |
| 299 | ├── .gitignore |
| 300 | │ |
| 301 | ├── app/ # (empty, ready for main.f90) |
| 302 | ├── src/ |
| 303 | │ ├── core/ # (empty, ready for modules) |
| 304 | │ ├── layout/ |
| 305 | │ ├── gui/ |
| 306 | │ ├── rendering/ |
| 307 | │ └── state/ |
| 308 | ├── test/ # (empty, ready for tests) |
| 309 | ├── docs/ # (empty, ready for docs) |
| 310 | └── examples/ # (empty, ready for examples) |
| 311 | ``` |
| 312 | |
| 313 | --- |
| 314 | |
| 315 | ## Next Steps (Immediate) |
| 316 | |
| 317 | ### Week 1: Environment Setup |
| 318 | |
| 319 | 1. **Install Dependencies** |
| 320 | ```bash |
| 321 | # macOS |
| 322 | brew install gtk4 gfortran meson ninja |
| 323 | |
| 324 | # Ubuntu |
| 325 | sudo apt install libgtk-4-dev gfortran meson ninja-build |
| 326 | ``` |
| 327 | |
| 328 | 2. **Build gtk-fortran** |
| 329 | ```bash |
| 330 | git clone https://github.com/vmagnin/gtk-fortran.git |
| 331 | cd gtk-fortran |
| 332 | cmake -B build && cmake --build build |
| 333 | sudo cmake --install build |
| 334 | ``` |
| 335 | |
| 336 | 3. **Test GTK4 Works** |
| 337 | - Follow QUICKSTART.md hello world example |
| 338 | - Verify window opens |
| 339 | - Verify Cairo drawing works |
| 340 | |
| 341 | 4. **Create First Modules** |
| 342 | - Port `src/types.f90` from sniffert |
| 343 | - Port `src/file_system.f90` from sniffert |
| 344 | - Create `app/main.f90` with basic GTK app |
| 345 | |
| 346 | ### Week 2: Basic UI |
| 347 | |
| 348 | 1. **Create gtk_app Module** |
| 349 | - Initialize GTK application |
| 350 | - Create main window |
| 351 | - Add menu bar skeleton |
| 352 | |
| 353 | 2. **Create treemap_widget Module** |
| 354 | - Custom GtkDrawingArea |
| 355 | - Connect draw signal |
| 356 | - Draw static rectangles (test) |
| 357 | |
| 358 | 3. **Test Build System** |
| 359 | - Update meson.build with sources |
| 360 | - Build and run |
| 361 | - Verify end-to-end compilation |
| 362 | |
| 363 | --- |
| 364 | |
| 365 | ## Long-term Vision |
| 366 | |
| 367 | ### Version 1.0 (Week 14) |
| 368 | |
| 369 | - ✅ Feature parity with terminal sniffert |
| 370 | - ✅ Beautiful GUI with cushion effects |
| 371 | - ✅ Packages for macOS and Linux |
| 372 | - ✅ Documentation complete |
| 373 | |
| 374 | ### Version 1.x (Months 2-6) |
| 375 | |
| 376 | - Multiple tabs for different scans |
| 377 | - Export treemap as images |
| 378 | - Compare directory snapshots |
| 379 | - Cloud storage integration (?) |
| 380 | |
| 381 | ### Version 2.0 (6+ months) |
| 382 | |
| 383 | - Plugin system for custom layouts |
| 384 | - Network drive scanning |
| 385 | - Advanced filtering (by owner, permissions) |
| 386 | - Duplicate file detection |
| 387 | |
| 388 | --- |
| 389 | |
| 390 | ## Relationship to sniffert |
| 391 | |
| 392 | Sniffly is the GUI companion to sniffert: |
| 393 | |
| 394 | | Feature | sniffert (terminal) | sniffly (GUI) | |
| 395 | |---------|-------------------|---------------| |
| 396 | | **Interface** | Terminal (ncurses) | Native window (GTK4) | |
| 397 | | **Input** | Keyboard only | Mouse + keyboard | |
| 398 | | **Visual** | ASCII art | Beautiful cushion maps | |
| 399 | | **Performance** | Lightweight | More resource-intensive | |
| 400 | | **Use Case** | SSH, servers | Desktop workstations | |
| 401 | | **Shared Code** | Types, scanning, layout algorithms | | |
| 402 | |
| 403 | Both prove Fortran can do modern UIs! |
| 404 | |
| 405 | --- |
| 406 | |
| 407 | ## Why This Will Succeed |
| 408 | |
| 409 | 1. **Solid Foundation** |
| 410 | - Proven algorithms from sniffert |
| 411 | - gtk-fortran is mature and maintained |
| 412 | - GTK4 is modern and well-documented |
| 413 | |
| 414 | 2. **Clear Plan** |
| 415 | - 8 phases with specific deliverables |
| 416 | - Each phase builds on previous |
| 417 | - Realistic timeline with buffer |
| 418 | |
| 419 | 3. **Technical Excellence** |
| 420 | - Performance targets defined |
| 421 | - Testing strategy planned |
| 422 | - Package distribution planned |
| 423 | |
| 424 | 4. **Community Appeal** |
| 425 | - "Fortran can do that?!" factor |
| 426 | - Useful tool people actually need |
| 427 | - Open source, easy to contribute |
| 428 | |
| 429 | 5. **Proven Demand** |
| 430 | - SpaceSniffer is popular on Windows |
| 431 | - Unix users want equivalent |
| 432 | - No good open-source alternative exists |
| 433 | |
| 434 | --- |
| 435 | |
| 436 | ## Quotes to Remember |
| 437 | |
| 438 | > "Why Fortran?" |
| 439 | > **"Why not? It's fast, proven, and this proves it can do anything."** |
| 440 | |
| 441 | > "Is gtk-fortran mature enough?" |
| 442 | > **"Yes! It's been around since 2011, actively maintained, and production-ready."** |
| 443 | |
| 444 | > "Can Fortran really do GUIs?" |
| 445 | > **"Watch us. We're building a SpaceSniffer clone that will blow your mind."** |
| 446 | |
| 447 | --- |
| 448 | |
| 449 | ## Final Checklist |
| 450 | |
| 451 | Planning Phase Complete: |
| 452 | |
| 453 | - ✅ Research SpaceSniffer features |
| 454 | - ✅ Research gtk-fortran capabilities |
| 455 | - ✅ Choose technology stack |
| 456 | - ✅ Design architecture |
| 457 | - ✅ Create module structure |
| 458 | - ✅ Write comprehensive documentation |
| 459 | - ✅ Create project structure |
| 460 | - ✅ Define success metrics |
| 461 | - ✅ Assess risks |
| 462 | - ✅ Create timeline |
| 463 | |
| 464 | **Status: Ready to Begin Development! 🚀** |
| 465 | |
| 466 | --- |
| 467 | |
| 468 | ## Contact & Links |
| 469 | |
| 470 | - **Project Location:** `/Users/matthewwolffe/Documents/GithubOrgs/FortranGoingOnForty/sniffly` |
| 471 | - **Related Project:** `../sniffert` (terminal version) |
| 472 | - **Main Documentation:** `SNIFFLY_MASTER_PLAN.md` |
| 473 | - **Quick Start:** `QUICKSTART.md` |
| 474 | |
| 475 | --- |
| 476 | |
| 477 | **Sniffly: Proving Fortran Can Build Beautiful GUIs** |
| 478 | |
| 479 | *Created: 2025-11-04* |
| 480 | *Planning Phase: Complete ✅* |
| 481 | *Next Phase: Development Begins 🚀* |