{"id":31129153,"url":"https://github.com/devisjs/generator-devis","last_synced_at":"2025-09-18T01:55:35.269Z","repository":{"id":10870638,"uuid":"67311587","full_name":"Devisjs/generator-devis","owner":"Devisjs","description":"Scaffold out a devis project","archived":false,"fork":false,"pushed_at":"2025-08-13T08:02:13.000Z","size":140,"stargazers_count":11,"open_issues_count":28,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-16T03:36:28.789Z","etag":null,"topics":["devis","generator-devis","microservice","mongodb","scaffold","yeoman"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Devisjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-09-03T21:03:57.000Z","updated_at":"2019-06-20T11:01:14.000Z","dependencies_parsed_at":"2022-08-08T05:00:05.616Z","dependency_job_id":"714e4cc1-292c-43f1-a073-13c42192c7b5","html_url":"https://github.com/Devisjs/generator-devis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Devisjs/generator-devis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fgenerator-devis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fgenerator-devis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fgenerator-devis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fgenerator-devis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devisjs","download_url":"https://codeload.github.com/Devisjs/generator-devis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fgenerator-devis/sbom","scorecard":{"id":40035,"data":{"date":"2025-08-11","repo":{"name":"github.com/Devisjs/generator-devis","commit":"c21ee88ea1edb7eb7444f446bb44352a32b0ef0c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T21:16:47.911Z","repository_id":10870638,"created_at":"2025-08-14T21:16:47.912Z","updated_at":"2025-08-14T21:16:47.912Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275696225,"owners_count":25511352,"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-09-17T02:00:09.119Z","response_time":84,"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":["devis","generator-devis","microservice","mongodb","scaffold","yeoman"],"created_at":"2025-09-18T01:55:33.460Z","updated_at":"2025-09-18T01:55:35.261Z","avatar_url":"https://github.com/Devisjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Devis generator\n\n\n\n\u003cimg src=\"https://8zzp5w.dm2302.livefilestore.com/y3mfmEBf29sGXflOWN_Hk0yFy3debRCUbdQiTEuttJh0bAg3axpzhmJspRFdOnaLwKylPPYewtA8M-z1_RO2YgjBkOU75s18kvWdqPeT5z7wXXdjKBu3tPeKu4L_FFGn_R5UKIH6LspIBhy-JMYBVT6vT0GusOzoPkbBdXGxN0rnNk?width=600\u0026height=600\u0026cropmode=none\" width=\"250\"/\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/generator-devis\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/generator-devis.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/generator-devis\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/generator-devis.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/generator-devis\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/generator-devis.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \n  \u003ca href=\"https://www.bithound.io/github/Devisjs/generator-devis\"\u003e\u003cimg src=\"https://www.bithound.io/github/Devisjs/generator-devis/badges/score.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  Check this playlist to see generator demos: https://www.youtube.com/playlist?list=PLXuIV4C_5YhI8dX2kFx8h414byI1_yAxM\n\u003c/p\u003e\n\n\n#demos:\n\n                               _-----_     ╭──────────────────────────╮\n                              |       |    │     Welcome to devis     │\n                              |--(o)--|    │  microservice framework  │\n                             `---------´   │        generator!        │\n                              ( _´U`_ )    ╰──────────────────────────╯\n                              /___A___\\   /\n                               |  ~  |     \n                             __'.___.'__   \n                           ´   `  |° ´ Y `\n\n#\n\n## Getting Started\n\n\n\n### What is Yeoman?\n[![](https://raw.githubusercontent.com/yeoman/media/master/optimized/yeoman-masthead.png)](http://yeoman.io)\n\n\nYeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive.\n\nTo do so, Yeoman provide a [generator ecosystem](http://yeoman.io/generators/). A generator is basically a plugin that can be run with the `yo` command to scaffold complete projects or useful parts.\n\n\n## Usage\n\n**Requirements:**\n\n*Remember* that Devis is based on devispattern that is an addon written in c ++.\n\n\nIt's necessary, before using Devis to install:\n- [CMake](http://www.cmake.org/download/)(*.msi version for windows: You must check the addition of the path for all users, And restart your computer after installation)\n- A proper C/C++ compiler toolchain of the given platform\n    - **Windows**:\n        - [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools)\n        or a recent version of Visual C++ will do ([the free Community](https://www.visualstudio.com/products/visual-studio-community-vs) version works well)             \n    - **Unix/linux-gnu**:\n        - Clang or GCC\n        - Ninja or Make (Ninja will be picked if both present)\n        - Xcode with command line tools if you are under **mac os**\n**Installation**\n```bash\nnpm install -g yo generator-devis\n```\n\n**Or, if you upload the project**\n\nInstall both yeoman and the generator:\n```bash\nnpm install -g yo generator-generator\n```\n\nSetup a generator project:\n```bash\nyo generator\n```\n\nLink the generator in the global node modules:\n```bash\nnpm link\n```\n\nNavigate to a folder you would love to scaffold a new project and run:\n```bash\nyo devis\n```\n### What is Generator-devis?\n\nwe will define each part of the generator as a tree\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;|**.app**\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;|--\u003e**.script**\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;|----\u003e**.script.js**\n* generate local depencies on different microservices and run server you can customise the code if you want for example use different microservice remotely not localy.\u003cbr\u003e\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;|----\u003eYou can add other scripts there \u003cbr\u003e\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;|--\u003e**.root.js**\n* it is here where will be added the different microservices locally or as a client\u003cbr\u003e\u003cbr\u003e\n|--\u003e**.route**\n* it is in this folder, where will the different routes associated to each model,where will be implemented and evaluated the different functions that you will use in the index file.\u003cbr\u003e\nBy default every route file contains the functions put, get, post and delete to express routing framework.\u003cbr\u003e\u003cbr\u003e\n\n|--\u003e**.client.json**\n* If you intended to consume distance microservices you should add here the necessary information For each Microservice and the script that i described previously will handle these microservices by adding them to the root file.\u003cbr\u003e\n|**.microservices**\u003cbr\u003e\n* You will add there your different microservices\u003cbr\u003e\n|--\u003e**.Micro1**\u003cbr\u003e\n|----\u003e**.main.js** \u003cbr\u003e\n* It's the core of your Microservice where you will define the different properties, but for clarity, you will only define the properties here, the callback functions will be reported elsewhere in the libs folder.\u003cbr\u003e\u003cbr\u003e\n|----\u003e**.libs** \u003cbr\u003e\n* Example:\n\nIf your Microservice is model called  and contains properties: GET and Post then your main.js will be like that:\n```js\nlet model = require(\"devis\");\nlet model_f = require(\"./libs/functions\");\n\nmodel.add({\n        role: \"model\",\n        action: \"GET\"\n    },\n    model_f.GET);\n\nmodel.add({\n    role: \"model\",\n    action: \"POST\"\n}, model_f.POST);\nmodule.exports = model;\n```\nAnd the functions file will be something like that:\n```js\nfunction POST(args, done) {\n   //do something\n        done(null,finalresult);\n    }\nfunction GET(args, done) {\n   //do something\n        done(null,finalresult);\n    }\nmodule.exports={\n\t    POST:POST,\n\t    GET:GET\n\t}\n```\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;|----\u003e**.confs** \u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;|------\u003e**.core.js** \u003cbr\u003e\n* If you want your Microservice to be used remotly too you should do like the two available microservices by adding the dependencies in the file depencies if you have.\u003cbr\u003e\u003cbr\u003e\n|**.index**\u003cbr\u003e\n* it is here or you'll exploit your different microservices.\n\n* This video will explain how to generate the scaffold: https://www.youtube.com/watch?v=Alw7Azklcvc\u0026list=PLXuIV4C_5YhI8dX2kFx8h414byI1_yAxM\u0026index=1\n\n\n### Using the project\nOnce installed, you can start creating microservices by using **devis framework**. You can rely on both microservices that already exist in the project: model and authentification.\n\nAfter, you should add your microservices to the file *root.js*, located in the folder *app*. Fortunately there already a script that will perform this task in your place , you just have to run the command :\n\n```bash\nnpm install\ndevis generate\n```\n\nIf you just wanna test both existing microservices, you should install [ wakanda ] ( https://wakanda.github.io ), add one or more tables , a use, change login and password on ```app/wakanda_config.js``` and launch\n\n```bash\nnpm install\ndevis generate\ndevis start\n```\n\nThe script will generate automatically the file *root.js*: use  both microservices and launch the server.\nBy running the index file you will consume the server and log in **wakanda**.\n\n## Use devis command line\n### If you are using Mac OS or GNU/LINUX:\n\nThe devis command are in **app** folder.\n\nAs root user, run this command inside your project folder:\n\n```bash\nsudo mv app/devisCommand/GNU_UNIX/devis /usr/bin\n```\n\n\n### On windows:\nSetting the path and variables in Windows :\n\n* From the Desktop, right-click the very bottom left corner of the screen to get the Power User Task Menu.\n\n* From the Power User Task Menu, click System.\n\n* Click the Advanced System Settings link in the left column.\n\n* In the System Properties window, click on the Advanced tab, then click the Environment Variables button near the bottom of that tab.\n\n* In the Environment Variables window (pictured below), highlight the Path variable in the \"System variables\" section and click the Edit button. Add or modify the path lines with the paths you want the computer to access. Each different directory is separated with a semicolon as shown below.\n\n* new and select the `app/devisCommand/windows` folder and restart your computer. \n\n### Log file\n\nIf you want to know handles that a Microservice offers, like *model* , you just have to write the following command:\n\n```bash\ndevis get microservices/model/main\n```\nIf this microservice are distant, for example\n```javascript\nvar devis=require(\"devis\");\n\ndevis.add({\n  action: 'game',\n  cmd:'play'\n}, function(args, done) {\n\n  done(null,{ result: 'play' });\n});\ndevis.add({\n  action: 'game',\n  cmd:'pause'\n}, function(args, done) {\n\n  done(null,{ result: 'pause' });\n});\ndevis.listen({\n  host:'127.0.0.1',\n  port:3030\n})\n```\nYou should run\n```bash\ndevis get connect port : '3030' , host : \"127.0.0.1\"\n```\n**Don't forget space between each argument!**\n\nA file will be created under the name **devis-log.txt** or you will find all the information regarding this Microservice.\n\n###Generate microservice scaffold\nIf you want to generate a scaffold of Microservice you should run the following command:\n\n```bash\ndevis create microservice_name\n```\n\n* This video will explain how to use the default wakanda restfull api: https://www.youtube.com/watch?v=qghZtKiTyKw\u0026list=PLXuIV4C_5YhI8dX2kFx8h414byI1_yAxM\u0026index=2\n\n\n##Use MongoDB and Angular\nIf you want use mongodb and angular in your application you have just to write some simple commands:\nFor example, you wanna create an application who will manage user posts. \n\nSo you need 2 schemas *users and posts*\n\nwe suppose that the database name is \"myapp\"\nFirst you should implement the `data.json :app/database/data.json`:\n```json\n{\n    \"user\": {\n        \"firstname\": {\n            \"type\": \"String\",\n            \"unique\": \"true\",\n            \"required\": \"true\"\n        },\n        \"lastname\": {\n            \"type\": \"String\",\n            \"unique\": true,\n            \"required\": true\n        },\n        \"updated_at\": {\n            \"type\": \"Date\",\n            \"default\": \"Date.now\"\n        }\n    },\n    \"post\":{\n      \"name\":\"String\",\n      \"text\":\"String\",\n      \"user_id\":\"String\",\n      \"updated_at\": {\n          \"type\": \"Date\",\n          \"default\": \"Date.now\"\n      }\n    }\n}\n```\nAfter you have to run this commands:\n```bash\ndevis db mongo\ndevis db add user\ndevis db add poste\ndevis db generate myapp\n```\n``devis db mongo`` will add mongo folder to database and  ``devis add user`` will generate the user data file on mongo folder and add user route file to the route folder and generate user folder on public with index.html and finaly add user angular controller to controllers folder under public folder.\n\nAfter that,``index.js`` will be implemented by using mongodb micorservice and user,poste schema. Inside views folder you will see 2 folders `user` and `post` with ``\"html\" files`` to implement for edit, add and index for each schema.\nImplement route methods inside `app/route/user.js` and `app/route/post.js` and angular methods inside `public/controllers/user.js` and `public/controllers/post.js`, after implementing the necessary microservices for User and post.\nAnd that's it! you have a complete and powerfull application with minimum effort in minimum time!  \n\n* You can see the lirary example in generator-devis example for more information\n\n* This video will explain how to use mongoDb in your application: https://www.youtube.com/watch?v=p6uOOyJV35o\u0026index=3\u0026list=PLXuIV4C_5YhI8dX2kFx8h414byI1_yAxM\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevisjs%2Fgenerator-devis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevisjs%2Fgenerator-devis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevisjs%2Fgenerator-devis/lists"}