Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
aca74f5
feat: Implement OIDC user sync and update Profile page
furcev32 Nov 29, 2025
3e1aace
chore: Update Docker configuration and documentation
furcev32 Nov 29, 2025
bf3b53d
refactor: Update API endpoints to use /api prefix
furcev32 Nov 29, 2025
def75bf
feat: optimize build process and add comprehensive testing infrastruc…
furcev32 Nov 29, 2025
c3510aa
#32: Remove redundant dark mode initialization in main.tsx
furcev32 Dec 2, 2025
d44be3b
#32: Move API usage documentation to top of file
furcev32 Dec 2, 2025
34eeed2
#32: Update Dockerfile for cross-platform compatibility
Dec 4, 2025
f0e5492
#32: Refactor backend to hexagonal architecture
Dec 6, 2025
ee02fcf
#32: Expose MariaDB port 3306 in dev docker-compose
Dec 14, 2025
b13167a
feat: Implement Phase 1 - Create User Domain in Hexagonal Architecture
furcev32 Dec 20, 2025
f7928ac
#32: Test: Add comprehensive tests for user domain services (Phase 5)…
furcev32 Dec 20, 2025
833e158
#32: Refactor: Remove duplicate AuthService and OidcUserSyncService (…
furcev32 Dec 20, 2025
21f33d2
fix: Fix .dockerignore excluding ports/out directory
furcev32 Dec 20, 2025
df305b2
#32: Build: Optimize Dockerfile and expand .dockerignore
furcev32 Dec 21, 2025
87343c1
Merge branch 'feature/32-feature-user-persistence-store-oidc-profile-…
furcev32 Dec 21, 2025
02381f7
#57: Update tests to match architectural changes and refactoring
furcev32 Dec 21, 2025
da46538
#57: Complete hexagonal architecture refactoring and Lombok integration
furcev32 Dec 21, 2025
2633f48
#57: Fix MapStruct mapping errors after Lombok integration
furcev32 Dec 21, 2025
887dd1c
#57: Refactor Auth flow and ownership verification
furcev32 Dec 22, 2025
a2dde42
#57: Refactor AuthService to remove Spring Security dependency from a…
furcev32 Dec 22, 2025
d792ba1
#57: Complete Lombok migration and convert UserJpaMapper to MapStruct
furcev32 Dec 22, 2025
94a831f
#57: Add backend debugging support and comprehensive logging to services
furcev32 Dec 22, 2025
98257f2
#57: Fix UUID conversion bug in DirectoryJpaAdapter
furcev32 Dec 22, 2025
1049d59
#57: Fix JDT NullPointerException in MapStruct processing
furcev32 Dec 22, 2025
18bbd64
#57: Fix 500 error on project list and improve authentication mapping
Jan 8, 2026
77e2d56
#57: Refactor UUID conversion to shared JpaUtils and update documenta…
Jan 13, 2026
608f692
Setup Spotless and Checkstyle for backend
Jan 19, 2026
27c4f8e
Apply Spotless formatting to all backend files
Jan 19, 2026
af3708c
Merge pull request #98 from MoQel/feature/checkstyle-setup
furcev32 Jan 19, 2026
205db6c
#57: Refactor authentication architecture and consolidate filesystem …
Jan 19, 2026
f7e9d5c
Merge branch 'origin/development' into merge/57-with-32-user-persiste…
Jan 19, 2026
dad3545
#57: Fix API paths and apply formatting across backend and frontend
Jan 19, 2026
65105bc
#57: Update MapStruct policies and cleanup backend formatting
Jan 19, 2026
fa79d47
#57: Simplify FileElement type definition in frontend
Jan 19, 2026
89441e1
#57: Add GitHub Action for automatic Java formatting and update READM…
Jan 22, 2026
1f0c380
style: auto-format Java code with Spotless
github-actions[bot] Jan 22, 2026
5bfbfba
#57: Expand CI triggers to include merge and feature branches
Jan 22, 2026
f5274d6
#57: Decouple Spotless from main CI and handle it exclusively in auto…
Jan 22, 2026
907fbad
#57: Fix duplicate CI runs and enable formatter visibility on PRs
Jan 22, 2026
4da059c
style: auto-format Java code with Spotless
github-actions[bot] Jan 22, 2026
d59b302
#57: Testing the Auto-format github actions pipline.
Jan 22, 2026
35705b3
style: auto-format Java code with Spotless
github-actions[bot] Jan 22, 2026
390d5d8
#57: Consolidate CI and formatting into a single workflow
Jan 22, 2026
661b0d9
style: auto-format Java code with Spotless
github-actions[bot] Jan 22, 2026
03c7373
#57: Correct job naming for PR protection and fix token-based build b…
Jan 22, 2026
eeb99af
#57: Testing the Auto-format github actions pipline.
Jan 22, 2026
92555d0
style: auto-format Java code with Spotless
furcev32 Jan 22, 2026
2a35fb3
#57: Refactor PR CI pipeline and add independent auto-format job
Jan 22, 2026
2920f6d
#57: Restore standard job names and add push triggers for main branches
Jan 22, 2026
ba9bdb7
#57: Testing the Auto-format github actions pipline.
Jan 22, 2026
947c93e
style: auto-format Java code with Spotless [skip ci]
furcev32 Jan 22, 2026
1f96170
#57: Add [skip ci] support to prevent infinite CI loops from auto-for…
Jan 22, 2026
a2146fa
#57: Simplify CI by removing auto-commit and adding formatting check/…
Jan 23, 2026
c2f1b33
#57: Use standard lowercase job names for CI
Jan 23, 2026
9445ad1
#57: Update git workflow with auto-formatting and apply Spotless
Jan 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .agent/workflows/git.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
description: Automated Git workflow to analyze message patterns, format code, stage, commit, and push changes.
---

