π New in v2.0: Tool-Orchestration Architecture - Leverage industry-standard CLI tools for always up-to-date project generation!
A modern command-line tool that generates production-ready project structures by orchestrating industry-standard CLI tools (create-next-app, go mod init, etc.) with intelligent fallback generation.
Instead of maintaining templates, v2.0 delegates project generation to official framework tools:
- Next.js: Uses
create-next-appfor latest Next.js projects - Go: Uses
go mod initand official Go tooling - Android/iOS: Uses native tooling when available, falls back to minimal generation
- Always Current: Get the latest framework versions automatically
- β No Template Maintenance: Framework tools handle updates
- β Better Quality: Official tools generate best-practice code
- β Enhanced Logging: Comprehensive file logging with timestamps
- β Automatic Backups: Rollback on failure
- β Beautiful Output: Colored terminal output with status symbols
- β Security Scanning: Post-generation security checks
- β Offline Support: Works without internet after initial setup
# Using Go
go install github.com/cuesoftinc/open-source-project-generator/cmd/generator@latest
# From source
git clone https://github.com/cuesoftinc/open-source-project-generator
cd open-source-project-generator
make build
# Verify installation
generator --version# Verify required tools are installed
generator check-tools
# Output:
# β npx (v10.2.3) - Available
# β go (v1.21.0) - Available
# β gradle - Not found
# Install: https://gradle.org/install/# Create a configuration template
generator init-config --output project.yamlEdit project.yaml:
name: my-awesome-app
description: My full-stack application
output_dir: ./my-awesome-app
components:
- type: nextjs
name: web-app
enabled: true
config:
typescript: true
tailwind: true
app_router: true
- type: go-backend
name: api-server
enabled: true
config:
module: github.com/user/my-awesome-app
framework: gin
integration:
generate_docker_compose: true
generate_scripts: true
api_endpoints:
backend: http://localhost:8080
options:
use_external_tools: true
create_backup: true
verbose: false# Dry-run to see what will be generated
generator generate --config project.yaml --dry-run# Generate your project
generator generate --config project.yaml
# Output:
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Step 1/11: Validating configuration...
# β Configuration validation passed
# Step 2/11: Applying default configuration values...
# β Defaults applied successfully
# ...
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# PROJECT GENERATION COMPLETED
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β Project generated successfully in 45.2s
# Project Name: my-awesome-app
# Location: ./my-awesome-app
# Components: 2my-awesome-app/
βββ App/ # Next.js frontend (generated by create-next-app)
β βββ app/ # App router
β βββ components/ # React components
β βββ public/ # Static assets
β βββ package.json # Dependencies
β βββ next.config.js # Next.js configuration
βββ CommonServer/ # Go backend (generated by go mod init)
β βββ cmd/ # Application entry points
β βββ internal/ # Private application code
β βββ pkg/ # Public packages
β βββ go.mod # Go modules
β βββ main.go # Main application
βββ Mobile/ # Mobile applications
β βββ android/ # Android project (Gradle/Kotlin)
β βββ ios/ # iOS project (Xcode/Swift)
βββ Deploy/ # Infrastructure
β βββ docker/ # Docker configurations
β βββ k8s/ # Kubernetes manifests
βββ .logs/ # Generation logs
βββ docker-compose.yml # Docker Compose configuration
βββ .env # Environment variables
βββ README.md # Project documentation
βββ TROUBLESHOOTING.md # Troubleshooting guide
βββ build.sh # Build script
βββ dev.sh # Development script
βββ prod.sh # Production script
# fullstack.yaml
name: fullstack-app
output_dir: ./fullstack-app
components:
- type: nextjs
name: web-app
enabled: true
config:
typescript: true
tailwind: true
- type: go-backend
name: api-server
enabled: true
config:
module: github.com/user/fullstack-app
framework: gin
integration:
generate_docker_compose: true
generate_scripts: truegenerator generate --config fullstack.yaml# mobile-app.yaml
name: mobile-app
output_dir: ./mobile-app
components:
- type: android
name: mobile-android
enabled: true
config:
package: com.user.mobileapp
language: kotlin
- type: ios
name: mobile-ios
enabled: true
config:
bundle_id: com.user.mobileapp
language: swift
- type: go-backend
name: api-server
enabled: true
config:
module: github.com/user/mobile-app
framework: gin
integration:
generate_docker_compose: true
api_endpoints:
backend: http://localhost:8080generator generate --config mobile-app.yaml# frontend.yaml
name: my-frontend
output_dir: ./my-frontend
components:
- type: nextjs
name: web-app
enabled: true
config:
typescript: true
tailwind: true
app_router: true
integration:
generate_docker_compose: false
generate_scripts: truegenerator generate --config frontend.yaml# Generate projects
generator generate --config project.yaml # Generate from configuration
generator generate --config project.yaml --dry-run # Preview without creating files
# Environment validation
generator check-tools # Check tool availability
# Configuration
generator init-config --output project.yaml # Generate configuration template# Generation options
--config <file> # Configuration file path (required)
--dry-run # Preview generation without creating files
--verbose # Enable detailed logging
--no-external-tools # Force fallback generation
--create-backup # Create backup before generation
--stream-output # Stream tool output in real-time
--force-overwrite # Overwrite existing directories
# Output options
--output <dir> # Override output directory from config
--log-level <level> # Set log level (debug, info, warn, error)| Type | Description | Bootstrap Tool | Fallback Available |
|---|---|---|---|
nextjs |
Next.js frontend | create-next-app |
No |
go-backend |
Go backend API | go mod init |
No |
android |
Android mobile app | gradle |
Yes |
ios |
iOS mobile app | xcodebuild |
Yes |
Next.js Component:
- type: nextjs
name: web-app
enabled: true
config:
typescript: true # Use TypeScript
tailwind: true # Include Tailwind CSS
app_router: true # Use App Router
eslint: true # Include ESLintGo Backend Component:
- type: go-backend
name: api-server
enabled: true
config:
module: github.com/user/project # Go module path
framework: gin # Framework (gin, echo, chi)
database: postgres # Database (postgres, mysql, sqlite)Android Component:
- type: android
name: mobile-android
enabled: true
config:
package: com.user.app # Package name
language: kotlin # Language (kotlin, java)
min_sdk: 24 # Minimum SDK versioniOS Component:
- type: ios
name: mobile-ios
enabled: true
config:
bundle_id: com.user.app # Bundle identifier
language: swift # Language (swift, objc)
deployment_target: 15.0 # Minimum iOS versionintegration:
generate_docker_compose: true # Generate docker-compose.yml
generate_scripts: true # Generate build/run scripts
api_endpoints:
backend: http://localhost:8080 # Backend API endpoint
auth: http://localhost:8081 # Auth service endpointoptions:
use_external_tools: true # Use bootstrap tools (recommended)
create_backup: true # Create backup before generation
verbose: false # Enable verbose logging
stream_output: false # Stream tool output in real-time
force_overwrite: false # Overwrite existing directories
disable_parallel: false # Disable parallel component generation- All user inputs sanitized before processing
- Path traversal attack prevention
- Project name validation
- Post-generation security scan
- Detection of exposed secrets
- Identification of insecure configurations
- Security report generation
- Whitelisted tools and flags only
- Command injection prevention
- Timeout protection
- Sandboxed execution
- Automatic backups before generation
- Rollback on failure
- Backup restoration
- Cleanup of partial generations
All operations are logged to files:
# Log file location
./my-project/.logs/generation-20240101-120000.log
# Log format
[INFO] 2024-01-01 12:00:00 Starting project generation | project=my-app
[DEBUG] 2024-01-01 12:00:01 Sanitizing project name: my-app
[INFO] 2024-01-01 12:00:02 Tool discovery completed | component=nextjs
[INFO] 2024-01-01 12:00:05 Component generated successfully | component=web-app type=nextjs method=bootstrap duration=3.2sBeautiful, colored terminal output:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
PROJECT GENERATION COMPLETED
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Project generated successfully in 45.2s
Project Name: my-awesome-app
Location: ./my-awesome-app
Components: 2
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Generated Components
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
β web-app (nextjs) - bootstrap
β api-server (go-backend) - bootstrap
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Next Steps
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
β’ Navigate to: cd ./my-awesome-app
β’ Review the README.md for detailed instructions
β’ Run with Docker: docker-compose up
β’ Run development mode: ./dev.sh
Log File: ./my-awesome-app/.logs/generation-20240101-120000.logError: Required tool 'npx' not found
Solution:
# Install Node.js (includes npx)
brew install node # macOS
sudo apt-get install nodejs npm # UbuntuError: Component generation failed: nextjs
Solution:
1. Check the log file for details
2. Verify tool versions: generator check-tools
3. Try with verbose logging: --verbose
4. Use fallback generation: --no-external-toolsError: failed to create directory: permission denied
Solution:
# Ensure write permissions
chmod +w ./output-directory
# Or use a different output directory
generator generate --config project.yaml --output ~/projects/my-app- Changelog - What's new in v2.0
- Migration Guide - Migrating from v1.x
- Configuration Guide - Detailed configuration options
- CLI Reference - Complete command reference
- Troubleshooting - Common issues and solutions
- Security Guide - Security best practices
If you're upgrading from v1.x, see the Migration Guide for detailed instructions.
Quick migration steps:
- Backup existing projects
- Install required tools (
generator check-tools) - Convert configuration (template β components)
- Test with dry-run (
--dry-run) - Generate new project
We welcome contributions! Please see our Contributing Guide.
# Clone repository
git clone https://github.com/cuesoftinc/open-source-project-generator
cd open-source-project-generator
# Install dependencies
go mod download
# Build
make build
# Run tests
make test
# Run linter
make lint
# Check for version updates
make check-versions
# Update to latest versions
make update-versionsAll dependency versions are centrally managed in configs/versions.yaml. This provides a single source of truth for all framework and tool versions used in generated projects.
See configs/VERSIONS.md for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation
- π Issue Tracker
- π¬ Discussions
- Built with Go
- Uses Cobra for CLI
- Leverages official framework tools for generation
- Community feedback and contributions
Ready to generate your next project? Start with generator check-tools to verify your environment!