Skip to content

Commit 3e854d2

Browse files
authored
Merge pull request #2860 from booklore-app/develop
Merge develop into master for release
2 parents 53f448f + b262ab2 commit 3e854d2

File tree

2,524 files changed

+186798
-57133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,524 files changed

+186798
-57133
lines changed

.dockerignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.git
2+
.github
3+
.idea
4+
.vscode
5+
.angular
6+
7+
booklore-ui/node_modules
8+
booklore-ui/dist
9+
booklore-ui/.angular
10+
booklore-ui/test-results
11+
12+
booklore-api/build/reports
13+
booklore-api/build/test-results
14+
15+
*.md

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
44
patreon: # Replace with a single Patreon username
55
open_collective: booklore
6-
ko_fi: # Replace with a single Ko-fi username
6+
ko_fi: bookloredev
77
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
88
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
99
liberapay: # Replace with a single Liberapay username

.github/pull_request_template.md

Lines changed: 78 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,102 @@
1-
## 🚀 Pull Request
1+
## 📝 Description
22

3-
### 📝 Description
3+
<!-- Why is this change needed? Explain in your own words. -->
44

5-
<!-- Provide a clear and concise summary of the changes introduced in this pull request -->
6-
<!-- Reference related issues using "Fixes #123", "Closes #456", or "Relates to #789" -->
5+
**Linked Issue:** Fixes #<!-- issue number -->
76

