{"id":14975662,"url":"https://github.com/johnakhilomen/node-badger","last_synced_at":"2026-03-05T10:31:16.265Z","repository":{"id":65460781,"uuid":"299436132","full_name":"johnakhilomen/node-badger","owner":"johnakhilomen","description":"node-badger, a nodeJS MVC Framework","archived":false,"fork":false,"pushed_at":"2020-10-14T15:38:25.000Z","size":329,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T12:07:31.785Z","etag":null,"topics":["mongoose-model","mvc","mvc-framework","node","node-badger","nodejs","nodejs-framework"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/johnakhilomen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-28T21:30:26.000Z","updated_at":"2020-10-14T15:38:28.000Z","dependencies_parsed_at":"2023-01-24T15:05:14.913Z","dependency_job_id":null,"html_url":"https://github.com/johnakhilomen/node-badger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/johnakhilomen/node-badger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnakhilomen%2Fnode-badger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnakhilomen%2Fnode-badger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnakhilomen%2Fnode-badger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnakhilomen%2Fnode-badger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnakhilomen","download_url":"https://codeload.github.com/johnakhilomen/node-badger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnakhilomen%2Fnode-badger/sbom","scorecard":{"id":528181,"data":{"date":"2025-08-11","repo":{"name":"github.com/johnakhilomen/node-badger","commit":"00d0b9a87890da011f9c47fae02eba7e33b88191"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 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":"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":"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":"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":"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":"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":"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":"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":"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":"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:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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 2 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"}},{"name":"Vulnerabilities","score":0,"reason":"42 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-7wwv-vh3v-89cq","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4r62-v4vq-hr96","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T04:59:55.230Z","repository_id":65460781,"created_at":"2025-08-20T04:59:55.230Z","updated_at":"2025-08-20T04:59:55.230Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30119427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T09:35:22.236Z","status":"ssl_error","status_checked_at":"2026-03-05T09:35:20.028Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["mongoose-model","mvc","mvc-framework","node","node-badger","nodejs","nodejs-framework"],"created_at":"2024-09-24T13:52:21.479Z","updated_at":"2026-03-05T10:31:15.928Z","avatar_url":"https://github.com/johnakhilomen.png","language":"TypeScript","readme":"# node-badger\n\nnode-badger is a node framework which creates a node-server project upon the MVC design pattern. The framework would setup your node application for both dev and production. Once project setup is complete you can run your server.\n\n[![Build Status](https://api.travis-ci.org/johnakhilomen/node-badger.svg?branch=master)](https://travis-ci.org/github/johnakhilomen/node-badger)\n[![Download](https://poser.pugx.org/ali-irawan/xtra/d/total.svg)](https://poser.pugx.org/ali-irawan/xtra/d/total.svg)\n[![Stable](https://poser.pugx.org/ali-irawan/xtra/v/stable.svg)](https://poser.pugx.org/ali-irawan/xtra/v/stable.svg)\n[![Unstable](https://poser.pugx.org/ali-irawan/xtra/v/unstable.svg)](https://poser.pugx.org/ali-irawan/xtra/v/unstable.svg)\n[![License](https://poser.pugx.org/ali-irawan/xtra/license.svg)](https://poser.pugx.org/ali-irawan/xtra/license.svg)\n\n## Installation\n\n```bash\nnpm install -g node-badger\n```\n\n## Usage\n\nOn your terminal run the command to create a node-server project\n\n```bash\nnode-badger\n```\nIt will create a directory structure, including the files you need to kick off your next node-server project. Inside that directory, it will create the initial project structure and install the transitive dependencies:\n\n```\nyourprojectname\n├── README.md\n├── node_modules\n├── package.json\n├── local.js\n└── test\n└── src\n    └── config\n        └──params.js\n    └── controllers\n    └── models\n    └── views\n        └── index.html\n    └── routers\n    └── server.js\n```\n\nOnce the project setup is complete, you can run your server:\n\n```bash\nnpm run start\n```\nAnd you should see this log on your screen:\n\n```\nListening on: port 8000\nmongoDB connected\n```\n\nOr\n\n```bash\nnpm run server\n```\n\nAnd you should see this log on your terminal:\n\n```\n[nodemon] 2.0.4\n[nodemon] to restart at any time, enter `rs`\n[nodemon] watching path(s): *.*\n[nodemon] watching extensions: js,mjs,json\n[nodemon] starting `node local.js`\nListening on: port 8000\nmongoDB connected\n```\n\nGo to your browser and access http://localhost:8000/. You should see; It works!\n\n## Selecting database type\nDuring your project setup, you can specify which database you'd be using for your project. \n\n## Creating models, routers and controllers for your project\n\nModels, Routers and Controllers can be generated for your project. For now, node-badger supports model generations with mongoose. To create models for your project, you run the command node-badger-mongoose-model with (-m) to specify model name, and (-a) for model attributes:\n\n```bash\nnode-badger-mongoose-model -m UserModel -a \"firstname:String,lastname:String,emailaddress:String\"\n```\n\nThe above command will generate a mongoose model that looks like this:\n\n```\nconst mongoose = require(\"mongoose\");\nconst userModelSchema = mongoose.Schema({\nfirstname : {\n            type : String,\n            required: \"firstname is required\",\n            },\nlastname : {\n            type : String,\n            required: \"lastname is required\",\n            },\nemailaddress : {\n            type : String,\n            required: \"emailaddress is required\",\n            },\n}, {collection:\"usermodel\", timestamps : true});\n    const userModel = ConnectMongo.model(\"userModel\", userModelSchema);\n    module.exports = {userModel};\n\n```\n\nA controller that looks like this:\n\n```\nconst UserModel = require('../../src/models/UserModel');\n        \n// Display a list of all User.\nexports.User_list = function(req, res) {\n    res.send('NOT IMPLEMENTED: User list');\n};\n        \n// Display a specific User.\nexports.User_detail = function(req, res) {\n    res.send('NOT IMPLEMENTED: User detail: ' + req.params.id);\n};\n        \n// Display User create form on GET.\n    exports.User_create_get = function(req, res) {\n    res.send('NOT IMPLEMENTED: User create GET');\n};\n        \n// Handle User create on POST.\nexports.User_create_post = function(req, res) {\n    res.send('NOT IMPLEMENTED: User create POST');\n};\n        \n// Display User delete form on GET.\nexports.User_delete_get = function(req, res) {\n    res.send('NOT IMPLEMENTED: User delete GET');\n};\n        \n// Handle User delete on POST.\nexports.User_delete_post = function(req, res) {\n    res.send('NOT IMPLEMENTED: User delete POST');\n};\n        \n// Display User update form on GET.\nexports.User_update_get = function(req, res) {\n    res.send('NOT IMPLEMENTED: User update GET');\n};\n        \n// Handle User update on POST.\nexports.User_update_post = function(req, res) {\n   res.send('NOT IMPLEMENTED: User update POST');\n};\n        \n\n```\nAnd a router that looks like this\n\n```\nvar routerModule = require(\"../../src/server\")\nconst router = routerModule.router;\n// Require controller modules.\nconst User_controller = require('../../src/controllers/UserController');\n\n/// User ROUTES ///\n\n// GET request for one User.\nrouter.get('/:id', User_controller.User_detail);\n\n// GET request for list of all User items.\nrouter.get('/getall', User_controller.User_list);\n\n// GET request for creating a User. NOTE User (uses id).\nrouter.get('/create', User_controller.User_create_get);\n\n// POST request for creating a User.\nrouter.post('/create', User_controller.User_create_post);\n\n// GET request to delete User.\nrouter.get('/:id/delete', User_controller.User_delete_get);\n\n// POST request to delete User.\nrouter.post('/:id/delete', User_controller.User_delete_post);\n\n// GET request to update User.\nrouter.get('/:id/update', User_controller.User_update_get);\n\n// POST request to update User.\nrouter.post('/:id/update', User_controller.User_update_post);\n        \nmodule.exports = router;\n```\n\nwhen specifying a model name, it is necessary to include \"Model\" in your model name, looking like this \"UserModel\". And make sure your data types are in the correctly written : String, [], {}, Number.\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnakhilomen%2Fnode-badger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnakhilomen%2Fnode-badger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnakhilomen%2Fnode-badger/lists"}