Skip to content

Commit 6ccc901

Browse files
authored
Merge pull request #57 from KOliver94/next
Backend refactor
2 parents 7e7198e + 08d97fc commit 6ccc901

489 files changed

Lines changed: 27039 additions & 7176 deletions

File tree

Some content is hidden

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

.github/renovate.json

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
":dependencyDashboard",
5+
":disableRateLimiting",
6+
":enableVulnerabilityAlertsWithLabel(security)",
7+
":ignoreModulesAndTests",
8+
":ignoreUnstable",
9+
":label(dependencies)",
10+
":maintainLockFilesMonthly",
11+
":pinAllExceptPeerDependencies",
12+
":separateMajorReleases",
13+
":timezone(Europe/Budapest)",
14+
"abandonments:recommended",
15+
"group:monorepos",
16+
"group:recommended",
17+
"replacements:all",
18+
"schedule:weekends",
19+
"workarounds:all"
20+
],
21+
"packageRules": [
22+
{
23+
"description": "Gradle wrapper (automerge)",
24+
"matchManagers": [
25+
"gradle-wrapper"
26+
],
27+
"additionalBranchPrefix": "backend/",
28+
"addLabels": [
29+
"backend"
30+
],
31+
"automerge": true
32+
},
33+
{
34+
"description": "Backend major updates",
35+
"matchManagers": [
36+
"gradle"
37+
],
38+
"matchFileNames": [
39+
"backend/**"
40+
],
41+
"matchUpdateTypes": [
42+
"major"
43+
],
44+
"additionalBranchPrefix": "backend/",
45+
"addLabels": [
46+
"backend"
47+
],
48+
"groupName": "backend major"
49+
},
50+
{
51+
"description": "Backend minor and patch updates (automerge)",
52+
"matchManagers": [
53+
"gradle"
54+
],
55+
"matchFileNames": [
56+
"backend/**"
57+
],
58+
"matchUpdateTypes": [
59+
"minor",
60+
"patch",
61+
"digest"
62+
],
63+
"additionalBranchPrefix": "backend/",
64+
"addLabels": [
65+
"backend"
66+
],
67+
"groupName": "backend non-major",
68+
"automerge": true
69+
},
70+
{
71+
"description": "Frontend major updates",
72+
"matchFileNames": [
73+
"frontend/**"
74+
],
75+
"matchUpdateTypes": [
76+
"major"
77+
],
78+
"additionalBranchPrefix": "frontend/",
79+
"addLabels": [
80+
"frontend"
81+
],
82+
"groupName": "frontend major"
83+
},
84+
{
85+
"description": "Frontend minor and patch updates",
86+
"matchFileNames": [
87+
"frontend/**"
88+
],
89+
"matchUpdateTypes": [
90+
"minor",
91+
"patch",
92+
"digest"
93+
],
94+
"additionalBranchPrefix": "frontend/",
95+
"addLabels": [
96+
"frontend"
97+
],
98+
"groupName": "frontend non-major"
99+
},
100+
{
101+
"description": "GitHub Actions",
102+
"matchManagers": [
103+
"github-actions"
104+
],
105+
"groupName": "github-actions",
106+
"addLabels": [
107+
"ci"
108+
]
109+
},
110+
{
111+
"description": "Docker base images",
112+
"matchManagers": [
113+
"dockerfile",
114+
"docker-compose"
115+
],
116+
"addLabels": [
117+
"docker"
118+
]
119+
}
120+
],
121+
"rebaseWhen": "conflicted"
122+
}