8-
### 🛠️ Changes Implemented
7+
> **Required.** Every PR must reference an approved issue. If no issue exists, [open one](https://github.com/booklore-app/booklore/issues/new) and wait for maintainer approval before submitting a PR. Unsolicited PRs without a linked issue will be closed.
98
10-
<!-- Detail the specific modifications, additions, or removals made in this pull request -->
11-
-
9+
## 🏷️ Type of Change
1210

13-
### 🧪 Testing Strategy
11+
- [ ] Bug fix
12+
- [ ] New feature
13+
- [ ] Enhancement to existing feature
14+
- [ ] Refactor (no behavior change)
15+
- [ ] Breaking change (existing functionality affected)
16+
- [ ] Documentation update
1417

15-
<!-- Describe the testing methodology used to verify the correctness of these changes -->
16-
<!-- Include testing approach, scenarios covered, and edge cases considered -->
18+
## 🔧 Changes
1719

18-
### 📸 Visual Changes _(if applicable)_
20+
<!-- List the specific modifications made -->
21+
-
1922

20-
<!-- Attach screenshots or videos demonstrating UI/UX modifications -->
23+
## 🧪 Testing (MANDATORY)
2124

25+
> **PRs without this section filled out will be closed.** "Tests pass" or "Tested locally" is not sufficient. You must provide specifics.
2226
23-
---
27+
**Manual testing steps you performed:**
28+
<!-- Walk through the exact steps you took to verify your change works. Be specific. -->
29+
1.
30+
2.
31+
3.
32+
33+
**Regression testing:**
34+
<!-- How did you verify that existing related features still work after your change? -->
35+
-
36+
37+
**Edge cases covered:**
38+
<!-- What boundary conditions or unusual inputs did you test? -->
39+
-
40+
41+
**Test output:**
42+
<!-- Paste the actual terminal output from running tests. Not "all pass", the real output. -->
43+
44+
<details>
45+
<summary>Backend test output (<code>./gradlew test</code>)</summary>
46+
47+
```
48+
PASTE OUTPUT HERE
49+
```
2450

25-
## ⚠️ Required Pre-Submission Checklist
51+
</details>
2652

27-
### **Please Read - This Checklist is Mandatory**
53+
<details>
54+
<summary>Frontend test output (<code>ng test</code>)</summary>
2855

29-
> **Important Notice:** We've experienced several production bugs recently due to incomplete pre-submission checks. To maintain code quality and prevent issues from reaching production, we're enforcing stricter adherence to this checklist.
30-
>
31-
> **All checkboxes below must be completed before requesting review.** PRs that haven't completed these requirements will be sent back for completion.
56+
```
57+
PASTE OUTPUT HERE
58+
```
3259

33-
#### **Mandatory Requirements** _(please check ALL boxes)_:
60+
</details>
61+
62+
## 📸 Screen Recording / Screenshots (MANDATORY)
63+
64+
> Every PR must include a **screen recording or screenshots** showing the change working end-to-end in a running local instance (both backend and frontend). This means you must have actually built, run, and tested the code yourself. PRs without visual proof will be closed without review.
65+
66+
<!-- Attach screen recording or screenshots here -->
67+
68+
---
3469

35-
- [ ] **Code adheres to project style guidelines and conventions**
36-
- [ ] **Branch synchronized with latest `develop` branch** _(please resolve any merge conflicts)_
37-
- [ ] **🚨 CRITICAL: Automated unit tests added/updated to cover changes** _(MANDATORY for ALL Spring Boot backend and Angular frontend changes - this is non-negotiable)_
38-
- [ ] **🚨 CRITICAL: All tests pass locally** _(run `./gradlew test` for Spring Boot backend, and `ng test` for Angular frontend - NO EXCEPTIONS)_
39-
- [ ] **🚨 CRITICAL: Manual testing completed in local development environment** _(verify your changes work AND no existing functionality is broken - test related features thoroughly)_
40-
- [ ] **Flyway migration versioning follows correct sequence** _(if database schema was modified)_
41-
- [ ] **Documentation PR submitted to [booklore-docs](https://github.com/booklore-app/booklore-docs)** _(required for features or enhancements that introduce user-facing or visual changes)_
70+
## ✅ Pre-Submission Checklist
4271

43-
#### **Why This Matters:**
72+
> **All boxes must be checked before requesting review.** Incomplete PRs will be closed without review. No exceptions.
4473
45-
Recent production incidents have been traced back to:
74+
- [ ] This PR is linked to an approved issue
75+
- [ ] Code follows project style guidelines and conventions
76+
- [ ] Branch is up to date with `develop` (merge conflicts resolved)
77+
- [ ] I ran the full stack locally (backend + frontend + database) and verified the change works
78+
- [ ] Automated tests added or updated to cover changes (backend **and** frontend)
79+
- [ ] All tests pass locally and output is pasted above
80+
- [ ] Screen recording or screenshots are attached above proving the change works
81+
- [ ] PR is a single focused change (one bug fix OR one feature, not multiple unrelated changes)
82+
- [ ] PR is reasonably scoped (PRs over 1000+ changed lines will be closed, split into smaller PRs)
83+
- [ ] No unsolicited refactors, cleanups, or "improvements" are bundled in
84+
- [ ] Flyway migration versioning is correct _(if schema was modified)_
85+
- [ ] Documentation PR submitted to [booklore-docs](https://github.com/booklore-app/booklore-docs) _(if user-facing changes)_
4686

47-
- **Incomplete testing coverage (especially backend)**
48-
- Merge conflicts not resolved before merge
49-
- Missing documentation for new features
87+
### 🤖 AI-Assisted Contributions
5088

51-
**Backend changes without tests will not be accepted.** By completing this checklist thoroughly, you're helping maintain the quality and stability of Booklore for all users.
89+
> **If any part of this PR was generated or assisted by AI tools (Copilot, Claude, ChatGPT, etc.), all items below are mandatory.** You are fully responsible for every line you submit. "The AI wrote it" is not an excuse, and AI-generated PRs that clearly haven't been reviewed are the #1 reason PRs get closed.
5290
53-
**Note to Reviewers:** Please verify the checklist is complete before beginning your review. If items are unchecked, kindly ask the contributor to complete them first.
91+
- [ ] I have read and understand every line of this PR and can explain any part of it during review
92+
- [ ] I personally ran the code and verified it works (not just trusted the AI's output)
93+
- [ ] PR is scoped to a single logical change, not a dump of everything the AI suggested
94+
- [ ] Tests validate actual behavior, not just coverage (AI-generated tests often assert nothing meaningful)
95+
- [ ] No dead code, placeholder comments, `TODO`s, or unused scaffolding left behind by AI
96+
- [ ] I did not submit refactors, style changes, or "improvements" the AI suggested beyond the scope of the issue
5497

5598
---
5699

57-
### 💬 Additional Context _(optional)_
100+
## 💬 Additional Context _(optional)_
58101

59-
<!-- Provide any supplementary information, implementation considerations, or discussion points for reviewers -->
102+
<!-- Any extra information or discussion points for reviewers -->

.github/release-drafter.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ categories:
2727
labels:
2828
- 'bug'
2929
- 'fix'
30+
- title: '⚡ Performance'
31+
labels:
32+
- 'performance'
3033
- title: '🛠️ Refactoring & Maintenance'
3134
labels:
3235
- 'refactor'

.github/workflows/develop-pipeline.yml

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
- name: Checkout Repository
3232
uses: actions/checkout@v6
3333

34-
- name: Set Up JDK 21
34+
- name: Set Up JDK 25
3535
uses: actions/setup-java@v5
3636
with:
37-
java-version: '21'
37+
java-version: '25'
3838
distribution: 'temurin'
3939
cache: gradle
4040

@@ -85,7 +85,7 @@ jobs:
8585
uses: actions/checkout@v6
8686

8787
- name: Set Up Node.js
88-
uses: actions/setup-node@v4
88+
uses: actions/setup-node@v6
8989
with:
9090
node-version: '22'
9191
cache: 'npm'
@@ -140,15 +140,6 @@ jobs:
140140
with:
141141
fetch-depth: 0
142142

143-
# ----------------------------------------
144-
# Environment setup
145-
# ----------------------------------------
146-
- name: Set Up QEMU for Multi-Arch Builds
147-
uses: docker/setup-qemu-action@v3
148-
149-
- name: Set Up Docker Buildx
150-
uses: docker/setup-buildx-action@v3
151-
152143
# ----------------------------------------
153144
# Image tagging
154145
# ----------------------------------------
@@ -166,6 +157,58 @@ jobs:
166157
echo "image_tag=$image_tag" >> $GITHUB_ENV
167158
echo "Image tag: $image_tag"
168159
160+
# ----------------------------------------
161+
# Native Angular build
162+
# ----------------------------------------
163+
- name: Set Up Node.js
164+
uses: actions/setup-node@v6
165+
with:
166+
node-version: '22'
167+
cache: 'npm'
168+
cache-dependency-path: booklore-ui/package-lock.json
169+
170+
- name: Install Frontend Dependencies
171+
working-directory: ./booklore-ui
172+
run: npm ci --force
173+
174+
- name: Build Angular App
175+
working-directory: ./booklore-ui
176+
run: npx ng build --configuration=production
177+
178+
# ----------------------------------------
179+
# Native Gradle build
180+
# ----------------------------------------
181+
- name: Set Up JDK 25
182+
uses: actions/setup-java@v5
183+
with:
184+
java-version: '25'
185+
distribution: 'temurin'
186+
cache: gradle
187+
188+
- name: Copy Angular Dist to Spring Boot Resources
189+
run: cp -r booklore-ui/dist/booklore/browser/. booklore-api/src/main/resources/static/
190+
191+
- name: Inject Version into application.yaml
192+
env:
193+
APP_VERSION: ${{ env.image_tag }}
194+
run: |
195+
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.52.2/yq_linux_amd64
196+
sudo chmod +x /usr/local/bin/yq
197+
yq eval '.app.version = strenv(APP_VERSION)' -i booklore-api/src/main/resources/application.yaml
198+
199+
- name: Build Spring Boot JAR
200+
working-directory: ./booklore-api
201+
run: ./gradlew clean build -x test --no-daemon --parallel --build-cache
202+
203+
# ----------------------------------------
204+
# Environment setup
205+
# ----------------------------------------
206+
- name: Set Up QEMU for Multi-Arch Builds
207+
uses: docker/setup-qemu-action@v3
208+
209+
- name: Set Up Docker Buildx
210+
uses: docker/setup-buildx-action@v3
211+
169212
# ----------------------------------------
170213
# Docker login (pushes & internal PRs only)
171214
# ----------------------------------------
@@ -192,6 +235,7 @@ jobs:
192235
uses: docker/build-push-action@v6
193236
with:
194237
context: .
238+
file: Dockerfile.ci
195239
platforms: linux/amd64,linux/arm64
196240
push: true
197241
tags: |

.github/workflows/master-pipeline.yml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ jobs:
4343
- name: Checkout Repository
4444
uses: actions/checkout@v6
4545

46-
- name: Set Up JDK 21
46+
- name: Set Up JDK 25
4747
uses: actions/setup-java@v5
4848
with:
49-
java-version: '21'
49+
java-version: '25'
5050
distribution: 'temurin'
5151
cache: gradle
5252

@@ -97,7 +97,7 @@ jobs:
9797
uses: actions/checkout@v6
9898

9999
- name: Set Up Node.js
100-
uses: actions/setup-node@v4
100+
uses: actions/setup-node@v6
101101
with:
102102
node-version: '22'
103103
cache: 'npm'
@@ -234,10 +234,57 @@ jobs:
234234
echo "bump=$bump" >> $GITHUB_ENV
235235
echo "new_tag=$next_version" >> $GITHUB_ENV
236236
237+
# ----------------------------------------
238+
# Native Angular build
239+
# ----------------------------------------
240+
- name: Set Up Node.js
241+
uses: actions/setup-node@v6
242+
with:
243+
node-version: '22'
244+
cache: 'npm'
245+
cache-dependency-path: booklore-ui/package-lock.json
246+
247+
- name: Install Frontend Dependencies
248+
working-directory: ./booklore-ui
249+
run: npm ci --force
250+
251+
- name: Build Angular App
252+
working-directory: ./booklore-ui
253+
run: npx ng build --configuration=production
254+
255+
# ----------------------------------------
256+
# Native Gradle build
257+
# ----------------------------------------
258+
- name: Set Up JDK 25
259+
uses: actions/setup-java@v5
260+
with:
261+
java-version: '25'
262+
distribution: 'temurin'
263+
cache: gradle
264+
265+
- name: Copy Angular Dist to Spring Boot Resources
266+
run: cp -r booklore-ui/dist/booklore/browser/. booklore-api/src/main/resources/static/
267+
268+
- name: Inject Version into application.yaml
269+
env:
270+
APP_VERSION: ${{ env.new_tag }}
271+
run: |
272+
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.52.2/yq_linux_amd64
273+
sudo chmod +x /usr/local/bin/yq
274+
yq eval '.app.version = strenv(APP_VERSION)' -i booklore-api/src/main/resources/application.yaml
275+
276+
- name: Build Spring Boot JAR
277+
working-directory: ./booklore-api
278+
run: ./gradlew clean build -x test --no-daemon --parallel --build-cache
279+
280+
# ----------------------------------------
281+
# Docker build & push
282+
# ----------------------------------------
237283
- name: Build and push Docker image
238284
uses: docker/build-push-action@v6
239285
with:
240286
context: .
287+
file: Dockerfile.ci
241288
platforms: linux/amd64,linux/arm64
242289
push: true
243290
tags: |

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ local-scripts/
4545
### Dev config, books, and data ###
4646
booklore-ui/test-results/
4747
booklore-api/src/main/resources/application-local.yaml
48-
/shared/
48+
/shared/

0 commit comments

Comments
 (0)