redbox-hook-development
ReDBox hooks are NPM packages that extend or customize ReDBox functionality. They are loaded during the Sails lift process.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
ReDBox hooks are NPM packages that extend or customize ReDBox functionality. They are loaded during the Sails lift process.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
ReDBox uses embedded Angular applications within EJS views instead of a single SPA. Each feature is often its own Angular project.
Angular services in ReDBox typically extend `HttpClientService` to handle base URLs, configuration, and CSRF protection.
ReDBox controllers live in `@researchdatabox/redbox-core` and are surfaced to Sails.js through generated shims.
Create detailed feature designs, implementation plans, and task lists for ReDBox/Redbox features that use Waterline models, services, webservice (REST) controllers, ajax controllers, embedded Angular apps, views, and navigation config. Use when asked to design/plan a feature or produce a task list for this stack, especially when explicit sections, non-SPA Angular patterns, and interleaved tests are required.
Review completed ReDBox feature implementations against a growing ruleset and emit structured issues for agent remediation.
Build or update ReDBox form field components end-to-end across Angular form rendering and sails-ng-common config typing/visitor infrastructure. Use when creating a new form component class/model, adding component config properties, wiring component dictionaries, handling config migration/template extraction, or adding form-component tests.
| name | Redbox Hook Development |
| description | ReDBox hooks are NPM packages that extend or customize ReDBox functionality. They are loaded during the Sails lift process. |
ReDBox hooks are NPM packages that extend or customize ReDBox functionality. They are loaded during the Sails lift process.
redbox-hook-[project-name]typescript/: TypeScript source code.assets/: Custom assets.views/: Custom EJS views.config/: Configuration overrides.form-config/: Form configuration overrides.Declared in package.json under the sails key:
hasModels: Provides Waterline models.hasPolicies: Provides Sails policies.hasServices: Provides business logic services (can override core).hasControllers: Provides internal/app controllers (Sails controllers used by the portal).hasWebserviceControllers: Provides HTTP/webservice-facing controllers (API endpoints).hasBootstrap: Provides a startup function.hasConfig: Provides configuration object to merge.The hook's main entry point (usually index.ts compiled to index.js) must export registration functions only for the capabilities enabled in package.json:
registerRedboxModels() — required when hasModels is true.registerRedboxPolicies() — required when hasPolicies is true.registerRedboxServices() — required when hasServices is true.registerRedboxControllers() — required when hasControllers is true (internal/app controllers).registerRedboxWebserviceControllers() — required when hasWebserviceControllers is true (HTTP/webservice controllers).registerRedboxBootstrap() — required when hasBootstrap is true.registerRedboxConfig() — required when hasConfig is true.If a capability is disabled, its matching export must be omitted.
The redbox-dev-tools CLI simplifies hook development:
init to scaffold a new project.redbox-dev-tools generate model to add Waterline models.Use the redbox-dev-tools CLI generator generate model:
--identity <identity>: Waterline identity (table name), defaults to lowercase name.--attrs <attrs>: Comma-separated list of attributes (e.g. name:string:required,age:number).--belongs-to <associations>: Comma-separated belongsTo associations (e.g. owner:user).--has-many <associations>: Comma-separated hasMany associations (e.g. pets:animal:owner).To override a core service or controller, register a component with the same name as the core one. It is recommended to extend the core class in your implementation.