
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
boilerbuilder
Advanced tools
A Boilerbuilder, to boilerbuild aesthetics projects! πͺ
Welcome to Boilerbuilder, your go-to CLI tool for creating, managing, and maintaining modern frontend projects with ease! Boilerbuilder streamlines the development workflow by providing a comprehensive set of commands to scaffold new projects, migrate existing ones, and keep dependencies up-to-date using curated templates from the cloud.
Built with developer productivity in mind, Boilerbuilder eliminates the repetitive setup tasks and ensures consistency across your projects by leveraging a centralized template system hosted on GitHub.
Boilerbuilder is organized into a clean, modular structure with enhanced reliability and maintainability:
boilerbuilder/
βββ src/ # β¨ Refactored implementation
β βββ index.js # CLI entry point with Commander.js
β βββ config/ # Configuration and validation
β β βββ constants.js # Centralized constants and messages
β β βββ validation.js # Input validation schemas
β βββ commands/ # Command implementations
β β βββ createProject.js # Project creation logic
β β βββ migrateProject.js # Project migration functionality
β β βββ updateDependencies.js # Dependency update management
β βββ services/ # Business logic services
β β βββ templateService.js # Template management
β β βββ fileService.js # File operations
β β βββ gitService.js # Git operations
β β βββ validationService.js # Input validation
β βββ utils/ # Pure utility functions
β βββ errorHandler.js # Consistent error handling
β βββ logger.js # Logging utilities
β βββ pathUtils.js # Path manipulation utilities
βββ tests/ # π§ͺ E2E testing suite
β βββ e2e-test.sh # Main test runner (bash)
β βββ helpers/ # Test utilities
β β βββ assert.sh # Assertion functions
β β βββ cleanup.sh # Test cleanup utilities
β βββ fixtures/ # Test data
βββ .temp/ # Test projects (gitignored)
βββ package.json # Package configuration with test scripts
graph TD
A[boilerbuilder CLI] --> B{Command Type}
B -->|Default/birl| C[Create New Project]
B -->|update| D[Update Dependencies]
B -->|migrate| E[Migrate Project]
C --> F[Fetch Available Templates]
F --> G[User Selection]
G --> H[Download Template]
H --> I[Setup Project]
I --> J[Success Message]
D --> K[Read package.json]
K --> L[Compare with Remote]
L --> M[Show Differences]
M --> N[Apply Updates]
E --> O[Backup Current Code]
O --> P[Download New Template]
P --> Q[Restore User Code]
Q --> R[Update Configuration]
style C fill:#e1f5fe
style D fill:#f3e5f5
style E fill:#fff3e0
Install Boilerbuilder globally to use it anywhere:
npm install -g boilerbuilder
Or use it directly with npx:
npx boilerbuilder
Create your first project:
# Interactive mode - will prompt for project name and type
boilerbuilder
# Direct mode - specify name and type
boilerbuilder --name my-awesome-project --type react-spa-vite
The main command creates a new project from available templates:
# Interactive mode
boilerbuilder
# With options
boilerbuilder --name <project-name> --type <template-type>
Example:
boilerbuilder --name my-react-app --type react-spa-vite
Interactive Flow:
? Nome do projeto: my-awesome-project
? Tipo do projeto: (Use arrow keys)
β― react-spa-vite
react-lib-vite
next-app
ts-lib-vite
vue-lib-vite
vue-spa-vite
Keep your project dependencies synchronized with the latest template standards:
cd your-project
boilerbuilder update
Requirements:
package.json keywords[0]
package.json
must have the template name in the first keywordExample package.json
configuration:
{
"name": "my-project",
"keywords": ["react-spa-vite"],
"dependencies": {
// your dependencies
}
}
Features:
Example Output:
DependΓͺncias para atualizar:
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββ¬βββββββββββββββββββββ
β DependΓͺncia β VersΓ£o Atual β VersΓ£o Nova β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββΌβββββββββββββββββββββ€
β react β ^18.2.0 β ^18.3.1 β
β @types/react β ^18.2.15 β ^18.3.3 β
β vite β ^4.4.5 β ^5.3.4 β
ββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββ΄βββββββββββββββββββββ
? Deseja atualizar as dependΓͺncias automaticamente? (y/N)
Migrate your existing project to a newer template while preserving your custom code:
cd your-existing-project
boilerbuilder migrate
Migration Process:
package.json
src_backup
and public_backup
folderspackage.json
with your project nameSafety Features:
src/
and public/
directories.git
and .github
folderspackage.json
Boilerbuilder dynamically fetches available templates from the GitHub repository. Current templates include:
Templates are maintained in the boilerplates repository and updated automatically.
boilerbuilder [options]
Options:
--name <name>
: Specify project name--type <type>
: Specify template type--version
: Show version information--help
: Display help informationboilerbuilder update
Functionality:
package.json
package.json
boilerbuilder migrate
Functionality:
To contribute to Boilerbuilder or run it locally:
Clone the repository:
git clone https://github.com/BoilerBuilder/boilerbuilder.git
cd boilerbuilder
Install dependencies:
yarn install
Check for existing global links:
# Check if boilerbuilder is already linked
npm list -g --depth=0 | grep boilerbuilder
# or
which boilerbuilder
Remove existing link (if found):
npm unlink -g boilerbuilder
Link for local development:
npm link
Test the CLI:
boilerbuilder --help
boilerbuilder --version
# Run E2E tests to validate functionality
npm test
# Test specific functionality
boilerbuilder --name test-project --type react-spa-vite
Development Workflow:
# Complete setup from scratch
git clone https://github.com/BoilerBuilder/boilerbuilder.git
cd boilerbuilder
yarn install
# Check and remove existing links
npm list -g --depth=0 | grep boilerbuilder
npm unlink -g boilerbuilder # if exists
# Create development link
npm link
# Test your changes
boilerbuilder --name test-project --type react-spa-vite
# Clean up when done
npm unlink -g boilerbuilder
Troubleshooting:
npm install -g yarn
src/
directorynpm link
src/index.js
: Main CLI entry point with Commander.js and enhanced error handlingsrc/commands/createProject.js
: Project creation logic with interactive promptssrc/commands/migrateProject.js
: Project migration functionality with backup systemsrc/commands/updateDependencies.js
: Dependency update management with diff tablessrc/services/
: Business logic services for templates, files, git operations, and validationsrc/utils/
: Pure utility functions for error handling, logging, and path operationssrc/config/
: Configuration constants and validation schemastests/
: Comprehensive E2E testing suite with bash scriptsBoilerbuilder includes comprehensive E2E tests to ensure reliability and maintain backward compatibility:
# Run all E2E tests
npm test
# Run with verbose output for debugging
npm run test:verbose
# Clean up test files
npm run test:cleanup
# List current test projects
npm run test:list
# For CI/CD environments
npm run test:ci
The testing suite validates all core functionality:
.temp/
directory (gitignored)Recent architectural improvements provide:
Boilerbuilder uses a centralized template system:
/templates/{template-name}/
templates.js
file lists available templatesEach template follows this structure:
templates/
βββ template-name/
βββ package.json # Dependencies and scripts
βββ src/ # Source code
βββ public/ # Static assets
βββ ... # Template-specific files
To add a new template to the system:
templates.js
package.json
includes proper keywords for detection1. Template Download Fails
NΓ£o foi possΓvel buscar os templates:
react-spa-vite
template2. Migration Issues
Erro ao migrar o projeto:
src/
and public/
directories exist3. Dependency Update Issues
Erro ao atualizar dependΓͺncias:
package.json
exists and is valid JSON4. Template Download Issues
Erro ao baixar o template [template-name] : [error details]
5. Update Command Not Finding Project Type
Tipo de projeto nΓ£o encontrado.
package.json
keywords"keywords": ["react-spa-vite"]
to your package.json
We welcome contributions to Boilerbuilder! Here's how you can help:
git checkout -b feature/amazing-feature
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
Help improve documentation by:
Boilerbuilder is released under the ISC License. See the LICENSE file for more details.
If you have questions, issues, or feature requests:
Happy coding with Boilerbuilder! π
BIIRRRLLLL!!! πͺ
Made with β€οΈ by Gabriel Mule
FAQs
A Boilerbuilder, to boilerbuild aesthetics projects!
We found that boilerbuilder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socketβs new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.