QuizDSL Studio is an advanced end-to-end ecosystem for Model-Driven Software Development (MDSD). It leverages a custom Domain-Specific Language (DSL) built with Xtext, orchestrated by an ASP.NET Core 10 management studio, and powered by Local LLMs (Ollama) to transform natural language prompts into fully functional Python/Flask web applications.
1. AiModel
The AI intelligence layer. This folder contains the blueprints for the LLM to understand and write our custom DSL.
Modelfile: The configuration to build thequiz-mastermodel (base ongemma3:12b) in Ollama.dotnethub.quiz: A real-world example of DSL code generated by the AI based on a complex Farsi prompt for a .NET Developer assessment platform.dotnethub/: The final generated source code (Python/Flask) produced from the DSL.
The core grammar and language infrastructure.
org.example.quiz: The base project containing the Xtext Grammar (QuizDSL.xtext) and the Ecore Metamodel.QuizDSLGenerator.java: The Xtend-based transformation engine that converts DSL models into Python code.QuizCompiler.java: The source for the standalone compiler tool used to build the.jarbinary.model/generated/: Contains the Ecore Metamodel and the Generated Class Diagram (quizDSL class diagram.png).
3. ModelManager
The "Studio" — A modern web dashboard built with ASP.NET Core 10.
- Orchestration: Manages the lifecycle of a quiz: AI Prompting → DSL Generation → Java Compilation → Python Execution.
- Background Jobs: Uses Hangfire to manage long-running compilation and AI tasks.
- Static Assets: Contains
QuizCompiler.jar(the transpiler) and the UI built with Bootstrap.
The Eclipse Runtime workspace used during development to test the DSL editor, providing live validation and syntax highlighting for .quiz files.
The project implements a 4-tier pipeline:
- Natural Language Input: User provides a prompt (e.g., "Create a Senior .NET quiz with Vazir font and dark theme").
- AI Generation (Ollama): The
quiz-mastermodel interprets the prompt and writes syntactically correct.quizcode. - DSL Compilation (Java): The
QuizCompiler.jar(Xtext/Xtend) parses the model and generates a Python/Flask web app. - Deployment: The Studio executes the Python app on a dedicated port and captures an automated preview screenshot.
The current implementation is pre-configured for Persian (RTL) environments. While it's not a "one-click" setting yet, the framework is architecturally ready for global use:
- AI Adaptability: To switch languages, the
Modelfilecan be edited to retrain the LLM's prompting logic for English DSL generation. - Code Generation: The Xtend Transformer code is modular, allowing developers to modify the templates to generate LTR layouts and English UI components.
- Customization: By editing the core generator logic and the AI blueprints, the entire pipeline can be repurposed for any language or regional requirement.
See the QuizDSL Studio in action: From AI prompting to automated DSL generation and web deployment.
ModelManager.mp4
💡 Visual Overview:
- DSL-Generated Live Demo: Watch how the DSL transforms into a functional website.
- Live Monitoring & Process Control: Real-time logs and easy build management.
- Another Perspective: Switching between different generated models seamlessly.
The language is formally defined using an Ecore metamodel. You can find the visual representation here:
The grammar supports:
- Multiple Quiz levels (Junior, Mid-level, Senior).
- Dynamic scoring and variable time limits per difficulty.
- UI Customization (Fonts like "Vazirmatn", Themes, Shuffling).
- Ollama: For AI features.
- Java JRE 21+: To run the compiler.
- ASP.NET Core 10 Runtime: To run the Studio.
- Python 3.x: To run the generated apps.
cd AiModel
ollama create quiz-master -f Modelfile
- Navigate to
ModelManager/. - Ensure
QuizCompiler.jaris present in the root. - Run the application:
dotnet run --urls "http://localhost:5005"
Access the dashboard at http://localhost:5005. Create a "New Model", enter your prompt, and click Generate by AI followed by Build Model.
"A platform named 'DotNetHub' for assessing developers. Include 3 levels: Basic (Junior), Medium (Mid-level), and Advanced (Senior). 5 questions each. Scoring out of 20. Advanced level must be very difficult. Time limits: 3, 4, and 5 minutes respectively. Use 'Vazirmatn' font and a .NET-themed UI."
- Xtext/Xtend - Language Development & Code Generation
- ASP.NET Core 10 - Management Dashboard
- Ollama (LLM) - Local AI Orchestration
- Python/Flask - Target Runtime Environment
- Hangfire - Background Job Processing
Developed by Ali Soleimani
