{"id":21131287,"url":"https://github.com/jrop/konvention","last_synced_at":"2026-06-30T19:31:03.714Z","repository":{"id":30069222,"uuid":"33618697","full_name":"jrop/konvention","owner":"jrop","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-01T17:24:07.000Z","size":8,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T14:42:10.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jrop.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":"2015-04-08T16:30:25.000Z","updated_at":"2015-04-13T15:46:27.000Z","dependencies_parsed_at":"2022-08-03T13:30:43.926Z","dependency_job_id":null,"html_url":"https://github.com/jrop/konvention","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jrop/konvention","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Fkonvention","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Fkonvention/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Fkonvention/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Fkonvention/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrop","download_url":"https://codeload.github.com/jrop/konvention/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Fkonvention/sbom","scorecard":{"id":537029,"data":{"date":"2025-08-11","repo":{"name":"github.com/jrop/konvention","commit":"b7f350d176523732b9d480f09f1e033efafc9a0e"},"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Code-Review","score":0,"reason":"Found 0/2 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":"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":"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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-20T07:14:30.682Z","repository_id":30069222,"created_at":"2025-08-20T07:14:30.683Z","updated_at":"2025-08-20T07:14:30.683Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34981390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"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":[],"created_at":"2024-11-20T05:53:04.535Z","updated_at":"2026-06-30T19:31:03.690Z","avatar_url":"https://github.com/jrop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Konvention\n\n(assumption: the reader knows how Express.js apps work)\n\nKonvention is an MVC framework for Express.js.  It uses just the right amount of convention-over-configuration to make building your app easy, without adding too much \"magic\" to the mix.\n\nIt assumes your app is structured like this:\n\n```\nmy-app-folder/\n    app.js\n    config.js *\n    config.production.js *\n    config.test.js *\n    controllers/\n        (controller files here)\n    views/\n        (view files here)\n```\n\n(* optional files)\n\nThe app.js file is a one-liner:\n\n```\nrequire('konvention')\n```\n\n## Configuration\n\nConfiguration files take the form:\n\n```\nmodule.exports = function(app) {\n    app.set('port', 80)\n    app.set('root', '/')\n\n    app.use(require('morgan')())\n\n    // any other configuration here\n}\n```\n\nFirst the file `config.js` is loaded, and then the environment-specific config-file (`config.production.js` or `config.whatever.js`) is loaded second!  The environment is inferred from the `NODE_ENV` environment variable.  Easy!\n\n```\nmy-prompt$ NODE_ENV=debug node app.js\n```\n\nThis would load the two config files (in this order): `config.js` and `config.debug.js`.\n\n## Controllers\n\nControllers go into the `controllers/` sub-directory, as `*.js` files, and take the form:\n\n```\nmodule.exports = require('express').Router()\n    .get('/', function(req, res) {\n        res.end('Hello World!')\n    })\n```\n\nIf the controller's file-name is `index.js`, it is mounted at the path `/`.  For example, say we have two controllers:\n\n```\ncontrollers/\n    index.js\n    admin.js\n```\n\nThe router in `index.js` will be mounted at the path `/` (equivalent to `app.use('/', require('controllers/index.js'))` and `admin.js` will be mounted at `/admin`.  Sub-directories are taken into account as well, for instance:\n\n```\ncontrollers/\n    index.js\n    my-sub-dir/\n        my-sub-controller.js\n```\n\nIn this case, the `Router` exported by `my-sub-controller.js` will be mounted at `/my-sub-dir/my-sub-controller`.\n\n## Views\n\nAccording to the rules above, views for controllers must be in a directory structure that reflects the controller's directory structure that it resides in.  When using Express.js's `render` function, only the view name is used because this framework intelligently infers the sub-directory by what sub-path the `Router` was mounted to.\n\nFor example, say my `Router` was mounted at the path `admin`.  In my handlers, I may just code this:\n\n```\n// ...\n.get('/dashboard', function(req, res) {\n    res.render('dashboard')\n})\n// ...\n```\nThe framework will delegate this call to Express.js, prepending the view-name with the path `'admin/'` as if you had called:\n\n```\nres.render('admin/dashboard')\n```\n\n## Make it Better\n\nIf you have added a feature, or cleaned up the code a bit, submit a pull-request!\n\n## License\n\n### MIT License\n\nCopyright (c) 2015 Jonathan Apodaca\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrop%2Fkonvention","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrop%2Fkonvention","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrop%2Fkonvention/lists"}