TristamTech

Disclaimer: This repository documents the architecture and problem-solving approach behind systems independently designed and built by the author. It contains no proprietary source code, API keys, credentials, employer branding, or real user/organizational data. Screenshots are illustrative proof-of-concept only. Systems built using employer infrastructure (Jamf Pro) are documented here as a record of skill and handover-ready design, not a claim of personal ownership over the deployed instance.

🧹 System Optimiser β€” Interactive macOS Maintenance Utility

A native, zero-dependency β€œCleanMyMac” alternative β€” fully interactive, letting users choose exactly which maintenance tasks run before anything executes.

πŸ› οΈ Third-Party Tools βœ… User Consent Required πŸ“Š Result Shown
0 Yes, per-task Actual MB/GB reclaimed

Main Screen

πŸ“– Executive Summary

A checkbox-driven maintenance tool built entirely from native macOS commands. No subscription, no telemetry, no bundled third-party binary. Users tick only the tasks they want, watch live per-task progress, and see a real number for storage reclaimed at the end β€” not a vague β€œoptimized!” message.

πŸ—οΈ Two-Stage UX

Stage 1 β€” Selection: live computer name + free/total disk space, then a checkbox list of maintenance tasks β€” none pre-selected, by design; the tool never assumes consent.

Stage 2 β€” Dynamic execution: built as a bash array so only the tasks the user actually ticked appear in the progress UI:

dialogArgs=("--appearance" "dark" "--title" "Optimisation in Progress" ...)
[ "$runDNS" = true ]   && dialogArgs+=("--listitem" "DNS & Network Reset")
[ "$runRAM" = true ]   && dialogArgs+=("--listitem" "Purge Inactive Memory")
[ "$runTrash" = true ] && dialogArgs+=("--listitem" "Empty System Trash")
"$dialogApp" "${dialogArgs[@]}" &

Progress Screen

πŸ” What It Actually Does (all native)

Task Command
DNS/network reset dscacheutil -flushcache && killall -HUP mDNSResponder
Purge inactive RAM purge
Empty user Trash rm -rf "$userHome/.Trash/"*
Clear app caches rm -rf "$userHome/Library/Caches/"*
Refresh Finder/Dock killall Finder; killall Dock

Dead ends that shaped the final design:

Problem What broke Fix
Capturing checkbox state swiftDialog’s --output-file flag unreliable across versions Capture stdout directly instead β€” version-proof
Empty selection Original build showed a warning-icon error Softened to a friendly info dialog after user feedback that it felt punitive
β€œStorage reclaimed” needed to be real, not cosmetic β€” Weighs Trash + Caches with du -sm before deletion, sums only selected categories, formats dynamically as MB/GB

System Complete

πŸ› οΈ Tech Stack

SwiftDialog Β· bash Β· native macOS system commands

πŸ“‚ Repository Structure

system-optimiser/
β”œβ”€β”€ README.md
β”œβ”€β”€ screenshots/
β”‚   β”œβ”€β”€ Main_Screen.png
β”‚   β”œβ”€β”€ Progress_Screen.png
β”‚   └── System_Complete.png
└── scripts/
    └── system_optimiser.sh