{"id":15068294,"url":"https://github.com/mvillarrealb/sequelize-resource-controller","last_synced_at":"2026-02-12T06:31:21.957Z","repository":{"id":98388606,"uuid":"155630725","full_name":"mvillarrealb/sequelize-resource-controller","owner":"mvillarrealb","description":"CRUD REST Api from your sequelize model for restify and express","archived":false,"fork":false,"pushed_at":"2018-11-05T02:40:10.000Z","size":398,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-04T19:36:08.914Z","etag":null,"topics":["crud-api","expressjs","resource-api","rest-api","restify","sequelize"],"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/mvillarrealb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-31T22:22:44.000Z","updated_at":"2019-06-29T12:17:00.000Z","dependencies_parsed_at":"2023-06-11T03:23:33.449Z","dependency_job_id":null,"html_url":"https://github.com/mvillarrealb/sequelize-resource-controller","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"2072facac112d30dc85d03bf81694ae79ac12b61"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mvillarrealb/sequelize-resource-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvillarrealb%2Fsequelize-resource-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvillarrealb%2Fsequelize-resource-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvillarrealb%2Fsequelize-resource-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvillarrealb%2Fsequelize-resource-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvillarrealb","download_url":"https://codeload.github.com/mvillarrealb/sequelize-resource-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvillarrealb%2Fsequelize-resource-controller/sbom","scorecard":{"id":669498,"data":{"date":"2025-08-11","repo":{"name":"github.com/mvillarrealb/sequelize-resource-controller","commit":"2072facac112d30dc85d03bf81694ae79ac12b61"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/16 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":"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":"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":"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":"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":"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":"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":"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":"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":"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-21T19:26:43.788Z","repository_id":98388606,"created_at":"2025-08-21T19:26:43.788Z","updated_at":"2025-08-21T19:26:43.788Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29360644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"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":["crud-api","expressjs","resource-api","rest-api","restify","sequelize"],"created_at":"2024-09-25T01:33:36.912Z","updated_at":"2026-02-12T06:31:21.942Z","avatar_url":"https://github.com/mvillarrealb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sequelize-resource-controller\n\n[![npm version](https://img.shields.io/npm/v/sequelize-resource-controller.svg)](https://www.npmjs.com/package/sequelize-resource-controller)\n[![Build Status](https://travis-ci.org/mvillarrealb/sequelize-resource-controller.svg?branch=master)](https://travis-ci.org/mvillarrealb/sequelize-resource-controller)\n[![codecov](https://codecov.io/gh/mvillarrealb/sequelize-resource-controller/branch/master/graph/badge.svg)](https://codecov.io/gh/mvillarrealb/sequelize-resource-controller)\n![node](https://img.shields.io/node/v/sequelize-resource-controller.svg)\n[![License](https://img.shields.io/npm/l/sequelize-resource-controller.svg?maxAge=2592000?style=plastic)](https://github.com/mvillarrealb/sequelize-resource-controller/blob/master/LICENSE)\n\nsequelize-resource-controller is a REST Resource abstraction layer, wich handles all the burden of creating transactions, handling rollbacks and formatting responses for your Resource based Api with sequelize. \n\nProvides support for Restify and Express, two of the most popular http frameworks for nodejs.\n\n# Installation\n\n```bash\nnpm install --save sequelize-resource-controller\n```\n\n# Documentation\n\nYou can check [ESDOC documentation](https://mvillarrealb.github.io/sequelize-resource-controller/)\n\n# Examples\n\n## Basic Example (Todo List Api)\n\nThe basic example is just a straighforward todo Api with very few files(one file for the database \u0026 models, and one for each implementation).\n\nEndpoint|verb|Description\n--|---|---\n/todos|POST| Creates a new TODO\n/todos|GET| Gets all TODOS\n/todos/:todo_id|GET| Get a single TODO by id\n/todos/:todo_id|PUT| Updates a Todo\n/todos/:todo_id|DELETE| Deletes a single todo\n\nTo test this api use [todo-api.postman_collection](examples/basic/todo-api.postman_collection.json)\n\n[You can check the example Here](examples/basic/README.md)\n\n---\n\n## Advanced Example(Points of interest)\n\nThe advanced example uses *node-lite-router* to publish the endpoints of the api, and basically represents a points of interest api(POI).\n\nEndpoint|verb|Description\n--|---|---\n/v1/points-of-interest|POST|Creates a point of interest\n/v1/points-of-interest|GET|Gets all the points of interest in a paginated fashion\n/v1/points-of-interest/:poi_id|PUT| Updates a point of interest\n/v1/points-of-interest/:poi_id|DELETE| Deletes a point of interest\n/v1/points-of-interest/:poi_id|GET| Finds a particular a point of interest\n\nTo test this api use [poi-api.postman_collection](examples/advanced/poi-api.postman_collection.json)\n\n[You can check the example Here](examples/advanced/README.md)\n\n\n# Testing\n\n## Run all tests\n\nTo run all unit and integration tests:\n\n```bash\nnpm test\n```\n\n## Run unit tests only\n\nTo run the unit tests use the following command:\n\n```bash\nnpm run unit-test\n```\n\n## Run integ tests only\n\nTo run the integration tests use the following command:\n\n```bash\nnpm run integ-test\n```\n\n# Generate ESDOC Documentation\n\nTo geneate the ESDOC documentation use the following command:\n\n```bash\nnpm run docs\n```\n\n# Running the coverage\nTo run the coverage report use the following command\n```bash\nnpm run coverage\n```\n---\n\n# Why sequelize-resource-controller(My motivations)?\n\nWhen writing CRUD based REST Apis with a relational database backend, you'll often find yourself loosing time with some stuff like implementing transactions, writing validations, and just every step possible to convert your database model into an Resource representation. \n\nThis module will make sure your code looks standarized and CRUD looks like a trivial thing.\n\nThis also addresses to reach the Richardson's Rest Maturity Model by implementing for you the fancy parts(Basically the Verbs, the status codes, and the Hateoas stuff). \n\nThis module also uses google API design in terms of resource responses, error handling and internal service names(with the exception of our **delete** reserved word :P).\n\n# Notes\n\n* This is the second module of a series of node-modules that I am creating with the main goal of creating node based microservices stacks. This will address the Relational database CRUD APi approach with some *database per service around here*.\n\n* It was based on a module that I've previously coded back in 2016, this module has a cleaner way of doing things and has less messy parts. It allows you to take more control on some things. Also has support for restify wich is cool.\n\n* This module was written using async/await so you it is easier to handle the tricky parts.\n\n* This module has some cool eslinting around.\n\n\n# ROADMAP\n\n* I18N support:  Will be cool and nice to have translation messages for the supported errors and responses.\n\n* Extensible support for List endpoint: Basically override the findAll params to include associations or something like that.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvillarrealb%2Fsequelize-resource-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvillarrealb%2Fsequelize-resource-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvillarrealb%2Fsequelize-resource-controller/lists"}