# netcoretemplates/angular-spa architecture

> Architecture diagram of the GitHub repository netcoretemplates/angular-spa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/netcoretemplates/angular-spa
- Repository: https://github.com/netcoretemplates/angular-spa

## Overview

This is an Angular SPA backed by a ServiceStack/ASP.NET Core application. Users enter through the Angular shell and routed pages; authenticated users can manage bookings, while signup and confirmation are handled by the registration service. The backend also provides AutoQuery CRUD, Identity, background jobs, health monitoring, and database-backed application services. Edges are limited to relationships shown in excerpts or explicitly documented in the README; unsampled page-to-service calls are not inferred.

Main entry points: [`MyApp/Program.cs`](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Program.cs) (ASP.NET host), [`MyApp.Client/src/app/app.routes.ts`](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/app.routes.ts) (Page routing), [`MyApp.ServiceInterface/RegisterService.cs`](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceInterface/RegisterService.cs) (Registration service), [`MyApp.Client/src/app/app.component.ts`](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/app.component.ts) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Angular client"]
  node_bootstrap["Angular bootstrap<br/>[main.ts]"]
  node_app["App shell<br/>[app.component.ts]"]
  node_routes["Page routing<br/>[app.routes.ts]"]
  node_booking_routes["Booking routes<br/>[booking.routes.ts]"]
  node_booking_ui["Booking pages<br/>[bookings]"]
  node_auth_pages["Sign-in and signup"]
  node_profile["User profile"]
  node_todos_ui["Todo page<br/>[todos.component.ts]"]
  node_weather["Weather page"]
  node_markdown["Markdown pages"]
end

subgraph group_identity["Identity and access"]
  node_auth_guard["Auth guard<br/>[guards.ts]"]
  node_identity_pages["Identity Razor UI"]
  node_registration["Registration service<br/>[RegisterService.cs]"]
  node_identity_config["Identity configuration<br/>[Configure.Auth.cs]"]
end

subgraph group_services["Application services"]
  node_autoquery["AutoQuery CRUD"]
  node_todos_service["Todo service<br/>[TodosServices.cs]"]
  node_background_jobs["Background jobs"]
  node_email["Email services<br/>[EmailServices.cs]"]
end

subgraph group_data["Data and contracts"]
  node_booking_contract["Booking contracts<br/>[Bookings.cs]"]
  node_todo_contract["Todo contracts<br/>[Todos.cs]"]
  node_identity_store[("Identity database")]
  node_app_database[("Application database<br/>[Configure.Db.cs]")]
end

subgraph group_hosting["Hosting and operations"]
  node_hosting["ASP.NET host<br/>[Program.cs]"]
  node_health["Health checks"]
end

node_user(("User"))
node_email_provider["SMTP provider"]

node_user -->|"opens"| node_app
node_bootstrap -->|"bootstraps"| node_app
node_app -.->|"hosts routes"| node_routes
node_routes -->|"includes"| node_booking_routes
node_booking_routes -->|"routes to"| node_booking_ui
node_routes -->|"routes to"| node_auth_pages
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_todos_ui
node_routes -->|"routes to"| node_weather
node_routes -->|"routes to"| node_markdown
node_routes -->|"guards access"| node_auth_guard
node_hosting -->|"configures"| node_identity_store
node_hosting -.->|"sets up auth"| node_identity_config
node_hosting -->|"maps Razor pages"| node_identity_pages
node_hosting -->|"registers services"| node_registration
node_registration -->|"creates users"| node_identity_store
node_registration -->|"sends confirmation"| node_email
node_email -.->|"can send via SMTP"| node_email_provider
node_hosting -.->|"enables"| node_autoquery
node_booking_ui -.->|"uses CRUD API"| node_autoquery
node_autoquery -->|"serves CRUD contracts"| node_booking_contract
node_hosting -.->|"registers services"| node_todos_service
node_todos_service -->|"handles requests"| node_todo_contract
node_hosting -.->|"configures"| node_app_database
node_hosting -.->|"configures"| node_background_jobs
node_hosting -.->|"configures"| node_health

