You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Upgradable to `DatabaseJobsFeature` for enterprise RDBMS
92
+
-Uses monthly rolling Sqlite databases by default - [Upgrade to PostgreSQL/SQL Server/MySQL](#upgrading-to-enterprise-database)
94
93
95
94
### 4. Developer Experience
96
95
-**Admin UI** at `/admin-ui` for App management
@@ -189,6 +188,7 @@ npm run test:run # Run tests once
189
188
dotnet test
190
189
```
191
190
191
+
192
192
## Configuration
193
193
194
194
### Key Configuration Files
@@ -269,6 +269,73 @@ npx add-in ef-postgres
269
269
npx add-in db-identity
270
270
```
271
271
272
+
## AutoQuery CRUD Dev Workflow
273
+
274
+
For Rapid Development simple [TypeScript Data Models](https://docs.servicestack.net/autoquery/okai-models) can be used to generate C# AutoQuery APIs and DB Migrations.
275
+
276
+
### Cheat Sheet
277
+
278
+
### Create a new Table
279
+
280
+
Create a new Table use `init <Table>`, e.g:
281
+
282
+
```bash
283
+
npx okai init Table
284
+
```
285
+
286
+
This will generate an empty `MyApp.ServiceModel/<Table>.d.ts` file along with stub AutoQuery APIs and DB Migration implementations.
287
+
288
+
### Use AI to generate the TypeScript Data Model
289
+
290
+
Or to get you started quickly you can also use AI to generate the initial TypeScript Data Model with:
291
+
292
+
```bash
293
+
npx okai "Table to store Customer Stripe Subscriptions"
294
+
```
295
+
296
+
This launches a TUI that invokes ServiceStack's okai API to fire multiple concurrent requests to frontier cloud
297
+
and OSS models to generate the TypeScript Data Models required to implement this feature.
298
+
You'll be able to browse and choose which of the AI Models you prefer which you can accept by pressing `a`
299
+
to `(a) accept`. These are the data models [Claude Sonnet 4.5 generated](https://servicestack.net/text-to-blazor?id=1764337230546) for this prompt.
300
+
301
+
#### Regenerate AutoQuery APIs and DB Migrations
302
+
303
+
After modifying the `Table.d.ts` TypeScript Data Model to include the desired fields, re-run the `okai` tool to re-generate the AutoQuery APIs and DB Migrations:
304
+
305
+
```bash
306
+
npx okai Table.d.ts
307
+
```
308
+
309
+
> Command can be run anywhere within your Solution
310
+
311
+
After you're happy with your Data Model you can run DB Migrations to run the DB Migration and create your RDBMS Table:
312
+
313
+
```bash
314
+
npm run migrate
315
+
```
316
+
317
+
#### Making changes after first migration
318
+
319
+
If you want to make further changes to your Data Model, you can re-run the `okai` tool to update the AutoQuery APIs and DB Migrations, then run the `rerun:last` npm script to drop and re-run the last migration:
320
+
321
+
```bash
322
+
npm run rerun:last
323
+
```
324
+
325
+
#### Removing a Data Model and all generated code
326
+
327
+
If you changed your mind and want to get rid of the RDBMS Table you can revert the last migration:
328
+
329
+
```bash
330
+
npm run revert:last
331
+
```
332
+
333
+
Which will drop the table and then you can get rid of the AutoQuery APIs, DB Migrations and TypeScript Data model with:
334
+
335
+
```bash
336
+
npx okai rm Transaction.d.ts
337
+
```
338
+
272
339
## Deployment
273
340
274
341
### Docker + Kamal
@@ -319,58 +386,45 @@ These are inferred from the GitHub Action context and don't need to be configure
319
386
-**GitHub Container Registry** integration
320
387
-**Volume persistence** for App_Data including any SQLite database
321
388
389
+
## AI-Assisted Development with CLAUDE.md
322
390
323
-
## AutoQuery CRUD Dev Workflow
324
-
325
-
For Rapid Development simple [TypeScript Data Models](https://docs.servicestack.net/autoquery/okai-models) can be used to generate C# AutoQuery APIs and DB Migrations.
326
-
327
-
### Cheat Sheet
328
-
329
-
Create a new Table use `init <Table>`, e.g:
330
-
331
-
```bash
332
-
npx okai init Table
333
-
```
334
-
335
-
This will generate an empty `MyApp.ServiceModel/<Table>.d.ts` file along with stub AutoQuery APIs and DB Migration implementations.
336
-
337
-
#### Regenerate AutoQuery APIs and DB Migrations
391
+
As part of our objectives of improving developer experience and embracing modern AI-assisted development workflows - all new .NET SPA templates include a comprehensive `AGENTS.md` file designed to optimize AI-assisted development workflows.
338
392
339
-
After modifying the TypeScript Data Model to include the desired fields, re-run the `okai` tool to re-generate the AutoQuery APIs and DB Migrations:
393
+
### What is CLAUDE.md?
340
394
341
-
```bash
342
-
npx okai Table.d.ts
343
-
```
395
+
`CLAUDE.md` and [AGENTS.md](https://agents.md) onboards Claude (and other AI assistants) to your codebase by using a structured documentation file that provides it with complete context about your project's architecture, conventions, and technology choices. This enables more accurate code generation, better suggestions, and faster problem-solving.
344
396
345
-
> Command can be run anywhere within your Solution
397
+
### What's Included
346
398
347
-
After you're happy with your Data Model you can run DB Migrations to run the DB Migration and create your RDBMS Table:
-**Project Structure** - Gives Claude a map of the codebase
403
+
-**ServiceStack Conventions** - DTO patterns, Service implementation, AutoQuery, Authentication, and Validation
404
+
-**API Integration** - TypeScript DTO generation, API client usage, component patterns, and form handling
405
+
-**Database Patterns** - OrmLite setup, migrations, and data access patterns
406
+
-**Common Development Tasks** - Step-by-step guides for adding APIs, implementing features, and extending functionality
407
+
-**Testing & Deployment** - Test patterns and deployment workflows
352
408
353
-
#### Making changes after first migration
409
+
###Extending with Project-Specific Details
354
410
355
-
If you want to make further changes to your Data Model, you can re-run the `okai` tool to update the AutoQuery APIs and DB Migrations, then run the `rerun:last` npm script to drop and re-run the last migration:
411
+
The existing `CLAUDE.md` serves as a solid foundation, but for best results, you should extend it with project-specific details like the purpose of the project, key parts and features of the project and any unique conventions you've adopted.
356
412
357
-
```bash
358
-
npm run rerun:last
359
-
```
413
+
### Benefits
360
414
361
-
#### Removing a Data Model and all generated code
415
+
-**Faster Onboarding** - New developers (and AI assistants) understand project conventions immediately
416
+
-**Consistent Code Generation** - AI tools generate code following your project's patterns
417
+
-**Better Context** - AI assistants can reference specific ServiceStack patterns and conventions
418
+
-**Reduced Errors** - Clear documentation of framework-specific conventions
419
+
-**Living Documentation** - Keep it updated as your project evolves
362
420
363
-
If you changed your mind and want to get rid of the RDBMS Table you can revert the last migration:
421
+
### How to Use
364
422
365
-
```bash
366
-
npm run revert:last
367
-
```
423
+
Claude Code and most AI Assistants already support automatically referencing `CLAUDE.md` and `AGENTS.md` files, for others you can just include it in your prompt context when asking for help, e.g:
368
424
369
-
Which will drop the table and then you can get rid of the AutoQuery APIs, DB Migrations and TypeScript Data model with:
425
+
> Using my project's AGENTS.md, can you help me add a new AutoQuery API for managing Products?
370
426
371
-
```bash
372
-
npx okai rm Transaction.d.ts
373
-
```
427
+
The AI will understand your App's ServiceStack conventions, React setup, and project structure, providing more accurate and contextual assistance.
0 commit comments