Skip to content

Commit d07a6c0

Browse files
committed
Update AGENTS.md
1 parent e37dcbb commit d07a6c0

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

AGENTS.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,7 @@ dotnet watch
1818
cd MyApp.Client && npm run dtos
1919
```
2020

21-
**Frontend (Angular SPA):**
22-
```bash
23-
# Run dev server with HMR (from MyApp.Client directory)
24-
npm run dev
25-
# Dev server at http://localhost:4200
26-
```
27-
28-
**Tailwind CSS:**
21+
**Tailwind CSS (for Razor Pages):**
2922
```bash
3023
# Watch mode for styling (from MyApp directory)
3124
npm run ui:dev
@@ -35,16 +28,21 @@ npm run ui:build
3528
```
3629

3730
**Full development setup:**
38-
1. Terminal 1: `cd MyApp && dotnet run` (backend)
39-
2. Terminal 2: `cd MyApp.Client && npm run dev` (frontend)
40-
3. Terminal 3: `cd MyApp && npm run ui:dev` (Tailwind watch)
31+
Run .NET backend, Razor Pages and Node Vite dev server in parallel:
32+
```bash
33+
cd MyApp && dotnet watch
34+
```
35+
36+
**Using tailwind in new Razor Pages:**
37+
38+
Terminal 2: `cd MyApp && npm run ui:dev` (Tailwind watch)
4139

4240
### Testing
4341

4442
**Backend:**
4543
```bash
4644
# Run all .NET tests
47-
dotnet test MyApp.slnx
45+
cd MyApp.Tests && dotnet test
4846
```
4947

5048
**Frontend:**
@@ -92,7 +90,7 @@ npx okai rm Table.d.ts
9290
- Hot Module Replacement (HMR) enabled via WebSocket proxying using `MapNotFoundToNode`, `MapViteHmr`, `RunNodeProcess`, `MapFallbackToNode` in [Program.cs](MyApp/Program.cs)
9391

9492
**Production Mode:**
95-
- Angular builds React app to `MyApp.Client/dist/`, which is copied to `MyApp/wwwroot/` when published
93+
- Angular builds app to `MyApp.Client/dist/`, which is copied to `MyApp/wwwroot/` when published
9694
- ASP.NET Core serves static files directly from `wwwroot` - no Node.js required
9795
- Fallback to `index.html` for client-side routing
9896

@@ -112,13 +110,13 @@ This pattern keeps [Program.cs](MyApp/Program.cs) clean and separates concerns.
112110
### Project Structure
113111

114112
```
115-
MyApp/ # .NET Backend (hosts both .NET and Vite React)
113+
MyApp/ # .NET Backend (hosts both .NET and Angular build output)
116114
├── Configure.*.cs # Modular startup configuration
117115
├── Migrations/ # EF Core Identity migrations + OrmLite app migrations
118116
├── Pages/ # Identity Auth Razor Pages
119117
└── wwwroot/ # Production static files (from MyApp.Client/dist)
120118
121-
MyApp.Client/ # React Frontend
119+
MyApp.Client/ # Angular Frontend
122120
├── src/
123121
│ ├── app/ # Angular components and pages
124122
│ ├── services/ # Shared services including auth (signal-based)
@@ -471,11 +469,11 @@ Using `apiForm` is required for multipart/form-data File Uploads.
471469
- `/ui/*` → ServiceStack API Explorer
472470
- `/admin-ui/*` → ServiceStack Admin UI (requires Admin role)
473471
- `/types/typescript` → ServiceStack .NET API TypeScript DTOs (for dtos.ts)
474-
- All other routes → React SPA (via fallback in dev/prod)
472+
- All other routes → Angular SPA (via fallback in dev/prod)
475473

476474
### Razor Pages Integration
477475

478-
The template includes Razor Pages for Identity UI (`/Identity` routes) that coexist with the React SPA. These use Tailwind CSS compiled from `MyApp/tailwind.input.css` to `MyApp/wwwroot/css/app.css`.
476+
The template includes Razor Pages for Identity UI (`/Identity` routes) that coexist with the Angular SPA. These use Tailwind CSS compiled from `MyApp/tailwind.input.css` to `MyApp/wwwroot/css/app.css`.
479477

480478
### Environment Variables
481479

@@ -491,7 +489,7 @@ Configured in [Configure.BackgroundJobs.cs](MyApp/Configure.BackgroundJobs.cs) u
491489
2. **Make backend changes:** Edit C# files in `MyApp.ServiceModel` or `MyApp.ServiceInterface`
492490
3. **Restart .NET Server**
493491
4. **Regenerate DTOs:** `cd MyApp.Client && npm run dtos`
494-
5. **Make frontend changes:** Edit React files in `MyApp.Client/src`
492+
5. **Make frontend changes:** Edit Angular files in `MyApp.Client/src`
495493
6. **Add new CRUD feature:**
496494
- `npx okai init Feature`
497495
- Edit `MyApp.ServiceModel/Feature.d.ts`

0 commit comments

Comments
 (0)