|
| 1 | +--- |
| 2 | +title: Text to Blazor upgraded to use best coding LLMs |
| 3 | +summary: Text to Blazor now generates CRUD Apps using best coding models from Google, Anthropic, Meta, DeepSeek & Mistral |
| 4 | +tags: [okai,ai,autoquery,blazor,vue] |
| 5 | +author: Demis Bellot |
| 6 | +image: ./img/posts/text-to-blazor/bg.webp |
| 7 | +--- |
| 8 | + |
| 9 | +## 100+ Blazor CRUD Apps Created! |
| 10 | + |
| 11 | +Since [Text to Blazor's announcement](/posts/text-to-blazor) in ServiceStack's last release we're happy |
| 12 | +to report that more than 100+ Blazor CRUD Apps have been created and downloaded! |
| 13 | + |
| 14 | +<div class="flex justify-center"> |
| 15 | + <lite-youtube class="w-full mx-4 my-4" width="560" height="315" videoid="Bd283EYJKxM" style="background-image: url('https://img.youtube.com/vi/Bd283EYJKxM/maxresdefault.jpg')"></lite-youtube> |
| 16 | +</div> |
| 17 | + |
| 18 | +Text to Blazor harnesses the power of AI to instantly generate new Blazor Admin CRUD Apps from just a text description. |
| 19 | + |
| 20 | +[](/text-to-blazor) |
| 21 | + |
| 22 | +<div class="pb-4 not-prose flex justify-center"> |
| 23 | +<a href="https://servicestack.net/text-to-blazor" class="text-3xl text-indigo-600 hover:text-indigo-800">https://servicestack.net/text-to-blazor</a> |
| 24 | +</div> |
| 25 | + |
| 26 | +## Text to Blazor now utilizing world's best coding models |
| 27 | + |
| 28 | +This will query 5 different high quality AI coding models to generate 5 different Data Models, APIs, DB Migrations and Admin UIs which you can browse to find the one that best matches your requirements. |
| 29 | + |
| 30 | +After the positive reception we've received from Text to Blazor we've now upgraded it to use the best |
| 31 | +dense (i.e. non-thinking) coding LLMs from leading AI and OSS companies: |
| 32 | + |
| 33 | + - **Google** - Gemini 2.5 Pro |
| 34 | + - **Anthropic** - Claude 3.7 Sonnet |
| 35 | + - **Meta** - Llama 4 Maverick (400B) |
| 36 | + - **DeepSeek** - DeepSeek V3 (685B) |
| 37 | + - **Mistral** - Codestral (22B) |
| 38 | + |
| 39 | +Which routinely top [Aider's LLM Leaderboards](https://aider.chat/docs/leaderboards/) that's also amongst |
| 40 | +the most popular LLMs used for programming on [Open Router](https://openrouter.ai): |
| 41 | + |
| 42 | +[]([/text-to-blazor](https://openrouter.ai/rankings/programming?view=day)) |
| 43 | + |
| 44 | +Which you can choose from to download the best Data Models to use for your new CRUD App: |
| 45 | + |
| 46 | +[](/text-to-blazor) |
| 47 | + |
| 48 | +### Using AI to only generate Data Models |
| 49 | + |
| 50 | +Whilst the result is a working CRUD App, the approach taken is very different from most AI tools |
| 51 | +which uses AI to generate the entire App that ends up with a whole new code-base developers didn't write |
| 52 | +which they'd now need to maintain. |
| 53 | + |
| 54 | +Instead AI is only used to generate the initial Data Models within a **TypeScript Declaration file** |
| 55 | +which we've found is the best format supported by AI models that's also the best typed DSL for defining |
| 56 | +data models with minimal syntax that's easy for humans to read and write. |
| 57 | + |
| 58 | +### Download preferred Blazor Vue CRUD App |
| 59 | + |
| 60 | +Once you've decided on the Data Models that best matches your requirements, you can download your preferred |
| 61 | +generated Blazor Vue CRUD App: |
| 62 | + |
| 63 | +[](/text-to-blazor) |
| 64 | + |
| 65 | +### Blazor Admin App |
| 66 | + |
| 67 | +**Admin Only** - is ideal for internal Admin Apps where the Admin UI is the Primary UI |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | +### Blazor Vue App |
| 72 | + |
| 73 | +**UI + Admin** - Creates a new [blazor-vue](https://blazor-vue.web-templates.io) template that's ideal |
| 74 | +for Internet or public facing Apps, sporting a full-featured public facing UI for a Web App's |
| 75 | +users whilst enabling a back-office CRUD UI for Admin Users to manage their App's data. |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | +Clicking on the **Admin UI** button will take you to the Admin UI at `/admin`: |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +## Run Migrations |
| 85 | + |
| 86 | +In order to create the necessary tables for the new functionality, you'll need to run the DB Migrations. |
| 87 | + |
| 88 | +If migrations have never been run before, you can run the `migrate` npm script to create the initial database: |
| 89 | + |
| 90 | +:::sh |
| 91 | +npm run migrate |
| 92 | +::: |
| 93 | + |
| 94 | +If you've already run the migrations before, you can run the `rerun:last` npm script to drop and re-run the last migration: |
| 95 | + |
| 96 | +:::sh |
| 97 | +npm run rerun:last |
| 98 | +::: |
| 99 | + |
| 100 | +Alternatively you can nuke the App's database (e.g. `App_Data/app.db`) and recreate it from scratch with `npm run migrate`. |
| 101 | + |
| 102 | +## Instant CRUD UI |
| 103 | + |
| 104 | +After running the DB migrations, you can hit the ground running and start using the Admin UI to manage the new |
| 105 | +Data Model RDBMS Tables: |
| 106 | + |
| 107 | +:::youtube 8buo_ce3SNM |
| 108 | +Using AutoQuery CRUD UI in a Text to Blazor App |
| 109 | +::: |
| 110 | + |
| 111 | +### Create new Records from Search Dialog |
| 112 | + |
| 113 | +We're continually improving the UX of the [AutoQueryGrid Component](/vue/autoquerygrid) used in generating CRUD UIs to enable a more productive and seamless workflow. A change added to that end that you can see in the above video is the ability to add new Records from a Search dialog: |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +This now lets you start immediately creating new records without needing to create any lookup entries beforehand. |
| 118 | + |
| 119 | +## Audited Data Models |
| 120 | + |
| 121 | +The TypeScript Data Models enable a rapid development experience for defining an App's Data Models which are used |
| 122 | +to generate the necessary AutoQuery CRUD APIs to support an Admin UI. |
| 123 | + |
| 124 | +An example of the productivity of this approach is the effortless support for maintaining a detailed audit history for changes to select tables by inheriting from the `AuditBase` base class, e.g: |
| 125 | + |
| 126 | +```ts |
| 127 | +export class Job extends AuditBase { |
| 128 | + ... |
| 129 | +} |
| 130 | +``` |
| 131 | + |
| 132 | +Which can then be regenerated using the name of the TypeScript Model definitions: |
| 133 | + |
| 134 | +:::sh |
| 135 | +npx okai Jobs.d.ts |
| 136 | +::: |
| 137 | + |
| 138 | +This will include additional `CreatedBy`, `CreatedDate`, `ModifiedBy`, `ModifiedDate`, `DeletedBy` and `DeletedDate` |
| 139 | +properties to the specified Table and also generates the necessary |
| 140 | +[Audit Behaviors](https://docs.servicestack.net/autoquery/crud#apply-generic-crud-behaviors) |
| 141 | +on the AutoQuery APIs to maintain the audit history for each CRUD operation. |
| 142 | + |
| 143 | +### AutoQuery CRUD Audit Log |
| 144 | + |
| 145 | +As the **blazor-admin** and **blazor-vue** templates are configured to use the [AutoQuery CRUD Executable Audit Log](https://docs.servicestack.net/autoquery/audit-log) |
| 146 | +in its [Configure.AutoQuery.cs](https://github.com/NetCoreTemplates/blazor-admin/blob/main/MyApp/Configure.AutoQuery.cs) |
| 147 | +the Audit Behaviors will also maintain an Audit Trail of all CRUD operations which can be viewed in the Admin UI: |
| 148 | + |
| 149 | + |
| 150 | + |
0 commit comments