- Notifications
You must be signed in to change notification settings - Fork0
Learn, design or document codebase by putting breadcrumbs in source code. Live updates, multi-language support, and easy sharing.
License
JavaScriptExpert/codecrumbs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Have you ever got lost in a big or unknown codebase? This tool will help you to solve that. Also, it will increase your development speed and give more knowledge about your application architecture.
How it works? You run
codecrumbscommand for a codebase, it analyzes source code and builds its visual representation. Write down a codecrumb-comment and codebase state will be reflected by visual client in browser on the fly.
Check out the example ofstandalone version running here.
Pre-condition: update/install
NodeJSversion to be >=8.11.1
- Install
codecrumbsglobally (yarn global add codecrumbs) - Run
codecrumbs -d project-src-dir -e project-src-dir/index.js. Change parameters to match your project:-disdirectory with source code,-eisentry point file . - Go tohttp://localhost:2018 in the browser to check it out.
| Parameter | Description | Example |
|---|---|---|
-d,--dir | Path to project source code directory | -d src |
-e,--entry | Path to project source entry point file (must be insidedir) | -e src/app.js |
-p,--port | Port for Codecrumbs client (optional, default2018) | -p 2019 |
-n,--projectName | Project name alias (optional, default same as-d value) | -n my-hello-world |
UI explained:
- Enable "Codecrumbs" to have codecrumbs tree on the scheme (drop-down contains extra configuration)
- Choose "current" codecrumbs flow to display (can be either trail or all other "simple" codecrumbs)
- Codecrumb details
- Folder is in "active only" state, you can expand to show all children
How to get there? Leave breadcrumb in code by writing down a comment://cc:[parameters;].
cc (stands for "CodeCrumb") is a prefix which used by the parser; check example of parameters in the table below:
| Example | Description | Use case |
|---|---|---|
//cc:remember place | simple breadcrumb,remember place is a title of our first breadcrumb | Mark an important place to not forget where it was |
//cc:here is bug;well, seems like a bug in logic | simple breadcrumb,well, seems like a bug in logic is details for breadcrumb, separated by; | Add extra information, will be rendered in popups |
//cc:signin#3;enable route | trail of breadcrumbs,signin is thetrail ID,#3 is ordernumber of step,enable route is a title describing the step. | A sequence of codecrumbs, use to describe some data flow (e.g. user login, or form submit, etc.). |
//cc:signin#1;firebase sign in;+2;do call to firebase with credentials | trail of breadcrumbs,+2 is number of lines to highlight, separated by; | Use number of lines to highlight the code related to breadcrumb |
Note: current version supports single line comments only.
You might be interested to study connections between several codebases (sub-modules), codecrumbs supports that.Simply start codecrumbs multiple times (once for each codebase), it allwill be synced in one picture inside the browser tab. To control a diagram UI - select it by clicking on it.
E.g. for client-server application, go to the source directory for your server code and runcodecrumbs -e your-server-src/index.py -d your-server-src, same for clientcodecrumbs -e src-client/index.js -d src-client.
Note: codebases can be located wherever you want (no need to have them like mono-repo, etc.), simply run
codecrumbsfor directory you need.
Current version supports next programming languages:
JavaScriptTypeScriptPythonRubyPHPJavaKotlinC++C#Fortran
Please file an issue to support other language you would like to have.
You can take a snapshot of application state at any point of time and share it with others. Simply download the json file of codecrumbs store (top-right corner, "setup -> download"). This json file can be then uploaded to codecrumbs (top-right corner, "setup -> upload") to represent exactly same picture, even without having that project locally!
Note: In current version only JavaScript offers this feature
UI explained:
- Enable "Dependencies"
- Select connection between modules
- All involved files (two or more) will be opened in "Sidebar", so you can see “what is imported” and “its implementation”.
Note: In current version only JavaScript offers this feature
js2flowchart is used in the sidebar to draw flowchart for the selected file code.
The tool (codecrumbs) allows us to learn, document and explain a codebase much faster. Also, withDownload & Upload feature it becomes super easy to collect and share your "investigation results".
The ultimate goal is to have many case studies hosting athttps://codecrumbs.io.The library of projects "explained with codecrumbs", the place for collaborative learning. More features around that coming soon, stay tuned.
Any support is very much appreciated! 👍 😘 ❤️If you like this project, please,put a ⭐ and tweet about it. Thanks!
Please, considermaking financial donation, it will help further development of more cool features! We'll thank you by including your name/company logo here

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with theowner of this repository before making a change. Ideas and suggestions are welcome.To start development environment, clone the repo & run:
yarn&&yarnstart
Next features are developing:
- eject codecrumbs - ability to remove all "breadcrumbs" from source code in "one click"
- data transferring between cc trail steps
- VS Code extension - some neat features right inside the code editor. Checkoutthe repo here.
About
Learn, design or document codebase by putting breadcrumbs in source code. Live updates, multi-language support, and easy sharing.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- JavaScript93.6%
- CSS6.0%
- C#0.1%
- Python0.1%
- Java0.1%
- C++0.1%






