frontend-toegevoegd
This commit is contained in:
86
agiledancers-fe/README.md
Normal file
86
agiledancers-fe/README.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# Agile Dancers frontend
|
||||
|
||||
Angular 22 application for managing dance schools through the existing Quarkus
|
||||
REST API.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Node.js 22.22.3 or newer in the 22.x line, Node.js 24.15.0 or newer in the 24.x
|
||||
line, or Node.js 26+. See [Angular version compatibility](https://angular.dev/reference/versions).
|
||||
- npm and the Java 25 / Maven backend setup described in the repository README.
|
||||
|
||||
An `.nvmrc` is included. With nvm installed:
|
||||
|
||||
```sh
|
||||
nvm install
|
||||
nvm use
|
||||
npm ci
|
||||
```
|
||||
|
||||
## Run locally
|
||||
|
||||
Start the backend from the repository root:
|
||||
|
||||
```sh
|
||||
mvn -pl agiledancers-be quarkus:dev
|
||||
```
|
||||
|
||||
In a second terminal, from `agiledancers-fe`:
|
||||
|
||||
```sh
|
||||
npm ci
|
||||
npm start
|
||||
```
|
||||
|
||||
Open <http://localhost:4200>. The Angular development proxy forwards `/api/**`
|
||||
to `http://127.0.0.1:8080`. Update `proxy.conf.json` to use another backend address.
|
||||
|
||||
## Screens
|
||||
|
||||
- School overview: list schools and create a school.
|
||||
- School dashboard: summary, quick actions, next show, rename and delete a school.
|
||||
- Dancers: create, edit, search and delete dancers; see their group memberships.
|
||||
- Groups: create, edit and delete groups; manage dancers in each group.
|
||||
- Shows: create, edit and delete shows; see the three automatically created day parts.
|
||||
|
||||
Deleting requires confirmation. Errors leave entered form values intact.
|
||||
Membership changes are saved immediately, and a dancer can belong to multiple
|
||||
groups. Assigning groups to show day parts is not available yet.
|
||||
|
||||
The backend currently stores data in memory, so restarting it clears the data.
|
||||
|
||||
## Checks
|
||||
|
||||
```sh
|
||||
npm test
|
||||
npm run build
|
||||
```
|
||||
|
||||
Unit tests cover API URLs and payloads, ID zero, form validation, and save failures.
|
||||
The production build is written to `dist/agiledancers-fe/browser`.
|
||||
When deploying it, configure the web server to forward `/api/**` to Quarkus and
|
||||
serve `index.html` for application routes such as `/schools/0/overview`.
|
||||
The development proxy is not included in the production bundle.
|
||||
|
||||
## Browser tests
|
||||
|
||||
Keep the backend running on port 8080, then run:
|
||||
|
||||
```sh
|
||||
npx playwright install chromium
|
||||
npm run e2e
|
||||
```
|
||||
|
||||
Playwright starts the frontend on port 4200. The tests create a uniquely named
|
||||
school, exercise CRUD and multiple group memberships against the real backend,
|
||||
check mobile layout, and clean up the school afterwards. A second test checks
|
||||
connection failure and retry behavior. Tests use only their own school data.
|
||||
|
||||
To use an existing Chrome installation instead of downloading Chromium:
|
||||
|
||||
```sh
|
||||
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/path/to/chrome npm run e2e
|
||||
```
|
||||
|
||||
Browser test screenshots and failure traces are written to the ignored
|
||||
`test-results` directory.
|
||||
Reference in New Issue
Block a user