| name | rockets-project-bootstrap |
| description | This skill should be used when starting a new Rockets SDK project, setting up a fresh API, or initializing from the rockets-starter template. Automates clone, env setup, dependency install, and build/test verification. |
Rockets Project Bootstrap
Use this skill to start a new Rockets project with deterministic setup commands.
Default template repository:
git@github.com:btwld/rockets-starter.git
Commands
node skills/rockets-project-bootstrap/scripts/bootstrap.js \
--repo git@github.com:btwld/rockets-starter.git \
--dest ../rockets-starter-app \
--install --run-build --run-test
node skills/rockets-project-bootstrap/scripts/bootstrap.js \
--skip-clone \
--dest /path/to/existing/project \
--install --run-build --run-test
node skills/rockets-project-bootstrap/scripts/bootstrap.js --dest ../rockets-starter-app --dry-run
What it does
- Clone boilerplate repository (unless
--skip-clone).
- Ensure
.env exists (copies from .env.example when available).
- Detect package manager (
yarn/pnpm/npm) from lockfile.
- Install dependencies when
--install is provided.
- Run
build and test scripts when requested and available.
- Print summary with pass/fail and next steps.
Template Contract
The starter template must be correct out of the box. The generators add to it ā they never fix it.
Run validate.js --project <path> after bootstrap to verify compliance.
Required Structure
apps/api/src/
āāā main.ts # Swagger with project-specific title
āāā app.module.ts # RocketsAuthModule + CrudModule.forRoot({})
āāā app.acl.ts # AppRole + AppResource enums, base grants
āāā access-control.service.ts # Implements AccessControlServiceInterface
āāā config/
ā āāā typeorm.settings.ts # Postgres config, entities array
ā āāā rockets-auth.settings.ts # Auth config, project-specific email
ā āāā rockets.settings.ts # App config
āāā entities/
ā āāā index.ts # Barrel export for all entities
ā āāā user.entity.ts # extends UserPostgresEntity
ā āāā role.entity.ts # extends RolePostgresEntity
ā āāā user-otp.entity.ts # extends OtpPostgresEntity or CommonPostgresEntity
ā āāā user-metadata.entity.ts # extends CommonPostgresEntity
ā āāā user-role.entity.ts # extends CommonPostgresEntity
ā āāā federated.entity.ts # extends FederatedPostgresEntity or CommonPostgresEntity
ā āāā invitation.entity.ts # extends InvitationPostgresEntity or CommonPostgresEntity
āāā adapters/
ā āāā user.adapter.ts # @InjectRepository(UserEntity)
ā āāā user-metadata.adapter.ts # @InjectRepository(UserMetadataEntity)
āāā modules/
ā āāā user/dto/ # User DTOs (used by RocketsAuthModule)
ā āāā role/ # Role CRUD (adapter, DTO)
āāā migrations/ # Initial migration for all auth tables
Mandatory Rules
- Postgres only ā All entities MUST extend
*PostgresEntity or CommonPostgresEntity. NO *SqliteEntity base classes anywhere.
- Single entity definition ā Each entity defined ONCE in
src/entities/. NO duplicate entity files in modules/*/entities/.
- Project-specific values ā
main.ts Swagger title, typeorm.settings.ts DB name, rockets-auth.settings.ts email MUST match the project name. NO placeholder names from other projects.
- No stale comments ā NO references to other projects (PetAccessQueryService, Music Management, etc.).
- CrudModule.forRoot({}) ā MUST be in
app.module.ts imports (required before any CrudModule.forFeature()).
- Complete migrations ā Initial migration MUST create all auth entity tables with Postgres types (
uuid, timestamp, NOT datetime).
.env.example ā MUST exist with all required environment variables documented.
What the Generators Expect
The generators (generate.js + integrate.js) assume:
src/entities/index.ts exists (adds exports)
src/config/typeorm.settings.ts or src/typeorm.settings.ts has an entities: [...] array
src/app.module.ts has @Module({ imports: [...] }) with bracket structure
src/app.acl.ts has AppResource enum and acRules variable (if using ACL)
If any of these are missing or malformed, integrate.js will warn but not fail.
Smoke test
node skills/rockets-project-bootstrap/scripts/smoke-test.js
The smoke test validates setup logic on a local temporary fixture (no network).