{"id":19184089,"url":"https://github.com/kanai2003/codebase-tracker","last_synced_at":"2025-02-23T02:28:22.061Z","repository":{"id":258149812,"uuid":"873498019","full_name":"Kanai2003/codebase-tracker","owner":"Kanai2003","description":"A tool to track React/Next.js component usage and Node.js function usage across a full codebase.","archived":false,"fork":false,"pushed_at":"2024-10-16T10:13:49.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T04:32:41.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/codebase-tracker","language":"JavaScript","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/Kanai2003.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}},"created_at":"2024-10-16T09:15:00.000Z","updated_at":"2024-10-16T10:13:53.000Z","dependencies_parsed_at":"2024-10-17T21:08:12.678Z","dependency_job_id":"91526f38-f3a2-45df-80ab-fbf08e273b2d","html_url":"https://github.com/Kanai2003/codebase-tracker","commit_stats":null,"previous_names":["kanai2003/codebase-tracker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kanai2003%2Fcodebase-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kanai2003%2Fcodebase-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kanai2003%2Fcodebase-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kanai2003%2Fcodebase-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kanai2003","download_url":"https://codeload.github.com/Kanai2003/codebase-tracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240260260,"owners_count":19773299,"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":"2024-11-09T11:06:25.715Z","updated_at":"2025-02-23T02:28:22.045Z","avatar_url":"https://github.com/Kanai2003.png","language":"JavaScript","readme":"# Codebase Tracker\n\nA CLI tool to track the usage of React/Next.js components and Node.js functions across an entire codebase. This package provides insights into function definitions, imports, and calls, allowing developers to analyze their codebase efficiently.\n\nJust install it globally and use a simple command to generate report\n\n***1. install globally***\n```bash\nnpm i -g codebase-tracker\n```\n***2. Generate Report***\n```bash\nnpx codebase-tracker --directory ./ --output component-function-usage-report.txt\n```\n***3. Access the reoprt in your project directory***\n\n## Features\n\n- **Comprehensive Tracking**: Analyze all JavaScript files in the specified directory to track function usage.\n- **Detailed Reports**: Generate reports that include:\n  - Each function's definition location.\n  - All import statements.\n  - Call locations with total counts and line numbers.\n- **Project Structure Representation**: Display the project directory tree along with function usage statistics.\n\n## Installation\n\nTo use `codebase-tracker`, you can install it globally using npm:\n\n```bash\nnpm install -g codebase-tracker\n```\n\nOr clone the repository and link it locally:\n\n```bash\ngit clone https://github.com/Kanai2003/codebase-tracker.git\ncd codebase-tracker\nnpm link\n```\n\n## Usage\n\nRun the CLI command in your terminal:\n\n```bash\nnpx codebase-tracker --directory \u003cpath_to_your_codebase\u003e --output \u003coutput_file_name\u003e\n```\n**Example**\n\n```bash\nnpx codebase-tracker --directory ./ --output component-function-usage-report.txt\n```\n\n## Sample Output\n```bash\n\n===== Component and Function Usage Report =====\n\nGenerated by: codebase-tracker\nProject: youtube_clone\n\nTotal Files: 35\nTotal Directories: 7\nTotal Lines of Code: 2472\n\n--- Project Dependencies ---\n\nbcrypt: ^5.1.1\ncloudinary: ^1.41.1\ncookie-parser: ^1.4.6\ncors: ^2.8.5\ndotenv: ^16.3.1\nexpress: ^4.18.2\njsonwebtoken: ^9.0.2\nmongoose: ^8.0.3\nmongoose-aggregate-paginate-v2: ^1.0.6\nmulter: ^1.4.5-lts.1\n\n==============================================\n\n--- Project File Structure ---\n\n└── src/\n    └── index.js (26 LOC)\n    └── constants.js (1 LOC)\n    └── app.js (44 LOC)\n    └── utils/\n        └── cloudinary.js (30 LOC)\n        └── asyncHandler.js (30 LOC)\n        ...more\n    └── routes/\n        └── video.routes.js (57 LOC)\n        └── user.routes.js (77 LOC)\n            ...more\n    └── models/\n        └── video.model.js (45 LOC)\n        ...more\n    └── middlewares/\n        └── multer.middleware.js (16 LOC)\n        └── auth.middleware.js (27 LOC)\n    └── db/\n        └── index.js (15 LOC)\n    └── controllers/\n        └── video.controller.js (240 LOC)\n        ...more\n\n\n==============================================\n\nBackend/Frontend Functions Usage:\n\nFunction: app\n  - Imported at: src/index.js, Line: 3\n  - Called at: src/app.js, Total Calls: 30, Line: 8\n\nFunction: connectDB\n  - Called at: src/index.js, Total Calls: 1, Line: 12\n  - Defined at: src/db/index.js, Line: 5\n\nFunction: uploadOnCloudinary\n  - Defined at: src/utils/cloudinary.js, Line: 13\n  - Imported at: src/controllers/video.controller.js, Line: 6\n  - Imported at: src/controllers/user.controller.js, Line: 4\n\n  ----------------------Many more-------------------------\n```\n\n\n\n## Contributing\nContributions are welcome! If you have suggestions or improvements, feel free to create a pull request.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n\n## Author\n**Kanailal Manna**\n\ngithub: https://github.com/kanai2003\n\nrepo: https://github.com/Kanai2003/codebase-tracker\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanai2003%2Fcodebase-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanai2003%2Fcodebase-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanai2003%2Fcodebase-tracker/lists"}