{"id":29167203,"url":"https://github.com/dmk/tp-tree-viewer","last_synced_at":"2025-07-01T09:08:10.565Z","repository":{"id":300622300,"uuid":"1006647126","full_name":"dmk/tp-tree-viewer","owner":"dmk","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-22T18:24:41.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T19:30:52.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-22T18:02:48.000Z","updated_at":"2025-06-22T18:24:45.000Z","dependencies_parsed_at":"2025-06-22T19:32:33.019Z","dependency_job_id":"e4bbe04a-73a2-4073-a1f7-b12859920286","html_url":"https://github.com/dmk/tp-tree-viewer","commit_stats":null,"previous_names":["dmk/tp-tree-viewer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmk/tp-tree-viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Ftp-tree-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Ftp-tree-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Ftp-tree-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Ftp-tree-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmk","download_url":"https://codeload.github.com/dmk/tp-tree-viewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmk%2Ftp-tree-viewer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933316,"owners_count":23386784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-01T09:08:09.097Z","updated_at":"2025-07-01T09:08:10.555Z","avatar_url":"https://github.com/dmk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TP Tree Viewer\n\nA modern React-based web interface for visualizing Ruby method call trees generated by the `tp_tree` gem.\n\n## Features\n\n- 🌳 **Interactive Tree View**: Expand/collapse nodes, click to view details\n- 🎨 **Syntax Highlighting**: Color-coded by depth with timing information\n- 📊 **Detailed Inspector**: View method parameters, return values, and timing\n- 📁 **File Upload**: Upload JSON files via drag \u0026 drop or file picker\n- ⚡ **Fast Performance**: Built with Vite and React for speed\n\n## Quick Start\n\n```bash\n# Install dependencies\nbun install\n\n# Start development server\nbun run dev\n\n# Build for production\nbun run build\n\n# Preview production build\nbun run preview\n```\n\n## Usage\n\n1. **Generate trace data** from your Ruby code:\n   ```ruby\n   require 'tp_tree'\n\n   TPTree.catch(write_to: 'trace.json') do\n     # Your Ruby code here\n     some_method_call\n   end\n   ```\n\n2. **Open the web app** in your browser (usually http://localhost:5173 in dev mode)\n\n3. **Upload your trace.json file** using drag \u0026 drop or the file picker\n\n## Ruby Integration\n\nMake sure your Ruby code exports to JSON format:\n\n```ruby\nrequire 'tp_tree'\n\n# Generate JSON file\nTPTree.catch(write_to: 'trace.json') do\n  # Your traced code here\n  MyClass.new.complex_method(arg1, arg2)\nend\n```\n\n## Data Format\n\nThe app expects JSON in this format:\n\n```json\n{\n  \"version\": \"1.0.0\",\n  \"timestamp\": \"2024-01-01T00:00:00Z\",\n  \"events\": [\n    {\n      \"event\": \"call\",\n      \"method_name\": \"method_name\",\n      \"parameters\": [...],\n      \"return_value\": null,\n      \"depth\": 0,\n      \"defined_class\": \"ClassName\",\n      \"path\": \"/path/to/file.rb\",\n      \"lineno\": 10,\n      \"start_time\": 1234567890.123,\n      \"end_time\": 1234567890.456,\n      \"duration\": 0.333\n    }\n  ]\n}\n```\n\n## Deployment\n\nBuild the static files and serve them from any web server:\n\n```bash\nbun run build\n# Serve the dist/ directory\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmk%2Ftp-tree-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmk%2Ftp-tree-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmk%2Ftp-tree-viewer/lists"}