click node_bootstrap "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/main.ts"
click node_app "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/app.component.ts"
click node_routes "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/app.routes.ts"
click node_booking_routes "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/bookings/booking.routes.ts"
click node_booking_ui "https://github.com/netcoretemplates/angular-spa/tree/main/MyApp.Client/src/app/bookings"
click node_auth_pages "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/signin/signin.component.ts"
click node_profile "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/profile/profile.component.ts"
click node_todos_ui "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/todomvc/todos.component.ts"
click node_weather "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/weather/weather.component.ts"
click node_markdown "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/markdown-page.component.ts"
click node_auth_guard "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/guards.ts"
click node_identity_pages "https://github.com/netcoretemplates/angular-spa/tree/main/MyApp/Areas/Identity/Pages/Account"
click node_registration "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceInterface/RegisterService.cs"
click node_identity_config "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.Auth.cs"
click node_autoquery "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.AutoQuery.cs"
click node_todos_service "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceInterface/TodosServices.cs"
click node_background_jobs "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.BackgroundJobs.cs"
click node_email "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceInterface/EmailServices.cs"
click node_booking_contract "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceModel/Bookings.cs"
click node_todo_contract "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceModel/Todos.cs"
click node_identity_store "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceInterface/Data/ApplicationDbContext.cs"
click node_app_database "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.Db.cs"
click node_hosting "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Program.cs"
click node_health "https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.HealthChecks.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bootstrap,node_app,node_routes,node_booking_routes,node_booking_ui,node_auth_pages,node_profile,node_todos_ui,node_weather,node_markdown,node_user toneBlue
class node_auth_guard,node_identity_pages,node_registration,node_identity_config toneAmber
class node_autoquery,node_todos_service,node_background_jobs,node_email toneMint
class node_booking_contract,node_todo_contract,node_identity_store,node_app_database toneRose
class node_hosting,node_health,node_email_provider toneIndigo
```

## Components

### Angular client

- [Angular bootstrap](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/main.ts): `MyApp.Client/src/main.ts`
- [App shell](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/app.component.ts): `MyApp.Client/src/app/app.component.ts`
- [Page routing](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/app.routes.ts): `MyApp.Client/src/app/app.routes.ts`
- [Booking routes](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/bookings/booking.routes.ts): `MyApp.Client/src/app/bookings/booking.routes.ts`
- [Booking pages](https://github.com/netcoretemplates/angular-spa/tree/main/MyApp.Client/src/app/bookings): `MyApp.Client/src/app/bookings`
- [Sign-in and signup](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/signin/signin.component.ts): `MyApp.Client/src/app/signin/signin.component.ts`
- [User profile](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/profile/profile.component.ts): `MyApp.Client/src/app/profile/profile.component.ts`
- [Todo page](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/todomvc/todos.component.ts): `MyApp.Client/src/app/todomvc/todos.component.ts`
- [Weather page](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/weather/weather.component.ts): `MyApp.Client/src/app/weather/weather.component.ts`
- [Markdown pages](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/app/markdown-page.component.ts): `MyApp.Client/src/app/markdown-page.component.ts`

### Identity and access

- [Auth guard](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.Client/src/guards.ts): `MyApp.Client/src/guards.ts`
- [Identity Razor UI](https://github.com/netcoretemplates/angular-spa/tree/main/MyApp/Areas/Identity/Pages/Account): `MyApp/Areas/Identity/Pages/Account`
- [Registration service](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceInterface/RegisterService.cs): `MyApp.ServiceInterface/RegisterService.cs`
- [Identity configuration](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.Auth.cs): `MyApp/Configure.Auth.cs`

### Application services

- [AutoQuery CRUD](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.AutoQuery.cs): `MyApp/Configure.AutoQuery.cs`
- [Todo service](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceInterface/TodosServices.cs): `MyApp.ServiceInterface/TodosServices.cs`
- [Background jobs](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.BackgroundJobs.cs): `MyApp/Configure.BackgroundJobs.cs`
- [Email services](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceInterface/EmailServices.cs): `MyApp.ServiceInterface/EmailServices.cs`

### Data and contracts

- [Booking contracts](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceModel/Bookings.cs): `MyApp.ServiceModel/Bookings.cs`
- [Todo contracts](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceModel/Todos.cs): `MyApp.ServiceModel/Todos.cs`
- [Identity database](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp.ServiceInterface/Data/ApplicationDbContext.cs): `MyApp.ServiceInterface/Data/ApplicationDbContext.cs`
- [Application database](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.Db.cs): `MyApp/Configure.Db.cs`

### Hosting and operations

- [ASP.NET host](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Program.cs): `MyApp/Program.cs`
- [Health checks](https://github.com/netcoretemplates/angular-spa/blob/main/MyApp/Configure.HealthChecks.cs): `MyApp/Configure.HealthChecks.cs`

### Other components

- **User**
- **SMTP provider**

## Connections

- User → App shell: opens
- Angular bootstrap → App shell: bootstraps (evidence: `MyApp.Client/src/main.ts`)
- App shell → Page routing: hosts routes
- Page routing → Booking routes: includes (evidence: `MyApp.Client/src/app/app.routes.ts`)
- Booking routes → Booking pages: routes to (evidence: `MyApp.Client/src/app/bookings/booking.routes.ts`)
- Page routing → Sign-in and signup: routes to (evidence: `MyApp.Client/src/app/app.routes.ts`)
- Page routing → User profile: routes to (evidence: `MyApp.Client/src/app/app.routes.ts`)
- Page routing → Todo page: routes to (evidence: `MyApp.Client/src/app/app.routes.ts`)
- Page routing → Weather page: routes to (evidence: `MyApp.Client/src/app/app.routes.ts`)
- Page routing → Markdown pages: routes to (evidence: `MyApp.Client/src/app/app.routes.ts`)
- Page routing → Auth guard: guards access (evidence: `MyApp.Client/src/app/app.routes.ts`)
- ASP.NET host → Identity database: configures (evidence: `MyApp/Program.cs`)
- ASP.NET host → Identity configuration: sets up auth (evidence: `README.md`)
- ASP.NET host → Identity Razor UI: maps Razor pages (evidence: `MyApp/Program.cs`)
- ASP.NET host → Registration service: registers services (evidence: `MyApp/Program.cs`)
- Registration service → Identity database: creates users (evidence: `MyApp.ServiceInterface/RegisterService.cs`)
- Registration service → Email services: sends confirmation (evidence: `MyApp.ServiceInterface/RegisterService.cs`)
- Email services → SMTP provider: can send via SMTP (evidence: `README.md`)
- ASP.NET host → AutoQuery CRUD: enables (evidence: `README.md`)
- Booking pages → AutoQuery CRUD: uses CRUD API (evidence: `README.md`)
- AutoQuery CRUD → Booking contracts: serves CRUD contracts (evidence: `README.md`)
- ASP.NET host → Todo service: registers services (evidence: `MyApp/Program.cs`)
- Todo service → Todo contracts: handles requests (evidence: `MyApp.ServiceInterface/TodosServices.cs`)
- ASP.NET host → Application database: configures (evidence: `README.md`)
- ASP.NET host → Background jobs: configures (evidence: `README.md`)
- ASP.NET host → Health checks: configures (evidence: `README.md`)
