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
Instantly [scaffold a new App with this template](https://github.com/new?template_name=angular-spa&template_owner=NetCoreTemplates) using GitHub Copilot, just describe the features you want and watch Copilot build it!
18
+
19
+
### Angular with Modern Features
20
+
21
+
-**Standalone Components** - No NgModules, cleaner component architecture
22
+
-**Signal-based State Management** - Reactive state with Angular's new signals API
23
+
-**TypeScript 5.9** - Latest TypeScript features and improved type safety
24
+
-**Tailwind CSS 4** - Utility-first styling with dark mode support
25
+
26
+
### .NET 10 Backend
27
+
28
+
-**ServiceStack v10** - High-performance .NET APIs with AutoQuery CRUD
29
+
-**Entity Framework Core 10** - For ASP.NET Core Identity
30
+
-**OrmLite** - Fast, typed POCO ORM for application data
2. Install `db-identity` to also switch to use this RDBMS for [Background Jobs](https://docs.servicestack.net/rdbms-background-jobs) and [Request Logs Analytics](https://docs.servicestack.net/admin-ui-rdbms-analytics):
44
+
45
+
```bash
46
+
npx add-in db-identity
47
+
```
48
+
49
+
## Simplified .NET + Angular Development Workflow
50
+
51
+
- Single endpoint `https://localhost:5001` for both .NET and Angular UI (no dev certs required)
52
+
- ASP.NET Core proxies requests to Angular dev server (port 4200)
53
+
- Hot Module Replacement (HMR) support for instant UI updates
54
+
- WebSocket proxying for Angular HMR functionality
**Angular SPA** uses **static export**, where a production build of the Angular App is generated at deployment and published together with the .NET App in its `/wwwroot` folder, utilizing static file serving to render its UI.
61
+
62
+
This minimal `angular-spa` starting template is perfect for your next AI Assisted project, offering a streamlined foundation for building modern web applications with **Angular 21** and **.NET 10**:
Full authentication system with beautifully styled Tailwind CSS pages:
71
+
- User registration and login
72
+
- Email confirmation
73
+
- Password reset
74
+
- Profile management
75
+
- Role-based authorization
76
+
77
+
### ⚡ Rapid AutoQuery CRUD dev workflow
78
+
79
+
Quickly generate complete C# [CRUD APIs](https://docs.servicestack.net/autoquery/crud) and [DB Migrations](https://docs.servicestack.net/ormlite/db-migrations) from simple [TypeScript data models](https://localhost:5002/autoquery/okai-models):
80
+
81
+
1. Create a new feature
82
+
83
+
```bash
84
+
npx okai init MyFeature
85
+
```
86
+
87
+
2. Define your TypeScript data models in `MyFeature.d.ts`, e.g:
88
+
89
+
```bash
90
+
code MyApp.ServiceModel/MyFeature.d.ts
91
+
```
92
+
93
+
3. When ready, generate C# APIs and migrations
94
+
95
+
```bash
96
+
npx okai MyFeature.d.ts
97
+
```
98
+
99
+
4. Apply database migrations
100
+
101
+
```bash
102
+
npm run migrate
103
+
```
104
+
105
+
### Use AI for quick scaffolding
106
+
107
+
To help quickly scaffold your data models and features, use ServiceStack's AI assistant. Example of creating AutoQuery CRUD APIs for managing products:
108
+
109
+
```bash
110
+
npx okai "Manage products price and inventory"
111
+
```
112
+
113
+
### 🤖 AI Chat Integration
114
+
115
+
Built-in AI Chat API support with multiple provider options:
116
+
- ServiceStack AI
117
+
- OpenAI, Anthropic, Google, Groq
118
+
- Ollama for local models
119
+
- OpenRouter and more
120
+
121
+
### 🔑 API Keys Management
122
+
123
+
Secure API key authentication with:
124
+
- Admin-managed API keys
125
+
- User self-service key generation
126
+
- Scopes and features configuration
127
+
128
+
### 📊 Background Jobs
129
+
130
+
Durable background job processing with:
131
+
- Command-based job execution
132
+
- Recurring job scheduling
133
+
- SMTP email sending via background workers
134
+
135
+
### 📝 Request Logging
136
+
137
+
SQLite-backed request logging for:
138
+
- API request tracking
139
+
- Error monitoring
140
+
- Performance analysis
141
+
142
+
### 🔍 Built-in Admin UIs
143
+
144
+
-**/ui** - ServiceStack API Explorer
145
+
-**/admin-ui** - Database management, user administration
During development, `dotnet watch` starts both the .NET backend and Angular dev server with Hot Module Replacement. In production, Angular builds to static files served directly by ASP.NET Core.
153
+
154
+
### Modular Configuration
155
+
156
+
Clean separation of concerns with `IHostingStartup` pattern:
157
+
-[Configure.AppHost.cs](https://github.com/NetCoreTemplates/angular-spa/blob/main/MyApp/Configure.AppHost.cs) - Main ServiceStack AppHost registration
158
+
-[Configure.Auth.cs](https://github.com/NetCoreTemplates/angular-spa/blob/main/MyApp/Configure.Auth.cs) - ServiceStack AuthFeature with ASP.NET Core Identity integration
159
+
-[Configure.AutoQuery.cs](https://github.com/NetCoreTemplates/angular-spa/blob/main/MyApp/Configure.AutoQuery.cs) - AutoQuery features and audit events
160
+
-[Configure.Db.cs](https://github.com/NetCoreTemplates/angular-spa/blob/main/MyApp/Configure.Db.cs) - Database setup (OrmLite for app data, EF Core for Identity)
161
+
-[Configure.Db.Migrations.cs](https://github.com/NetCoreTemplates/angular-spa/blob/main/MyApp/Configure.Db.Migrations.cs) - Runs OrmLite and EF DB Migrations and creates initial users
-**Kamal Deployment** - One-command production deployment with SSL
186
+
187
+
### Kamal Deployments
188
+
189
+
All deployments include the GitHub Action workflows to deploy your App to [any Linux Server with Kamal](https://docs.servicestack.net/kamal-deploy) using Docker, SSH and GitHub Container Registry (ghcr).
190
+
191
+
## AI-Assisted Development with CLAUDE.md
192
+
193
+
As part of our objectives of improving developer experience and embracing modern AI-assisted development workflows - all new .NET React templates include a comprehensive `AGENTS.md` file designed to optimize AI-assisted development workflows.
194
+
195
+
### What is CLAUDE.md?
196
+
197
+
`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.
-**Project Structure** - Gives Claude a map of the codebase
205
+
-**ServiceStack Conventions** - DTO patterns, Service implementation, AutoQuery, Authentication, and Validation
206
+
-**React Integration** - TypeScript DTO generation, API client usage, component patterns, and form handling
207
+
-**Database Patterns** - OrmLite setup, migrations, and data access patterns
208
+
-**Common Development Tasks** - Step-by-step guides for adding APIs, implementing features, and extending functionality
209
+
-**Testing & Deployment** - Test patterns and deployment workflows
210
+
211
+
### Extending with Project-Specific Details
212
+
213
+
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.
214
+
215
+
### Benefits
216
+
217
+
-**Faster Onboarding** - New developers (and AI assistants) understand project conventions immediately
218
+
-**Consistent Code Generation** - AI tools generate code following your project's patterns
219
+
-**Better Context** - AI assistants can reference specific ServiceStack patterns and conventions
220
+
-**Reduced Errors** - Clear documentation of framework-specific conventions
221
+
-**Living Documentation** - Keep it updated as your project evolves
222
+
223
+
### How to Use
224
+
225
+
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:
226
+
227
+
> Using my project's AGENTS.md, can you help me add a new AutoQuery API for managing Products?
228
+
229
+
The AI will understand your App's ServiceStack conventions, React setup, and project structure, providing more accurate and contextual assistance.
0 commit comments