// turbo-all
1. Run `git status` to identify current changes and untracked files.
2. Run `git log -n 15 --pretty=format:"%s"` to analyze the recent commit message style, prefixes, and patterns used in the repository.
3. Apply code formatting in the backend by running `./gradlew spotlessApply` in the `backend` directory.
4. Stage all changes in the repository using `git add .`.
5. Based on the analysis in step 2 and the changes identified in step 1, generate a commit message that follows the project's style and run `git commit -m "<commit_message>"`.
6. Push the committed changes to the current branch using `git push`.
76 changes: 48 additions & 28 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,78 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle
name: PR CI Pipeline

on:
push:
branches:
- "development"
- "main"
pull_request:
branches: [ "development" ]
branches:
- "development"
- "main"
- "merge/**"
- "feature/**"

permissions:
contents: read
pull-requests: read

jobs:
test:
name: test
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up JDK 21
uses: actions/setup-java@v4.7.1
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.4.2
- name: Run tests
uses: gradle/actions/setup-gradle@v4

- name: Check Code Formatting (Spotless)
if: github.event_name == 'pull_request'
run: |
cd backend
./gradlew spotlessCheck || {
echo "❌ Code formatting check failed!"
echo ""
echo "Please run the following command locally to fix formatting:"
echo " cd backend && ./gradlew spotlessApply"
echo ""
echo "Then commit and push the changes."
exit 1
}

- name: Run Checkstyle
run: cd backend && ./gradlew checkstyleMain checkstyleTest

- name: Run Tests
run: cd backend && ./gradlew :test

build:
name: build
needs: test
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up JDK 21
uses: actions/setup-java@v4.7.1
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.4.2

- name: Setup Node
uses: actions/setup-node@v4
uses: gradle/actions/setup-gradle@v4

- name: Build with Gradle Wrapper
- name: Build with Gradle
run: cd backend && ./gradlew :bootJar

# - name: Upload built jar
# uses: actions/upload-artifact@v4
# with:
# name: Application
# path: backend/build/libs/*.jar
104 changes: 83 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,59 +10,115 @@ This repository contains the source code for the Quantum Kit (QuaK) Web IDE.

## Docker Workflows

### Development Workflow (Recommended)
This is the **preferred way** to develop locally. It ensures a consistent environment and supports hot-reloading.
### Development Workflow (Docker-only)

This ensures a consistent environment and supports hot-reloading.

1. **Start Backend & Database:**
* **Linux/macOS:**

1. **Start Backend & Database:**
* **Linux/macOS:**
```bash
sudo docker-compose -f docker-compose.dev.yaml up --build
docker compose -f docker-compose.dev.yaml up --build
```
* **Windows:**

* **Windows:**

```powershell
docker-compose -f docker-compose.dev.yaml up --build
```
* Runs the Spring Boot backend on port `8080`.
* Runs MariaDB on port `3306`.
* *Note:* The backend does **not** serve frontend files in this mode.

2. **Start Frontend:**
* Runs the Spring Boot backend on port `8080`.
* Runs MariaDB on port `3306`.
* *Note:* The backend does **not** serve frontend files in this mode.

2. **Start Frontend:**
In a new terminal:

```bash
cd frontend
npm run dev
```
* Runs the Vite dev server on port `5173`.
* Proxies API requests to `localhost:8080`.
* Access the app at `http://localhost:5173`.

### Hybrid Workflow (Debugger-Friendly)

