generated from bastian/boilerplate
36 lines
1.2 KiB
Markdown
36 lines
1.2 KiB
Markdown
# Frontend Workspace
|
|
|
|
Angular Frontend fuer das Boilerplate. Der Workspace wird normalerweise ueber die
|
|
Root-Scripts gesteuert.
|
|
|
|
## Befehle
|
|
|
|
```bash
|
|
npm --workspace apps/frontend run start
|
|
npm --workspace apps/frontend run build
|
|
npm --workspace apps/frontend run typecheck
|
|
npm --workspace apps/frontend run test
|
|
```
|
|
|
|
Im lokalen Start laeuft Angular auf `http://localhost:4200` und nutzt
|
|
`proxy.conf.json`, um `/api` an das Backend auf `http://localhost:3000` zu
|
|
proxyn.
|
|
|
|
## Struktur
|
|
|
|
- `src/app/layout/app-shell.ts`: Hauptlayout, Navigation und Login-Zustand
|
|
- `src/app/app.routes.ts`: Routen und Permission-Daten
|
|
- `src/app/core/auth.service.ts`: aktueller Benutzer und Permissions
|
|
- `src/app/core/csrf.interceptor.ts`: CSRF-Header fuer schreibende Requests
|
|
- `src/app/core/permission.guard.ts`: UI-seitige Routensperre
|
|
- `src/app/features`: fachliche Seiten
|
|
|
|
## Entwicklungsregeln
|
|
|
|
Das Frontend nutzt keine UI-Library. Komponenten bleiben mobile-first und
|
|
verwenden eigenes HTML und SCSS. Permissions im Frontend dienen nur Darstellung
|
|
und Navigation; die verbindliche Autorisierung findet im Backend statt.
|
|
|
|
API-Zugriffe laufen ueber `@boilerplate/api-client`. Der Client ist generiert
|
|
und wird aus dem Root mit `npm run api:generate` aktualisiert.
|