English
Topic 15. The Angular project: standalone components, zoneless change detection, Tailwind CSS and the dev proxy
Goal: create the Angular client: a standalone, zoneless application with strict TypeScript, Tailwind CSS v4 with the Chatex theme, linting, formatting and unit tests, and a development server that forwards /api and /hubs to the API.
Where we are
The backend is complete; module 5 builds the browser client on top of it (Fig. 15.1). This topic lays the foundation: the workspace, the tools and an empty application that already knows its theme.
Fig. 15.1. The client workspace and its tools
- Starting point: topic 14 — the backend is complete and identical to the reference: 93 tests pass, and the API with its SignalR hub at
/hubs/chatruns onhttp://localhost:5214. - At the end of the topic
Source/Chatex.Webbuilds, its 3 unit tests pass, lint and format checks are clean, and./Run.ps1 webserves an empty page in the Chatex theme that forwards API calls through the proxy. The commandssetup,build,test,formatandwebofRun.ps1now work, as topic 2 promised.
Steps
- Creating the project — Angular in short ·
ng new· what it generates · the packages · the workspace configuration - Linting, formatting and tests — ESLint · Prettier · Vitest · the editor
- Tailwind CSS and the theme — Tailwind v4 · tokens and utilities · dark mode · the page and its icons
- The application skeleton — folders · bootstrapping · signals and the theme service · the root component · the dev proxy
- Checkpoint — what must work, self-check questions and exercises
Materials
- Course slides, part 4, Real time and the TypeScript client (slides "The Angular client", "Responsive UI under a strict CSP")
Source/Chatex.Web/,angular.json,package.jsonstyles.css,theme.service.ts,proxy.conf.jsonDocs/Frontend.md– the client's behaviour, source layout and commands