{"id":22474699,"url":"https://github.com/herbsjs/herbsshelf","last_synced_at":"2025-08-02T11:32:12.586Z","repository":{"id":37955538,"uuid":"340730624","full_name":"herbsjs/herbsshelf","owner":"herbsjs","description":"Dynamically generated documentation for your domain","archived":false,"fork":false,"pushed_at":"2024-03-30T13:34:55.000Z","size":1751,"stargazers_count":8,"open_issues_count":6,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-19T17:28:59.098Z","etag":null,"topics":["documentation","hacktoberfest","herbsjs"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/herbsjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-02-20T18:59:13.000Z","updated_at":"2023-07-03T12:21:50.000Z","dependencies_parsed_at":"2024-06-19T01:45:09.085Z","dependency_job_id":null,"html_url":"https://github.com/herbsjs/herbsshelf","commit_stats":{"total_commits":113,"total_committers":15,"mean_commits":7.533333333333333,"dds":0.6991150442477876,"last_synced_commit":"531773a8da742e4ada9d8b282011b94cfbc2fd47"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/herbsjs/herbsshelf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbsshelf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbsshelf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbsshelf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbsshelf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herbsjs","download_url":"https://codeload.github.com/herbsjs/herbsshelf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbsshelf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378965,"owners_count":24240907,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["documentation","hacktoberfest","herbsjs"],"created_at":"2024-12-06T13:10:02.372Z","updated_at":"2025-08-02T11:32:12.304Z","avatar_url":"https://github.com/herbsjs.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":" \u003cp align='center'\u003e\u003cimg src='https://avatars3.githubusercontent.com/u/60399865' height='220'\u003e\u003c/p\u003e\n\n![CI build](https://github.com/herbsjs/herbsshelf/workflows/CI%20build/badge.svg) [![codecov](https://codecov.io/gh/herbsjs/herbsshelf/branch/main/graph/badge.svg)](https://codecov.io/gh/herbsjs/herbsshelf)\n\n# herbsshelf\n\nWelcome to the shelf!\n\nThis is a self-generate documentation, here you can see all the flow of information in the application.\n\nYou can use the lateral panel to navigate into Use Cases of this application. \n\n \u003cp align='center'\u003e\u003cimg src='docs/herbs_shelf.png' height='440'\u003e\u003c/p\u003e\n\n### Installing\n```\n    $ npm install @herbsjs/herbsshelf\n```\n\n### Functioning \n\nTo use the shelf you will need to pass a list of usecases to it, it will read them and return a string from an HTML document with the generated documentation.\n\n### Using \n\nThe quickest way to use the herbs shelf is to create a rest route in your api and expose the documentation generated by the shelf.\n\nConsider a file called _uclist.js with this inside\n```javascript\n\n\nmodule.exports = (injection) =\u003e {\n    return [\n        { usecase: require('./myUseCaseFile').myUseCaseName(injection), tags: { group: 'GroupOne' } },\n        { usecase: require('./myUseCase2File').myUseCase2Name(injection), tags: { group: 'GroupOne' } },\n        { usecase: require('./myUseCase3File').myUseCase3Name(injection), tags: { group: 'GroupTwo' } },\n    ]\n}\n```\n\nIn your app or server file, import the shelf dependecy and the list of usecases\n\n```javascript\n\nconst usecases = require('../../domain/usecases/_uclist')\nconst renderShelfHTML = require('herbsshelf')\n\n\n```\n\nAnd call the shelf into you prefered rest route\n\n```javascript\n\n this.app.get('/herbsshelf', (req, res, next) =\u003e {\n    res.setHeader('Content-Type', 'text/html')\n    const shelf = renderShelfHTML('Project Name', usecases(), entities)\n    res.write(shelf)\n    res.end()\n})\n\n```\n\nIf your project has a `readme.md`, this content should be shown at the beginning of the project. If you want to use a custom readme, you can specify on startup:\n\n```javascript\n\nconst shelf = renderShelfHTML('Project Name', usecases(), entities, './custom-readme.md')\n\n```\n\n\nYou can see the full functionality into the [TODO-LIST ON HERBS repository](https://github.com/herbsjs/todolist-on-herbs)\n\n## TODO\n\n- [X] Self-documentation\n- [ ] Add templates and injection of css file\n- [X] Entities of gotu support\n- [ ] Playground functionality\n- [ ] GraphQL documentation sample\n\n\n### Contribute\nCome with us to make an awesome *herbsshelf*.\n\nNow, if you do not have the technical knowledge and also have intended to help us, do not feel shy, [click here](https://github.com/herbsjs/herbsshelf/issues) to open an issue and collaborate their ideas, the contribution may be a criticism or a compliment (why not?)\n\nIf you would like to help contribute to this repository, please see [CONTRIBUTING](https://github.com/herbsjs/herbsshelf/blob/main/.github/CONTRIBUTING.md)\n\n### License\n\n**herbsshelf** is released under the\n[MIT license](https://github.com/herbsjs/herbsshelf/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbsjs%2Fherbsshelf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherbsjs%2Fherbsshelf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbsjs%2Fherbsshelf/lists"}