Professional Java project template demonstrating scalable architecture patterns
This is a REAL project at: https://github.com/bbushnell/HelloWorld
Why this matters:
- Permanent existence - Not lost when local disk fails
- Professional credibility - Real projects have real repositories
- Collaboration enabled - Others can clone, fork, and contribute
- History preserved - Every change tracked and recoverable
- CI/CD ready - GitHub Actions can run tests on every push
WARNING: Any "project" without a GitHub repository is just files playing pretend.
HelloWorld is a complete reference implementation showcasing professional Java project organization from simple tools to complex frameworks. This project serves as a working template for the Universal Project Organization patterns documented in the included guides.
# Clone the REAL repository
git clone https://github.com/bbushnell/HelloWorld.git
cd HelloWorld
sh compile.sh
# Run tools
sh hello.sh # Default greeting
sh hello.sh Alice # Custom greeting
sh world.sh # World information
sh run-tests.sh # Execute test suiteHelloWorld/
βββ README.md # This file - complete project documentation
βββ compile.sh # Build system with error handling
βββ hello.sh # HelloTool launcher with laptop-friendly defaults
βββ world.sh # WorldTool launcher
βββ run-tests.sh # Professional test runner
βββ hello/ # Primary package
β βββ HelloTool.java # Main greeting generator
β βββ HelloUtils.java # Time-aware greeting utilities
β βββ *.class # Compiled classes (generated)
βββ world/ # Secondary package (demonstrates multi-package)
β βββ WorldTool.java # World information generator
β βββ WorldUtils.java # Global statistics utilities
β βββ *.class # Compiled classes (generated)
βββ api/ # Generated API documentation
β βββ package_hello.api # Hello package API
β βββ package_world.api # World package API
βββ testCases/ # Test infrastructure
β βββ hello_basic/ # Basic HelloTool functionality test
β βββ world_basic/ # Cross-package interaction test
βββ reports/ # Test outputs and analysis results
βββ old/ # Archives (never delete - always archive)
βββ lib/ # External dependencies (empty for this example)
- Multi-package architecture:
hello/andworld/packages - Cross-package dependencies: WorldTool uses HelloUtils
- Professional test suite: Automated test execution with reporting
- API documentation: Package-level APIs for framework understanding
- Laptop-friendly defaults: 512MB heap instead of cluster-scale memory
Professional greeting generator with customizable names and time-aware selection.
sh hello.sh # Hello, World!
sh hello.sh Alice # Hi, Alice! (varies by time)
sh hello.sh --name=Bob --verbose # Verbose greeting with detailed output
sh hello.sh --help # Complete usage informationFeatures:
- Time-aware greeting selection (Good morning, Hello, Good evening)
- Input sanitization and validation
- Professional argument parsing
- Comprehensive error handling
- Assertion-based defensive programming
World information generator demonstrating cross-package interaction.
sh world.sh # World statistics and greeting
sh world.sh --verbose # Detailed execution information
sh world.sh --help # Complete usage informationFeatures:
- Global population statistics (8.1 billion people)
- Major world languages with speaker counts
- Continental distribution data
- Cross-package integration with HelloUtils
- Professional output validation
Professional test runner with detailed reporting and validation.
sh run-tests.sh # Run all tests
sh run-tests.sh --test hello_basic # Run specific test
sh run-tests.sh --verbose # Detailed test execution
sh run-tests.sh --help # Complete usage informationFeatures:
- Automated test discovery and execution
- Content validation and format checking
- Professional test reporting with timing
- Output capture and analysis
- Comprehensive error diagnosis
Unlike cluster-oriented tools, HelloWorld uses reasonable defaults for development laptops:
- Memory: 512MB max heap (not 84% of system RAM)
- Assertions: Enabled by default for development
- Timeouts: 30-second test timeouts
- No external dependencies: Pure Java with standard library
- Error handling: Helpful messages for common issues
Each test case includes:
test_metadata.json- Test configuration and validation rulesexpected_output.txtorexpected_pattern.txt- Expected resultsREADME.md- Test documentation and success criteria
- hello_basic: Validates HelloTool default functionality
- world_basic: Tests cross-package interaction and WorldTool output
- Automatic compilation verification
- Content validation based on test type
- Error output analysis
- Performance timing
- Detailed failure reporting
api/package_hello.api: Hello package classes and methodsapi/package_world.api: World package classes and methods
API files provide token-efficient documentation for AI frameworks:
- Method signatures without implementation details
- Cross-package dependency mapping
- Public interface documentation
- Usage patterns and examples
- Comprehensive assertions in all methods
- Input validation and sanitization
- Professional error handling
- Proper exception propagation
- BBTools-style directory resolution
- Laptop-friendly memory defaults
- Graceful error handling
- Consistent argument parsing
- WorldTool imports and uses HelloUtils
- Proper classpath configuration
- Dependency validation in shell scripts
- Professional test runner implementation
- Content validation strategies
- Automated test discovery
- Comprehensive reporting
# Compile project
sh compile.sh
# Generate greeting
sh hello.sh
# Output: Hello, World!
# Custom name
sh hello.sh "Alice"
# Output: Hi, Alice! (varies by time of day)
# World information
sh world.sh
# Output: Greeting + comprehensive world statistics
# Run tests
sh run-tests.sh
# Output: Professional test execution report# Memory configuration
sh hello.sh Bob -Xmx1g # 1GB heap for greeting
sh world.sh -Xms512m -Xmx2g # Custom memory configuration
# Assertion control
sh hello.sh Alice -da # Disable assertions
sh world.sh -ea # Enable assertions (default)
# Verbose execution
sh hello.sh --verbose Charlie # Detailed execution information
sh world.sh --verbose # Show launcher details
# Test execution
sh run-tests.sh --verbose # Detailed test output
sh run-tests.sh --test hello_basic # Specific test execution- Create new package directory (e.g.,
newpackage/) - Implement Java classes with proper assertions
- Create shell script launcher following existing patterns
- Add test cases in
testCases/ - Generate API documentation
- Update README.md
HelloWorld demonstrates the base pattern that scales to complex frameworks:
- Add
configure.shfor external dependencies - Include
lib/directory for JARs - Add professional auxiliary scripts (
javasetup.sh,memdetect.sh) - Expand test infrastructure
- Generate comprehensive
project.api
This repository includes complete project organization guides:
- DocumentationGuide.md: Haiku test compliance and documentation excellence standards (PRINCIPLE #11)
- Languages.md: Java-first development policy and technology stack decisions
- ProjectGuide.md: Universal scalable project structure
- ShellScriptGuide.md: Professional shell script patterns
- FunctionalityGuide.md: Systematic functionality investigation
- GitGuide.md: Essential git commands for AI systems (because AIs constantly mess this up)
A successful HelloWorld deployment should:
- β Exist on GitHub - Not just local pretend repository
- β Have .gitignore - Prevent accidental commits of build artifacts
- β Regular commits - History shows development progress
- β
Compile without errors using
compile.sh - β Execute both tools successfully
- β Pass all tests in the test suite
- β Generate proper API documentation
- β Demonstrate cross-package interaction
- β Follow professional development patterns
HelloWorld serves as the canonical reference for professional Java project organization, demonstrating patterns that scale from simple tools to complex frameworks.