Tidying, Organizing and Encapsulating your Swift Codebase

Maintaining a clean, well-organized codebase becomes increasingly challenging as projects grow and as more people try vibe coding. This talk introduces the tool Treeswift which embeds and extends the static analysis tool Periphery and other techniques to organize your code base in a way that maximizes encapsulation so that your code can stay small, nimble, and easy to understand.

We’ll start with an introduction to Periphery and its benefits, then demonstrate how extending it with custom analysis and visualization can help developers identify naming inconsistencies, understand hierarchical relationships between SwiftUI views, and make informed decisions about file organization. With author’s new app Treeswift, specifically its file browser, we’ll see how visualizing code relationships can reveal opportunities for better encapsulation, encapsulate code into folders using the idea of “folder private” code, suggest file reorganization based on view hierarchies, and ultimately help maintain a cleaner, more maintainable codebase.

Share

Session info:

Speaker: Dan Wood

Independent macOS/iOS Developer at Robot Shed

Date: 13 March 2026

Time: 14:25 - 15:10

Relevant tags:
Swift

See all speakers

See all videos