diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bdad50527..a944f9c02 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -21,7 +21,7 @@ updates: # Frontend – npm (Angular) - package-ecosystem: "npm" - directory: "/booklore-ui" + directory: "/frontend" schedule: interval: "weekly" day: "friday" diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 5c4ba1830..1728db5da 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -142,7 +142,7 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2 if: ${{ always() && inputs.publish_test_results }} with: - files: booklore-ui/test-results/vitest-results.xml + files: frontend/test-results/vitest-results.xml check_name: Frontend Test Results - name: Upload Frontend Test Reports @@ -151,7 +151,7 @@ jobs: with: name: frontend-test-reports path: | - booklore-ui/test-results/vitest-results.xml + frontend/test-results/vitest-results.xml retention-days: 30 - name: Validate Frontend Test Results diff --git a/.gitignore b/.gitignore index a2b362188..500d0a444 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,8 @@ local-scripts/ ### Dev config, books, and data ### booklore-ui/test-results/ +frontend/test-results/ +frontend/node_modules/ booklore-api/src/main/resources/application-local.yaml /shared/ diff --git a/AGENTS.md b/AGENTS.md index 2a9997475..a47fac161 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ - Application code: `src/main/java` - Resources and Flyway migrations: `src/main/resources` - Tests: `src/test/java` -- **Frontend (`booklore-ui/`)** +- **Frontend (`frontend/`)** - Application code: `src/app/{core,features,shared}` - Translations: `src/i18n/` - Assets: `src/assets/` @@ -54,8 +54,8 @@ just ui check # run frontend verification - Use 2-space indentation in TypeScript, HTML, and SCSS. - Keep Angular code on standalone components. Do not add NgModules. - Prefer `inject()` over constructor injection. -- Follow `booklore-ui/eslint.config.js`: component selectors use `app-*`, directive selectors use `app*`, and `any` is disallowed. -- Put user-facing strings in Transloco files under `booklore-ui/src/i18n/`. +- Follow `frontend/eslint.config.js`: component selectors use `app-*`, directive selectors use `app*`, and `any` is disallowed. +- Put user-facing strings in Transloco files under `frontend/src/i18n/`. - Keep responsive behavior intact. - Use Vitest for tests. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9889a5328..89e483a9e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,7 +89,7 @@ git push origin develop ``` grimmory/ -├── booklore-ui/ # Angular frontend (TypeScript, PrimeNG) +├── frontend/ # Angular frontend (TypeScript, PrimeNG) ├── booklore-api/ # Spring Boot backend (Java 25, Gradle) ├── deploy/ # Compose, Helm, and Podman deployment examples ├── packaging/docker/ # Container runtime assets used by the Docker build @@ -122,7 +122,7 @@ just image-build # Build the production image locally Use the repo-level guide for workflow, release, and PR policy, then drop into the component-specific guides when you are working inside a project: - Backend: [booklore-api/README.md](booklore-api/README.md) and [booklore-api/CONTRIBUTING.md](booklore-api/CONTRIBUTING.md) -- Frontend: [booklore-ui/README.md](booklore-ui/README.md) and [booklore-ui/CONTRIBUTING.md](booklore-ui/CONTRIBUTING.md) +- Frontend: [frontend/README.md](frontend/README.md) and [frontend/CONTRIBUTING.md](frontend/CONTRIBUTING.md) ### Option 1: Docker Development Stack (Recommended) @@ -348,7 +348,7 @@ Before opening your PR: - [ ] PR is linked to an **approved** issue (PRs without a linked issue will be closed) - [ ] All tests pass (`just test`) - [ ] Actual test output is pasted in the PR description -- [ ] Code follows the relevant component conventions (see [booklore-api/CONTRIBUTING.md](booklore-api/CONTRIBUTING.md) and [booklore-ui/CONTRIBUTING.md](booklore-ui/CONTRIBUTING.md)) +- [ ] Code follows the relevant component conventions (see [booklore-api/CONTRIBUTING.md](booklore-api/CONTRIBUTING.md) and [frontend/CONTRIBUTING.md](frontend/CONTRIBUTING.md)) - [ ] No lint errors - [ ] Branch is up-to-date with `develop` - [ ] You ran the full stack locally and manually verified the change works @@ -383,7 +383,7 @@ We've seen a sharp increase in AI-generated PRs where the contributor clearly ne Detailed coding conventions now live with each project: - Backend rules: [booklore-api/CONTRIBUTING.md](booklore-api/CONTRIBUTING.md) -- Frontend rules: [booklore-ui/CONTRIBUTING.md](booklore-ui/CONTRIBUTING.md) +- Frontend rules: [frontend/CONTRIBUTING.md](frontend/CONTRIBUTING.md) --- diff --git a/Dockerfile b/Dockerfile index 84ae8c3b8..e77a1b6e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ FROM --platform=$BUILDPLATFORM node:24-alpine AS frontend-build -WORKDIR /workspace/booklore-ui +WORKDIR /workspace/frontend -COPY booklore-ui/package.json booklore-ui/package-lock.json ./ +COPY frontend/package.json frontend/package-lock.json ./ RUN --mount=type=cache,target=/root/.npm \ npm ci --no-audit --no-fund -COPY booklore-ui/ ./ -RUN --mount=type=cache,target=/workspace/booklore-ui/.angular/cache \ +COPY frontend/ ./ +RUN --mount=type=cache,target=/workspace/frontend/.angular/cache \ npm run build --configuration=production FROM --platform=$BUILDPLATFORM gradle:9.3.1-jdk25-alpine AS backend-build @@ -22,7 +22,7 @@ RUN --mount=type=cache,target=/home/gradle/.gradle \ ./gradlew --no-daemon dependencies COPY booklore-api/ ./ -COPY --from=frontend-build /workspace/booklore-ui/dist/grimmory/browser /tmp/frontend-dist +COPY --from=frontend-build /workspace/frontend/dist/grimmory/browser /tmp/frontend-dist RUN --mount=type=cache,target=/home/gradle/.gradle \ ./gradlew --no-daemon -PfrontendDistDir=/tmp/frontend-dist bootJar diff --git a/Justfile b/Justfile index c46914aa1..0b34e24f3 100644 --- a/Justfile +++ b/Justfile @@ -1,7 +1,7 @@ set shell := ["bash", "-eu", "-o", "pipefail", "-c"] mod api 'booklore-api/Justfile' -mod ui 'booklore-ui/Justfile' +mod ui 'frontend/Justfile' mod release 'tools/release/Justfile' compose_file := env_var_or_default('GRIMMORY_COMPOSE_FILE', 'dev.docker-compose.yml') diff --git a/README.md b/README.md index e7f38122a..89bdef0cd 100644 --- a/README.md +++ b/README.md @@ -176,14 +176,14 @@ Additional deployment examples: This repository contains two application projects: - Backend: [`booklore-api/README.md`](booklore-api/README.md) -- Frontend: [`booklore-ui/README.md`](booklore-ui/README.md) +- Frontend: [`frontend/README.md`](frontend/README.md) Contributor workflow, PR policy, and release semantics live in [CONTRIBUTING.md](CONTRIBUTING.md). Component-specific implementation guidance lives in: - [`booklore-api/CONTRIBUTING.md`](booklore-api/CONTRIBUTING.md) -- [`booklore-ui/CONTRIBUTING.md`](booklore-ui/CONTRIBUTING.md) +- [`frontend/CONTRIBUTING.md`](frontend/CONTRIBUTING.md) -The root [`Justfile`](Justfile) is the primary local command surface and mirrors the folder-local `booklore-api/Justfile` and `booklore-ui/Justfile` entrypoints. +The root [`Justfile`](Justfile) is the primary local command surface and mirrors the folder-local `booklore-api/Justfile` and `frontend/Justfile` entrypoints. ```bash just # Show root + api + ui recipes diff --git a/booklore-api/build.gradle.kts b/booklore-api/build.gradle.kts index 8eb1ddc45..717db1ef9 100644 --- a/booklore-api/build.gradle.kts +++ b/booklore-api/build.gradle.kts @@ -16,7 +16,7 @@ plugins { group = "org.booklore" version = "0.0.1-SNAPSHOT" -val defaultFrontendDistDir = file("${rootDir}/../booklore-ui/dist/grimmory/browser") +val defaultFrontendDistDir = file("${rootDir}/../frontend/dist/grimmory/browser") val configuredFrontendDistDir = providers.gradleProperty("frontendDistDir") .map { file(it) } diff --git a/dev.docker-compose.yml b/dev.docker-compose.yml index 57754c41a..a29f276ca 100644 --- a/dev.docker-compose.yml +++ b/dev.docker-compose.yml @@ -58,7 +58,7 @@ services: tty: true restart: unless-stopped volumes: - - './booklore-ui:/angular-app' + - './frontend:/angular-app' # you can have node_modules in a volume. however, if you enable this, expect trouble in some IDEs, as the deps are not available anymore # - node_modules:/angular-app/node_modules diff --git a/scripts/i18n/weblate-setup.sh b/scripts/i18n/weblate-setup.sh index 39d7e4587..0cbc45269 100755 --- a/scripts/i18n/weblate-setup.sh +++ b/scripts/i18n/weblate-setup.sh @@ -26,7 +26,7 @@ PROJECT_WEB="https://github.com/grimmory-tools/grimmory" REPO_URL="https://github.com/grimmory-tools/grimmory.git" REPO_BRANCH="develop" -FILE_BASE="booklore-ui/src/i18n" +FILE_BASE="frontend/src/i18n" SOURCE_LANG="en"