kalicr / magento2-helloworld
A simple Hello World module for Magento 2 - Demo for Packagist
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:Shell
Type:magento2-module
pkg:composer/kalicr/magento2-helloworld
Requires
- php: ~7.4.0||~8.1.0||~8.2.0
- magento/framework: >=102.0.0
- magento/module-backend: >=102.0.0
- magento/module-store: >=101.0.0
This package is auto-updated.
Last update: 2026-01-07 17:41:42 UTC
README
A simple and elegant Hello World module for Magento 2, created to demonstrate best practices for module development and Packagist publication.
🚀 Features
- ✅ Clean and modern UI with gradient design
- ✅ Frontend route:
/helloworld - ✅ Custom block with helper methods
- ✅ Fully styled template with responsive CSS
- ✅ Complete Magento 2 module structure
- ✅ PSR-4 autoloading
- ✅ Ready for Packagist.org publication
📋 Requirements
- Magento 2.4.x
- PHP 7.4, 8.1, or 8.2
- Composer
📦 Installation
Method 1: Via Composer (Recommended)
composer require kalicr/magento2-helloworld php bin/magento module:enable Kalicr_HelloWorld php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento cache:flush
Method 2: Manual Installation
- Create directory:
app/code/Kalicr/HelloWorld - Download and extract the module files into this directory
- Run the following commands:
php bin/magento module:enable Kalicr_HelloWorld php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento cache:flush
🎯 Usage
After installation, visit:
https://your-magento-site.com/helloworld
You'll see a beautiful Hello World page with:
- Module information
- Current date and time
- Feature list
- Installation instructions
📁 Module Structure
kalicr-magento2-helloworld/
├── Block/
│ └── HelloWorld.php # Block class with helper methods
├── Controller/
│ └── Index/
│ └── Index.php # Frontend controller
├── etc/
│ ├── module.xml # Module declaration
│ └── frontend/
│ └── routes.xml # Route configuration
├── view/
│ └── frontend/
│ ├── layout/
│ │ └── helloworld_index_index.xml # Layout XML
│ ├── templates/
│ │ └── helloworld.phtml # Template file
│ └── web/
│ └── css/
│ └── helloworld.css # Styles
├── composer.json # Composer configuration
├── registration.php # Module registration
├── README.md # This file
└── LICENSE # MIT License
🎨 Customization
Change the Welcome Message
Edit Block/HelloWorld.php:
public function getWelcomeMessage() { return __('Your Custom Message!'); }
Modify Styles
Edit view/frontend/web/css/helloworld.css to customize colors, fonts, and layout.
Add New Features
- Add methods to
Block/HelloWorld.php - Use them in
view/frontend/templates/helloworld.phtml - Style with
view/frontend/web/css/helloworld.css
🔧 Development
Running Tests
php bin/magento dev:tests:run unit
Code Standards
This module follows Magento coding standards. To check:
vendor/bin/phpcs --standard=Magento2 app/code/Kalicr/HelloWorld
📝 Changelog
Version 1.0.0 (2025-12-07)
- Initial release
- Frontend route implementation
- Custom block and template
- Responsive CSS design
- Complete documentation
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
👨💻 Author
David Gamboa
- Email: dgamboa@kalicr.com
- Company: Kalicr
🙏 Acknowledgments
- Magento 2 Documentation
- Magento Community
- Packagist.org
📞 Support
If you encounter any issues or have questions, please:
- Check the documentation
- Search for existing issues
- Create a new issue if needed
🔗 Links
Made with ❤️ by David Gamboa - Kalicr © 2025