NeuroBlock
AI Generator to Create Custom Gutenberg Blocks and WordPress Pages Using Your Own API
by Papyrus - Starlight Pro Agency · github.com/josephroyaleagle/neuroblock · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/josephroyaleagle/neuroblock/archive/refs/heads/main.zipAI-Powered WordPress Extension for Generating Custom Blocks and Pages
Version: 1.0.0
Author: Papyrus - Starlight Pro Agency
License: GPL v2 or later
📋 Description
NeuroBlock is a modern and powerful WordPress plugin that allows you to automatically generate custom pages and blocks for Gutenberg and Elementor using artificial intelligence models.
✨ Key Features
- 🎨 Automatic Content Generation: Create Gutenberg blocks and Elementor widgets in seconds
- 🔒 100% Secure: Your API keys are encrypted with WordPress salts
- 💰 Completely Free: Use your own AI API (no subscription fees)
- 🌐 Multi-Platform: Compatible with OpenAI, DeepSeek, Google Gemini, and Mistral AI
- 🎯 Modern Interface: Elegant and easy-to-use dashboard
- 🚀 Optimized: Lightweight and performant code
- 🌍 Multilingual: Available in English and French
🚀 Installation
Method 1: Manual Installation
- Download the plugin ZIP file
- Go to Plugins → Add New
- Click Upload Plugin
- Select the ZIP file and click Install Now
- Activate the plugin
Method 2: FTP Installation
- Unzip the ZIP file
- Upload the
neuroblockfolder to/wp-content/plugins/ - Activate the plugin from the WordPress Plugins menu
⚙️ Configuration
1. Get an API Key
OpenAI (Recommended)
- Create an account at platform.openai.com
- Go to API Keys
- Create a new secret key
- Copy the key (format:
sk-...)
Cost: Pay-as-you-go (~$0.002 per generation)
DeepSeek (Budget-Friendly)
- Create an account at platform.deepseek.com
- Generate an API key
- Copy the key
Cost: Very affordable
Google Gemini
- Create an account at makersuite.google.com
- Get an API key
- Copy the key
Cost: Free tier available
Mistral AI (European)
- Create an account at console.mistral.ai
- Generate an API key
- Copy the key
Cost: Competitive pricing
2. Configure NeuroBlock
- Go to NeuroBlock in the WordPress menu
- Select your AI provider
- Enter your API key
- Choose a model:
- OpenAI: gpt-4 (best quality) or gpt-3.5-turbo (faster)
- DeepSeek: deepseek-chat or deepseek-coder
- Mistral: mistral-large (best) or mistral-small (fast)
- Gemini: gemini-pro
- Click Save Settings
🎯 Usage
Generate a Gutenberg Block
- Go to the Generator tab
- Describe what you want to create
- Select Gutenberg Block as type
- Choose a style (Modern, Minimalist, etc.)
- Click Generate with AI
- HTML/CSS code is generated automatically
- Copy-paste into a Custom HTML block
Generate a Complete Page
- Go to the Generator tab
- Describe your page (e.g., "Landing page for a mobile app")
- Select Complete Page
- Generate and use the code
Example Prompts
Hero Section
Create a modern hero section with a catchy title "Revolutionize Your Business",
a subtitle, and a purple CTA button. Minimalist design with gradient background.
Pricing Table
Create a pricing table with 3 columns (Starter, Pro, Enterprise),
including prices, feature lists, and action buttons. Professional style.
Contact Form
Create an elegant contact form with name, email, subject, and message fields.
Include visual validation and submit button with hover effect.
Feature Grid
Create a 3-column feature grid with icons, titles, and descriptions.
Features: Speed, Security, Support. Modern card design with shadows.
Complete Landing Page
Create a landing page for a SaaS product with:
- Hero section with product screenshot
- 3 key features with icons
- Pricing table (Free, Pro, Enterprise)
- Testimonials section
- CTA footer
📁 File Structure
neuroblock/
│
├── neuroblock.php # Main file
├── README.md # Documentation
├── LICENSE # GPL v2 license
├── icon.svg # Plugin icon
├── build.sh # Build script
├── verify-files.sh # Verification script
│
├── assets/
│ ├── css/
│ │ ├── neuroblock-admin.css # Admin styles
│ │ ├── neuroblock-blocks.css # Frontend block styles
│ │ └── neuroblock-blocks-editor.css # Gutenberg editor styles
│ │
│ └── js/
│ ├── neuroblock-admin.js # Admin JavaScript
│ └── neuroblock-blocks.js # Gutenberg blocks JavaScript
│
├── includes/
│ ├── class-neuroblock-admin.php # Admin interface
│ ├── class-neuroblock-api.php # API handler
│ ├── class-neuroblock-blocks.php # Gutenberg blocks
│ ├── class-neuroblock-security.php # Security & encryption
│ ├── admin-page-template.php # Admin page template
│ │
│ └── elementor/
│ └── class-neuroblock-elementor-widget.php # Elementor widget
│
└── languages/
├── neuroblock.pot # Translation template
├── neuroblock-fr_FR.po # French translation
└── neuroblock-fr_FR.mo # Compiled French translation
🔒 Security
NeuroBlock takes security seriously:
- ✅ AES-256 encryption of API keys
- ✅ Uses WordPress salts
- ✅ Nonce verification for all AJAX requests
- ✅ Sanitization of all user inputs
- ✅ No data stored on third-party servers
- ✅ Code compliant with WordPress standards
🛠️ Development
Prerequisites
- PHP 7.4+
- WordPress 5.8+
opensslPHP extension enabled
Building the Plugin
# Verify all files are present
./verify-files.sh
# Build the plugin (compile translations + create ZIP)
./build.sh
The distributable ZIP will be created at: dist/neuroblock-1.0.0.zip
Available Hooks
// Filter prompt before API call
add_filter('neuroblock_prompt', function($prompt, $type, $style) {
return $prompt . "\nUse vibrant colors.";
}, 10, 3);
// Action after successful generation
add_action('neuroblock_content_generated', function($content, $type) {
// Your code here
}, 10, 2);
🎨 Design Styles
NeuroBlock offers 6 predefined design styles:
- Modern: Clean lines, gradients, shadows
- Minimalist: Simple, lots of white space
- Professional: Business-oriented, formal
- Creative: Bold, unique, artistic
- Elegant: Refined, sophisticated
- Classic: Traditional, timeless
💡 Tips for Best Results
Be Specific
❌ "Create a button"
✅ "Create a blue gradient button with white text and rounded corners"
Mention Style
Include style keywords: "modern", "minimalist", "elegant"
Include Details
Specify sizes, colors, layouts, and element positions
Use Examples
"Like Airbnb's hero section" or "Similar to Stripe's pricing table"
📊 Performance
Generation Times
- Simple block: 5-15 seconds
- Complex block: 10-20 seconds
- Complete page: 30-60 seconds
Cost Estimates (OpenAI)
- gpt-3.5-turbo: ~$0.002 per block
- gpt-4: ~$0.03 per block
Optimization
- Use smaller models for simple blocks
- Use larger models for complex pages
- Be specific in prompts to reduce retries
🌍 Internationalization
NeuroBlock is fully translatable and comes with:
- English (default)
- French (Français)
Adding a Translation
- Copy
languages/neuroblock.pot - Rename to
neuroblock-[locale].po(e.g.,neuroblock-es_ES.po) - Translate using Poedit or similar tool
- Compile to
.mofile:msgfmt neuroblock-es_ES.po -o neuroblock-es_ES.mo - Place in
languages/folder
❤️ Support & Donations
NeuroBlock is free and open source. If you find this plugin useful, you can support development:
Accepted Cryptocurrencies
Bitcoin (BTC) - Recommended
bc1qxlk60lzk5uxk8qlvdzv8qtdndhxkzj5z48vd9q
Monero (XMR)
4BGPRrrZvAi8hqKVHfM5pi2MGwTFfBqeXQe8WuUp94QRdxanQfd8FxCCsY9XqQgHwaCoGNLrSokz6KXWVZWPELVLAZ9tYG7
Tether (USDT)
TCY64QwdZjQV4WEn91EuoBUoZnpzPvCboF
🐛 Troubleshooting
Plugin won't activate
Solution: Check PHP version (must be 7.4+) and ensure OpenSSL extension is enabled
API calls fail
Solutions:
- Verify API key is correct
- Check internet connection
- Ensure provider endpoint is accessible
- Check WordPress error logs
SweetAlert doesn't appear
Solutions:
- Clear browser cache
- Check browser console for JavaScript errors
- Ensure jQuery is loaded
Translations don't work
Solutions:
- Regenerate .mo file from .po
- Check file permissions
- Verify locale matches WordPress setting
Elementor widget doesn't appear
Solutions:
- Ensure Elementor is installed and activated
- Clear Elementor cache
- Regenerate Elementor CSS
📝 Changelog
Version 1.0.0 (2025-01-15)
- 🎉 Initial release
- ✨ Support for OpenAI, DeepSeek, Gemini, Mistral AI
- 🎨 Modern admin interface
- 🔒 API key encryption
- 📦 Gutenberg blocks
- 🚀 AI content generator
- 🌍 English and French translations
🤝 Contributing
Contributions are welcome! To contribute:
- Fork the project
- Create a branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push (
git push origin feature/AmazingFeature) - Open a Pull Request
Coding Standards
- Follow WordPress Coding Standards
- Comment your code
- Test thoroughly before submitting
📄 License
This project is licensed under GPL v2 or later.
See LICENSE file for details.
🔗 Useful Links
- Website: https://starlightproagency.com
- Support: info@starlightproagency.com
- Documentation: See DEPLOYMENT.md for deployment guide
- Quick Start: See QUICK-START.md for 5-minute setup
- Testing: See TEST-CHECKLIST.md for complete testing
🙏 Acknowledgments
- WordPress community for excellent documentation
- OpenAI, DeepSeek, Google, and Mistral for AI APIs
- SweetAlert2 for beautiful notifications
- All contributors and supporters
📱 Screenshots
Admin Dashboard

Generator Interface

Generated Block Example

🎓 FAQ
Is NeuroBlock really free?
Yes! NeuroBlock itself is 100% free and open source. You only pay for your AI API usage (directly to the provider).
Which AI provider is best?
- OpenAI: Best quality, higher cost
- DeepSeek: Great balance of quality and cost
- Mistral: European alternative, good quality
- Gemini: Google's offering, free tier available
Can I use NeuroBlock without an API key?
No, you need an API key from at least one supported provider.
Is my API key safe?
Yes! Your API key is encrypted using AES-256 with WordPress salts and stored securely in your database.
Can I generate pages in other languages?
Yes! Just write your prompt in the desired language, and the AI will generate content in that language.
Does NeuroBlock work with page builders?
Yes! NeuroBlock supports both Gutenberg (default WordPress editor) and Elementor.
Can I edit generated content?
Absolutely! Generated content is standard HTML/CSS that you can edit as needed.
Is there a limit to generations?
No limits from NeuroBlock. Your only limit is your AI provider's API quota.
Developed with ❤️ by Papyrus - Starlight Pro Agency
Transform your WordPress content creation with AI! 🚀