
AI Recipe Generator
The AI Recipe Generator GSoC project, highlighting the development of AI-powered Drupal recipe creation, the Smart Editor, and tools for non-technical users to build websites faster.
Welcome to our journey here!
This blog has all the details what we have done here. Before we start out, let me provide you with all the master links which might be super useful for you:
Module Site - Config Chef - AI Recipe Generator
If you need any help with Proposal or any more questions, feel free to reach out to me on LinkedIn.
With that done, let's get started.
My Deliverables
composer require 'drupal/ai_recipe_generator:^1.0@beta'Project Abstract
What is Drupal?
Drupal is a free, open-source Content Management System (CMS) and digital experience platform built on PHP and Symfony. While platforms like WordPress focus heavily on out-of-the-box ease of use, Drupal is engineered as an enterprise-grade framework for building complex, data-heavy, and high-traffic website
About this project
The project was built with just one thing in mind - to help non-technical people with their Drupal development. So it sits at the heart of Drupal development. We use Drupal Recipes in order to enable this faster. Drupal Recipes are like website blueprints that will help you to build websites. But the main drawback here was that they are really technical to write!
Inorder to help them, we have built this solution which uses AI as the core backbone and empowers users to rapid build and prototype this! Aimed at helping thousands of people.
The features that I have made:
1). AI Recipe Chat: Pick a model, generate recipes via natural prompts, and use the Explain wand for instant breakdowns.
2). Smart Editor: Tweak code manually, validate YAML/schema rules, or let AI refine your changes with Apply Edits.
3). Preview, Export & Save: Inspect outputs live, download as .zip, or deploy directly to web/recipes/custom.
4). LLM Arena: Broadcast one prompt across multiple models to compare results side-by-side.
5). Site Context Aware: Pulls live Drupal architecture into prompts to eliminate duplicate fields and configs.
6). Master Prompting: Enforce system-level persona instructions globally across all AI requests.
7). Benchmarking Metrics: Track token latency, success rates, and model accuracy via visual dashboards.
Major Accomplishments
AI Chat Interface

The AI Chat Interface instantly translates plain English prompts into valid, YAML-compliant Drupal recipes while leveraging live site context to prevent duplicate fields. It features an intelligent editor with schema validation and AI-driven error correction, alongside an educational "Explain" wand that breaks down the generated configurations. Additionally, it enforces global system personas for consistent quality and streamlines deployment through live previews, direct server saves, and .zip exports.
AI Arena

The AI Arena facilitates simultaneous testing by broadcasting a single master prompt to multiple selected LLMs at once. This allows developers to evaluate outputs side-by-side and quickly determine which model generates the most accurate and compliant code.
LLM Benchmarker

The LLM Benchmarker features a visual analytics dashboard to track overall system and model performance. It effectively monitors key metrics, including total successful runs, average token latency, generation costs, and model accuracy.
Technical Challenge Overcame
Chat Interface Layout

Problem: Used a twig template, which caused rendering issues (data loading and UI) as it was difficult to manage.
Solution: Simplified the twig template, did the heavy lifting in the controller.
Impact: A smoother loading and transition, which was then scalable when had a lot of data in the database.
Markdown Paradox

If you are really curious I have a detailed blog with proper testing
Problem: The YAML directly returned by AI caused formatting issues when directly used.
Solution: Used a Drupal Module for YAML editing and built a custom parser.
Impact: The formatting and display of YAML became seamless.
Queries Multiple AI Models

Problem: Queries multiple AI Modules was resulting in higher processing time and code breakage.
Solution: Implemented the Drupal Batch API to query multiple models at once.
Impact: Users could now query multiple models parallelly to get which model performs best for their usecase.
Timeline Chart

I was my planned timeline of what I wanted to it. But in reality I completed things was sooner than the proposed timeline which gave me & my mentor space to work on further integration and adoption with newer versions of Drupal : )
Code Quality & Testing
This is the most important aspect while coding. Drupal has in depth version of testing and maintaining the code quality. I made sure that after each commit the pipeline was green so the code quality was upto standard.
1). Build Stage:
Composer Dependency Resolution: Installs and verifies project packages across baseline, maximum PHP versions, next minor Drupal releases, and previous major versions.
2). Validate Stage:
- Syntax & Asset Linting: Checks
composer.jsonsyntax (composer-lint), scans for typos (cspell), lints JavaScript (eslint), and validates stylesheets (stylelint). - Code Standards & Static Analysis: Enforces Drupal PHP coding standards (
phpcs) and detects bugs, type mismatches, and deprecations across environments (phpstan).
3). Test Stage:
- Automated Test Execution: Runs PHPUnit suites across baseline and compatibility matrices (maximum PHP version, next minor, and previous major Drupal releases) to ensure all tests pass.

Future Development
The scope of this project is complete. A further focus could be on working on the security patch. The work is in progress.
Acknowledgements
I would like to thank my mentor Rajas Samse along with the entire Drupal community as the whole for providing me with such a great opportunity to work and develop a useful application.
Kudos to them!
Useful Links / Sources
Please feel free to check my website or my other blog about Drupal Hope they provide you with some insight. In case of any questions feel free to reach out to me.
Thanks a lot!

Hrishikesh Dalal
Full-stack developer passionate about open-source software, web technologies, and building products that matter. Currently exploring Drupal ecosystem through Google Summer of Code. Interested in PHP, JavaScript, and system design.