{"id":23700723,"url":"https://github.com/redbox-mint/sails-hook-redbox-redcap","last_synced_at":"2026-02-12T01:09:17.412Z","repository":{"id":216737414,"uuid":"718443836","full_name":"redbox-mint/sails-hook-redbox-redcap","owner":"redbox-mint","description":"ReDBox Provisioner plugin for Redcap","archived":false,"fork":false,"pushed_at":"2024-12-05T02:25:51.000Z","size":12644,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-29T20:24:04.071Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redbox-mint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/build/compileAngularLegacy.sh","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-14T04:46:48.000Z","updated_at":"2024-12-05T02:24:31.000Z","dependencies_parsed_at":"2024-04-10T02:27:06.106Z","dependency_job_id":"12007e19-b2b3-45f4-a89a-f1e5f6bb0101","html_url":"https://github.com/redbox-mint/sails-hook-redbox-redcap","commit_stats":null,"previous_names":["redbox-mint/sails-hook-redbox-redcap"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/redbox-mint/sails-hook-redbox-redcap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redbox-mint%2Fsails-hook-redbox-redcap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redbox-mint%2Fsails-hook-redbox-redcap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redbox-mint%2Fsails-hook-redbox-redcap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redbox-mint%2Fsails-hook-redbox-redcap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redbox-mint","download_url":"https://codeload.github.com/redbox-mint/sails-hook-redbox-redcap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redbox-mint%2Fsails-hook-redbox-redcap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270586452,"owners_count":24611317,"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-15T02:00:12.559Z","response_time":110,"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-12-30T09:17:16.616Z","updated_at":"2026-02-12T01:09:17.378Z","avatar_url":"https://github.com/redbox-mint.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## A Sails Hook Redbox - REDCap\n\nIn this example template you will find the barebones requirements for a Hook\n\nThis Project is divided between folders\n\n## api\n\nMain API of your Hook can be stored in controllers and services\n\n- controllers\n- services\n\n## config \u0026 form-config\n\nThis configurations are redbox-portal dependent. They will allow redbox to be available as a record\nIf you require to have a form in your portal\n\n- `config/recordtype`\n- `config/workflow`\n- `form-config/template-1.0-draft`\n- `config/env/development.js\n```\nredcap: {\n      parentRecord: 'rdmp',\n      formName: 'redcap-1.0-draft',\n      workflowStage: 'draft',\n      appName: 'redcap',\n      appId: 'redcap',\n      recordType: 'redcap',\n      location: 'https://redcap.research.uts.edu.au',\n      description: 'REDCap Workspace'\n    }\n```\n\n## index\n\nMain entry point for the hook\n\n### initialize\n\nInit code before it gets hooked.\n\n### routes\n\nController routes exposed to the sails front-end\n\n```javascript\n'get /your/route' : YourController.method\n```\n\n### configure\n\nAdd configuration and services to your sails app\n\n```javascript\nsails.services['YourService'] = function() { };\nsails.config = _.merge(sails.config, {object});\n```\n\n## test\n\nFirst run `npm install`\n\nTest your sails hook with mocha by running `npm test` before adding the hook to your redbox-portal.\nIt may cause your application to not lift.    \n\n```sh\n$ npm test\n\n\u003e @uts-eresearch/sails-hook-redbox-template@1.0.0 test /Users/moises/source/code.research/sails-hook-redbox-template\n\u003e NODE_ENV=test node_modules/.bin/mocha\n\n\n\n  Basic tests ::\n    ✓ should have a service\n    ✓ should have a form\n    ✓ should have a route\n    ✓ sails does not crash\n\n\n  4 passing (864ms)\n\n```\n\nFor more information on testing your hook go to : https://sailsjs.com/documentation/concepts/testing\n\n\n## Development in redbox-portal\n\nA docker-compose.yml file is present in support/development and is setup to run the full ReDBox stack and install the hook. To run the stack there is a ReDBox Sails Hook Run Utility in the root of the project\n\nUsage\n```\nReDBox Sails Hook Run Utility\nUsage: ./runForDev.sh [-a|--(no-)angular] [-h|--help]\n\t-a,--angular,--no-angular: Angular mode. Will ensure permissions are set correctly on the Sails working directory so that changes can be applied (off by default)\n\t-h,--help: Prints help\n```\n\nNote: The first time the stack runs it may take some time as yarn initialises the hook within ReDBox Portal. All subsequent runs should be faster\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredbox-mint%2Fsails-hook-redbox-redcap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredbox-mint%2Fsails-hook-redbox-redcap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredbox-mint%2Fsails-hook-redbox-redcap/lists"}