.github/workflows/backend-ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Backend CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'backend/**'
8+
- '.github/workflows/backend-ci.yml'
9+
pull_request:
10+
branches: [main]
11+
paths:
12+
- 'backend/**'
13+
- '.github/workflows/backend-ci.yml'
14+
15+
defaults:
16+
run:
17+
working-directory: backend
18+
19+
jobs:
20+
check:
21+
name: Build and test
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
actions: read
26+
checks: write
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v6
31+
with:
32+
fetch-tags: true
33+
34+
- name: Set up JDK 25
35+
uses: actions/setup-java@v5
36+
with:
37+
distribution: temurin
38+
java-version: 25
39+
40+
- name: Setup Gradle
41+
uses: gradle/actions/setup-gradle@v5
42+
43+
- name: Check formatting
44+
run: ./gradlew spotlessCheck
45+
46+
- name: Build and check
47+
run: ./gradlew check
48+
49+
- name: Upload coverage to Codecov
50+
if: always()
51+
uses: codecov/codecov-action@v5
52+
with:
53+
files: backend/build/reports/jacoco/test/jacocoTestReport.xml
54+
flags: backend
55+
token: ${{ secrets.CODECOV_TOKEN }}
56+
57+
- name: Upload test results to Codecov
58+
if: always()
59+
uses: codecov/codecov-action@v5
60+
with:
61+
directory: backend
62+
flags: backend
63+
report_type: test_results
64+
token: ${{ secrets.CODECOV_TOKEN }}
65+
66+
- name: Upload generated PDFs
67+
if: always()
68+
uses: actions/upload-artifact@v7
69+
with:
70+
name: generated-pdfs
71+
path: backend/build/test-output/
72+
if-no-files-found: ignore
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Docker Publish
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*.*.*']
7+
pull_request:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
14+
jobs:
15+
build-and-push:
16+
name: Build and push (${{ matrix.component }})
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- component: backend
26+
context: backend
27+
- component: frontend
28+
context: frontend
29+
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v6
33+
with:
34+
fetch-tags: true
35+
36+
- name: Resolve version
37+
id: version
38+
run: |
39+
raw=$(git describe --tags --always)
40+
tag=${raw#v}
41+
42+
if [ "$raw" = "$(git tag --points-at HEAD)" ]; then
43+
echo "value=v$tag" >> "$GITHUB_OUTPUT"
44+
else
45+
hash=$(git rev-parse --short HEAD)
46+
branch=$(git rev-parse --abbrev-ref HEAD | tr '/' '-')
47+
case "$branch" in
48+
main) echo "value=v$tag-$hash" >> "$GITHUB_OUTPUT" ;;
49+
*) echo "value=v$tag-$branch-$hash" >> "$GITHUB_OUTPUT" ;;
50+
esac
51+
fi
52+
53+
- name: Set up Docker Buildx
54+
uses: docker/setup-buildx-action@v4
55+
56+
- name: Log into registry ${{ env.REGISTRY }}
57+
if: github.event_name != 'pull_request'
58+
uses: docker/login-action@v4
59+
with:
60+
registry: ${{ env.REGISTRY }}
61+
username: ${{ github.actor }}
62+
password: ${{ secrets.GITHUB_TOKEN }}
63+
64+
- name: Extract Docker metadata
65+
id: meta
66+
uses: docker/metadata-action@v6
67+
with:
68+
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.component }}
69+
tags: |
70+
type=ref,event=branch
71+
type=ref,event=pr
72+
type=semver,pattern={{version}}
73+
type=semver,pattern={{major}}.{{minor}}
74+
75+
- name: Build and push Docker image
76+
uses: docker/build-push-action@v7
77+
with:
78+
context: ${{ matrix.context }}
79+
build-args: VERSION=${{ steps.version.outputs.value }}
80+
secrets: SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
81+
push: ${{ github.event_name != 'pull_request' }}
82+
tags: ${{ steps.meta.outputs.tags }}
83+
labels: ${{ steps.meta.outputs.labels }}
84+
cache-from: type=gha,scope=${{ matrix.component }}
85+
cache-to: type=gha,mode=max,scope=${{ matrix.component }}

backend/.dockerignore

Lines changed: 13 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,16 @@
1-
### Java template
2-
# Compiled class file
3-
*.class
4-
5-
# Log file
6-
*.log
7-
8-
# BlueJ files
9-
*.ctxt
10-
11-
# Mobile Tools for Java (J2ME)
12-
.mtj.tmp/
13-
14-
# Package Files #
15-
*.jar
16-
*.war
17-
*.nar
18-
*.ear
19-
*.zip
20-
*.tar.gz
21-
*.rar
22-
23-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
24-
hs_err_pid*
25-
26-
### JetBrains template
27-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
28-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
29-
30-
# User-specific stuff
31-
.idea/**/workspace.xml
32-
.idea/**/tasks.xml
33-
.idea/**/usage.statistics.xml
34-
.idea/**/dictionaries
35-
.idea/**/shelf
36-
37-
# Generated files
38-
.idea/**/contentModel.xml
39-
40-
# Sensitive or high-churn files
41-
.idea/**/dataSources/
42-
.idea/**/dataSources.ids
43-
.idea/**/dataSources.local.xml
44-
.idea/**/sqlDataSources.xml
45-
.idea/**/dynamic.xml
46-
.idea/**/uiDesigner.xml
47-
.idea/**/dbnavigator.xml
48-
49-
# Gradle
50-
.idea/**/gradle.xml
51-
.idea/**/libraries
52-
53-
# Gradle and Maven with auto-import
54-
# When using Gradle or Maven with auto-import, you should exclude module files,
55-
# since they will be recreated, and may cause churn. Uncomment if using
56-
# auto-import.
57-
# .idea/artifacts
58-
# .idea/compiler.xml
59-
# .idea/jarRepositories.xml
60-
# .idea/modules.xml
61-
# .idea/*.iml
62-
# .idea/modules
63-
# *.iml
64-
# *.ipr
65-
66-
# CMake
67-
cmake-build-*/
68-
69-
# Mongo Explorer plugin
70-
.idea/**/mongoSettings.xml
71-
72-
# File-based project format
73-
*.iws
74-
75-
# IntelliJ
1+
.git
2+
.gradle
3+
build/
4+
.idea
5+
.vscode
766
out/
7+
pdf/*.pdf
8+
Dockerfile
9+
docker-compose.yml
7710

78-
# mpeltonen/sbt-idea plugin
79-
.idea_modules/
80-
81-
# JIRA plugin
82-
atlassian-ide-plugin.xml
83-
84-
# Cursive Clojure plugin
85-
.idea/replstate.xml
86-
87-
# Crashlytics plugin (for Android Studio and IntelliJ)
88-
com_crashlytics_export_strings.xml
89-
crashlytics.properties
90-
crashlytics-build.properties
91-
fabric.properties
92-
93-
# Editor-based Rest Client
94-
.idea/httpRequests
95-
96-
# Android studio 3.1+ serialized cache file
97-
.idea/caches/build_file_checksums.ser
11+
*.iws
12+
*.iml
13+
*.ipr
9814

15+
*.log
16+
hs_err_pid*

0 commit comments

Comments
 (0)