# TreeTrek TreeTrek is a free, open-source, responsive, optimized, authentication- and dependency-free‡ PHP web application for browsing raw Git repositories in either a self-hosted or shared host environment. It is a human-guided, AI-implemented, greenfield implementation having zero command execution functions. ## Git implementation The engine implements low-level Git protocols to navigate and extract data from the repository's internal storage structure. * **Object Resolution**: Resolves and reads commits, trees, blobs, and tags. * **Packfile Navigation**: Navigates .idx and .pack files using binary fanout searches for rapid object lookup. * **Reference Handling**: Resolves HEAD, branches, and tags, including support for the packed-refs format. * **Smart HTTP Protocol**: Implements the Git Smart HTTP protocol for read-only cloning via standard Git clients. ## User interface The user interface provides developer-focused tools for inspecting history and repository content. * **LCS Diff Engine**: Includes a Longest Common Subsequence (LCS) algorithm to display line-level changes. * **Syntax Highlighting**: Uses a regex-based engine with rules for common programming languages and configuration file syntaxes. * **Multimedia Rendering**: Detects media types to natively render images, video, and audio files in the browser. * **Breadcrumb Navigation**: Features a dynamic path trail and repository selector for seamless project switching. * **Streamed Content**: Streams object data in chunks to handle large files without exceeding memory limits. ## Design Project organization and system behaviour are managed through flat-file configurations and an object-oriented design. This structure separates repository logic from the presentation layer. * **Repository Curation**: Uses an `order.txt` file to define the display sequence and visibility of projects. * **Project Exclusion**: Allows hiding specific repositories by prefixing their names with a hyphen in the `order.txt` config. * **Stateless Routing**: Maps clean URIs directly to specialized page controllers for consistent navigation. --- ‡Uses FontAwesome.