**Recommended for backend development.** This allows you to run the backend in your IDE or via terminal with a debugger while using Docker for the database.

1. **Start Database:**

```bash
docker-compose -f docker-compose.dev.yaml up -d database
```

2. **Start Backend (with Debugging):**
You can run the backend in debug mode via terminal. It will listen on port **5005** for a debugger while the API remains on **8080**.

```bash
cd backend
./gradlew bootRun -PjvmArgs="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
```

* **Port 8080:** Standard Web/API (Frontend stays connected).
* **Port 5005:** Debugging (Connect your IDE here via "Remote JVM Debug").

3. **Start Frontend:**

```bash
cd frontend
npm run dev
```

Access the app at `http://localhost:5173`.

### Production Workflow

To run the full application (Backend + Frontend served statically):

1. **Start Application:**
1. **Start Application:**

```bash
sudo docker-compose -f docker-compose.prod.yaml up --build
docker compose -f docker-compose.prod.yaml up --build
```
* Builds the frontend and serves it via the backend (or Nginx if configured).
* Runs the Spring Boot backend and MariaDB.
* Access the app at `http://localhost:8080` (or the configured production port).

* Builds the frontend and serves it via the backend (or Nginx if configured).
* Runs the Spring Boot backend and MariaDB.
* Access the app at `http://localhost:8080` (or the configured production port).

## Developing

Please have a look at the [developer guidelines](/docs/DEVELOPMENT.md).

## Testing

### Backend Tests

To run the backend tests, execute the following command in the `backend` directory:

```bash
./gradlew test
```

### Frontend Tests

To run the frontend tests, execute the following command in the `frontend` directory:

```bash
npm run test
```

## Deployment

The project will automatically be deployed when a change to the _development_-branch happens.
The project will automatically be deployed when a change to the *development*-branch happens.

### Setting up the Deployment Server

On a server of your choice, set up the following:

* [Docker](https://docs.docker.com/engine/install/)
* [Dokku](https://dokku.com/docs/getting-started/installation/)
* Make sure to enable `vhost` during the installation-dialog (this is the default)

Then, run the following commands:

```bash
dokku apps:create quak
dokku builder:set quak build-dir backend
Expand All @@ -74,25 +130,31 @@ cat github
# Save the content of the private for later
# You may also want to move the ssh-keys somewhere else
```

We now want to set the GitHub-Secrets inside this repository:
* _DEPLOYMENT_SERVER_ADDRESS_
* _DEPLOYMENT_SERVER_SSH_KEY_

* *DEPLOYMENT_SERVER_ADDRESS*
* *DEPLOYMENT_SERVER_SSH_KEY*
* This has the content of the private-key generated above

Lastly, make sure that all relevant ports (e.g. 8080) are exposed to the outside world.

## Legacy Execution (Not Recommended)

*Note: This method is deprecated. Please use the Docker Development Workflow above.*

To run the QuaK editor manually without Docker, run:
`gradlew bootRun`
inside the `backend` directory

### Dependencies

The project requires the following dependencies to be installed on the system:

* Java >= Version 21

### Automatic installation of nodejs

Through the use of the [gradle-node-plugin], the project can automatically install `npm`.
If you want to use this feature, run any gradle-command with the flag `-PdownloadNode` (i.e. `gradlew :bootRun -PdownloadNode`).

Expand Down
31 changes: 31 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Build artifacts
build/
.gradle/
bin/
/out/

# IDE
.idea/
.vscode/
*.iml
*.ipr
*.iws

# Environment
.env
.env.local
.env.*.local

# Git
.git/
.gitignore

# Logs
*.log

# OS
.DS_Store
Thumbs.db

# Node (in case backend references frontend)
node_modules/
29 changes: 29 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# QuaK Backend

## Code Formatting and Style

This project uses **Spotless** for code formatting and **Checkstyle** for style enforcement.

### Commands

| Command | Description |
|:-------------------------------------|:-----------------------------------------------|
| `./gradlew spotlessApply` | Auto-format all Java code |
| `./gradlew spotlessCheck` | Check if code is properly formatted |
| `./gradlew checkstyleMain checkstyleTest` | Run Checkstyle on all code |

### Before Creating a Pull Request

**Spotless formatting checks only run on pull requests** (not on regular pushes to your branch).

Before creating a PR, ensure your code is properly formatted:

```bash
cd backend
./gradlew spotlessApply
./gradlew spotlessCheck
./gradlew checkstyleMain checkstyleTest
```

If the PR pipeline fails due to formatting, run `./gradlew spotlessApply` locally, commit, and push again.

---

## Testing Workflows

### 1. Test-Kategorien
Expand Down
Loading