docs: consolidate application project development docs (#545)

* docs: add DEVELOPMENT.md

* docs: dedupe application project development guides

* docs: update junit version target
This commit is contained in:
Zach
2026-04-22 17:27:37 -04:00
committed by Zach Yale
parent 91989b522b
commit 719e083353
9 changed files with 502 additions and 291 deletions
-66
View File
@@ -1,66 +0,0 @@
# Contributing to Grimmory UI
This document covers frontend-specific development and review expectations for `frontend`.
For repository-wide contribution policy, branch strategy, PR requirements, and release semantics, start with [../CONTRIBUTING.md](../CONTRIBUTING.md).
## Preferred Command Surface
Use [`Justfile`](Justfile) when possible:
```bash
just # List frontend recipes
just install # Install or update dependencies for local development
just install-ci # Install dependencies exactly as CI does
just dev # Start the local dev server
just test # Run frontend tests
just check # Run the standard local verification pass
just lint # Run the frontend linter
just build # Build the production bundle
```
From the repository root, the same recipes are available through the `ui` namespace:
```bash
just ui install
just ui install-ci
just ui dev
just ui test
just ui check
just ui lint
```
## Frontend Conventions
- Follow the Angular style guide.
- All components are standalone. Do not add NgModules.
- Use `inject()` for dependency injection instead of constructor injection.
- Prefer PrimeNG components and project styling patterns over custom one-off UI primitives.
- Use SCSS for styling and keep the visual language consistent with the existing application.
- Use Transloco for user-facing strings. New strings belong under `src/i18n/`.
- Keep UI changes responsive for desktop and mobile layouts.
- Tests should use Vitest, not Karma or Jasmine.
## i18n and UI Copy
- Update all relevant locale files when adding or renaming translation keys.
- Keep translation-key changes separate from bulk JSON reformatting whenever practical.
- Prefer Grimmory naming for UI-visible labels and keys, while preserving compatibility shims only when they are still required by existing backend or migration behavior.
## Validation Before Opening a PR
Run the frontend checks locally before sending a PR:
```bash
just install
just check
```
If your change affects layout, responsive behavior, or interaction design, also run the full stack locally and capture screenshots or a short screen recording for the PR.
If you specifically want to mirror the stricter CI dependency policy, run:
```bash
just install-ci
just ci-check
```
+121
View File
@@ -0,0 +1,121 @@
# Grimmory UI Development
This document is the canonical development guide for `frontend`. It covers the local command surface,
setup, build and test workflows, and frontend-specific conventions.
For repository-wide contribution policy, branch strategy, PR requirements, and release semantics, start
with [../CONTRIBUTING.md](../CONTRIBUTING.md). For repo-level environment setup and Docker workflows,
see [../DEVELOPMENT.md](../DEVELOPMENT.md).
## Project Scope
The `frontend` project is the Angular browser application for Grimmory. It owns client-side routing,
stateful UI interactions, component styling, localization, and the compiled bundle packaged into the
production image.
## Stack
- Angular 21
- TypeScript
- PrimeNG + PrimeIcons
- Transloco for i18n
- Vitest for unit tests
- Angular ESLint
- SCSS
## Preferred Command Surface
Use [`Justfile`](Justfile) when possible:
```bash
just # List frontend recipes
just install # Install or update dependencies for local development
just install-ci # Install dependencies exactly as CI does
just dev # Start the local dev server
just test # Run frontend tests
just coverage # Run tests with coverage output
just check # Run the standard local verification pass
just ci-check # Run the stricter CI-style verification pass
just lint # Run the frontend linter
just build # Build the production bundle
```
From the repository root, the same recipes are available through the `ui` namespace:
```bash
just ui install
just ui install-ci
just ui dev
just ui test
just ui coverage
just ui check
just ui lint
```
## Running Locally
For the normal frontend loop:
```bash
cd frontend
just install
just dev
```
The dev server runs on `http://localhost:4200` by default.
If you need the full application stack, start the backend and database from the repository root with
`just dev-up` or use the repo-level manual setup in [../DEVELOPMENT.md](../DEVELOPMENT.md).
## Build and Test
```bash
just build
just test
just coverage
just check
just lint
```
The production output is written to `dist/grimmory/`. The backend packaging flow consumes that bundle
when building the all-in-one production image.
Use `just install-ci` and `just ci-check` when you need the stricter CI-style dependency and audit
flow from a clean install.
## Frontend Conventions
- Follow the Angular style guide.
- All components are standalone. Do not add NgModules.
- Use `inject()` for dependency injection instead of constructor injection.
- Prefer PrimeNG components and existing project styling patterns over custom one-off UI primitives.
- Use SCSS for styling and keep the visual language consistent with the existing application.
- Use Transloco for user-facing strings. New strings belong under `src/i18n/`.
- Keep UI changes responsive for desktop and mobile layouts.
- Tests should use Vitest, not Karma or Jasmine.
## i18n and UI Copy
- Update all relevant locale files when adding or renaming translation keys.
- Keep translation-key changes separate from bulk JSON reformatting whenever practical.
- Prefer Grimmory naming for UI-visible labels and keys, while preserving compatibility shims only when
they are still required by existing backend or migration behavior.
## Validation Before Opening a PR
Run the frontend checks locally before sending a PR:
```bash
just install
just check
```
If your change affects layout, responsive behavior, or interaction design, also run the full stack
locally and capture screenshots or a short screen recording for the PR.
If you specifically want to mirror the stricter CI dependency policy, run:
```bash
just install-ci
just ci-check
```
-74
View File
@@ -1,74 +0,0 @@
# Grimmory UI
The `frontend` project is the Angular frontend for Grimmory. It owns the browser application, component styling, client-side routing, stateful UI interactions, and the compiled bundle that is packaged into the current production image.
## Stack
- Angular 21
- TypeScript
- PrimeNG + PrimeIcons
- Transloco for i18n
- Vitest for unit tests
- Angular ESLint
## Local Command Surface
Use [`Justfile`](Justfile) when possible. It is the primary frontend command surface for both humans and agents.
```bash
just # List frontend recipes
just install # Install or update dependencies for local development
just install-ci # Install dependencies exactly as CI does
just dev # Start the Angular dev server
just test # Run the frontend test suite
just check # Run the standard local verification pass
just lint # Run the frontend linter
just build # Build the production bundle
```
The repository root exposes the same recipes through the `ui` namespace:
```bash
just ui install
just ui install-ci
just ui dev
just ui test
just ui check
just ui lint
```
## Running Locally
```bash
cd frontend
just install
just dev
```
The development server runs on port `4200` by default.
## Build and Test
```bash
just build
just check
just test
just coverage
just lint
```
The production output is written to `dist/grimmory/` and is consumed by the backend packaging flow when building the all-in-one production image.
Use `just ci-check` when you want the stricter CI-style flow from a clean install, including the severity-gated audit step.
## UI-Specific Notes
- This project uses standalone Angular components.
- Dependency injection should use `inject()`.
- Styling uses SCSS.
- UI strings live in `src/i18n/`.
- The current production bundle is still packaged into the backend jar during the root Docker build.
## More Detail
Frontend-specific contributor rules and conventions live in [CONTRIBUTING.md](CONTRIBUTING.md).