Skip to content

Commit 07d6723

Browse files
committed
doc: Add agenda
1 parent 5df50f8 commit 07d6723

41 files changed

Lines changed: 6173 additions & 97 deletions

Some content is hidden

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

.github/workflows/build.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,37 @@ on:
33
push:
44
branches: [ "**" ]
55
jobs:
6+
build-client:
7+
runs-on: ubuntu-latest
8+
defaults:
9+
run:
10+
working-directory: customer-client
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v5
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '22'
19+
cache: npm
20+
cache-dependency-path: customer-client/package-lock.json
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Check Prettier formatting
26+
run: npm run format:check
27+
28+
- name: Lint
29+
run: npm run lint
30+
31+
- name: Build
32+
run: npm run build
33+
634
build:
735
runs-on: ubuntu-latest
36+
needs: build-client
837
steps:
938
- name: Checkout
1039
uses: actions/checkout@v5
@@ -16,6 +45,21 @@ jobs:
1645
distribution: 'temurin'
1746
cache: maven
1847

48+
- name: Set up Node.js
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: '22'
52+
cache: npm
53+
cache-dependency-path: customer-client/package-lock.json
54+
55+
- name: Install customer-client dependencies
56+
run: npm ci
57+
working-directory: customer-client
58+
59+
- name: Build customer-client
60+
run: npm run build
61+
working-directory: customer-client
62+
1963
- name: Build customer-service
2064
run: mvn clean package -f customer-service/pom.xml
2165

@@ -34,5 +78,28 @@ jobs:
3478
- name: Start with Docker
3579
run: docker compose up -d
3680

81+
- name: Wait for customer-service
82+
run: |
83+
until curl -sf http://localhost:8181/customers/ > /dev/null; do
84+
echo "Waiting for customer-service..."
85+
sleep 2
86+
done
87+
88+
- name: Install Playwright browsers
89+
run: npx playwright install --with-deps chromium
90+
working-directory: customer-client
91+
92+
- name: Run Playwright tests
93+
run: npm run test
94+
working-directory: customer-client
95+
96+
- name: Upload Playwright report
97+
uses: actions/upload-artifact@v4
98+
if: failure()
99+
with:
100+
name: playwright-report
101+
path: customer-client/playwright-report/
102+
37103
- name: Stop Docker Containers
104+
if: always()
38105
run: docker compose down
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM maven:3.9.9-eclipse-temurin-21 AS mvn
2+
3+
WORKDIR /usr/src/online-shop
4+
COPY pom.xml ./
5+
RUN mvn package dependency:go-offline # cache dependencies
6+
COPY src ./src
7+
RUN mvn clean package meecrowave:bundle -Dservice.name=address-validation-service -Dmaven.test.skip=true -Dcheckstyle.skip=true
8+
9+
FROM eclipse-temurin:21-jre
10+
11+
RUN apt-get update -qq && apt-get install --no-install-recommends -qqy unzip && rm -rf /var/lib/apt/lists/*
12+
COPY --from=mvn /usr/src/online-shop/target/address-validation-service-meecrowave-distribution.zip /opt/address-validation-service.zip
13+
WORKDIR /opt
14+
RUN unzip address-validation-service.zip && rm address-validation-service.zip
15+
EXPOSE 8080
16+
17+
ENTRYPOINT ["/opt/address-validation-service-distribution/bin/meecrowave.sh", "run"]

address-validation-service/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
<scope>provided</scope>
4141
</dependency>
4242
<dependency>
43-
<groupId>org.apache.geronimo.specs</groupId>
44-
<artifactId>geronimo-validation_2.0_spec</artifactId>
45-
<version>1.0</version>
43+
<groupId>jakarta.validation</groupId>
44+
<artifactId>jakarta.validation-api</artifactId>
45+
<version>3.1.1</version>
4646
</dependency>
4747
<dependency>
4848
<groupId>org.eclipse.microprofile.config</groupId>

address-validation-service/src/main/java/de/openknowledge/sample/address/application/AddressResource.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
*/
1616
package de.openknowledge.sample.address.application;
1717

18+
import static jakarta.ws.rs.core.HttpHeaders.ACCEPT_LANGUAGE;
19+
import static java.util.Locale.GERMANY;
20+
import static java.util.Optional.ofNullable;
1821
import static java.util.stream.Collectors.joining;
1922

2023
import java.net.URI;

billing-service/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM maven:3.9.9-eclipse-temurin-21 AS mvn
2+
3+
WORKDIR /usr/src/online-shop
4+
COPY pom.xml ./
5+
RUN mvn package dependency:go-offline # cache dependencies
6+
COPY src ./src
7+
RUN mvn clean package meecrowave:bundle -Dservice.name=billing-service -Dmaven.test.skip=true -Dcheckstyle.skip=true
8+
9+
FROM eclipse-temurin:21-jre
10+
11+
RUN apt-get update -qq && apt-get install --no-install-recommends -qqy unzip && rm -rf /var/lib/apt/lists/*
12+
COPY --from=mvn /usr/src/online-shop/target/billing-service-meecrowave-distribution.zip /opt/billing-service.zip
13+
WORKDIR /opt
14+
RUN unzip billing-service.zip && rm billing-service.zip
15+
EXPOSE 8080
16+
17+
ENTRYPOINT ["/opt/billing-service-distribution/bin/meecrowave.sh", "run"]

customer-client/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Playwright
16+
playwright-report
17+
test-results
18+
19+
# Editor directories and files
20+
.vscode/*
21+
!.vscode/extensions.json
22+
.idea
23+
.DS_Store
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?

customer-client/.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"printWidth": 100,
6+
"tabWidth": 2
7+
}

customer-client/Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Build Stage
2+
FROM node:20-alpine AS builder
3+
4+
WORKDIR /app
5+
6+
# Copy package files
7+
COPY package*.json ./
8+
9+
# Install dependencies
10+
RUN npm ci
11+
12+
# Copy source code
13+
COPY . .
14+
15+
# Build argument for API URL (can be overridden at build time)
16+
ARG VITE_API_URL=http://localhost:8181
17+
ENV VITE_API_URL=$VITE_API_URL
18+
19+
# Build the application
20+
RUN npm run build
21+
22+
# Production Stage
23+
FROM nginx:alpine
24+
25+
# Copy built assets from builder stage
26+
COPY --from=builder /app/dist /usr/share/nginx/html
27+
28+
# Copy nginx configuration for SPA routing
29+
RUN echo 'server { \
30+
listen 80; \
31+
server_name localhost; \
32+
root /usr/share/nginx/html; \
33+
index index.html; \
34+
location / { \
35+
try_files $uri $uri/ /index.html; \
36+
} \
37+
}' > /etc/nginx/conf.d/default.conf
38+
39+
EXPOSE 80
40+
41+
CMD ["nginx", "-g", "daemon off;"]

customer-client/README-APP.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Kundenpflege App
2+
3+
Eine React-basierte Web-Applikation zur Kundenverwaltung mit Master-Detail-Ansicht.
4+
5+
## Tech Stack
6+
7+
- **React 19** - UI Framework
8+
- **TypeScript** - Type Safety
9+
- **Vite** - Build Tool
10+
- **Tanstack Query** - Server State Management
11+
- **Tanstack Table** - Tabellen-Komponente
12+
- **Tanstack Forms** - Formular-Management
13+
- **Zod** - Schema-Validierung
14+
- **React Router** - Client-seitiges Routing
15+
16+
## Features
17+
18+
- **Kundenliste (Master-Ansicht)**: Übersicht aller Kunden mit Sortierung
19+
- **Kundendetails (Detail-Ansicht)**: Detailansicht eines einzelnen Kunden
20+
- **Kunde anlegen**: Formular zum Erstellen neuer Kunden
21+
- **Adressen bearbeiten**: Rechnungs- und Lieferadresse hinzufügen/bearbeiten
22+
- **Validierung**: Client-seitige Validierung mit Zod
23+
24+
## Voraussetzungen
25+
26+
Das Backend (customer-service) muss auf `http://localhost:8080` laufen.
27+
28+
## Installation & Start
29+
30+
```bash
31+
# Dependencies installieren
32+
npm install
33+
34+
# Entwicklungsserver starten
35+
npm run dev
36+
37+
# Build für Produktion
38+
npm run build
39+
40+
# Build-Preview
41+
npm run preview
42+
```
43+
44+
## Umgebungsvariablen
45+
46+
`.env` Datei:
47+
48+
```
49+
VITE_API_URL=http://localhost:8080/api
50+
```
51+
52+
## API-Endpunkte
53+
54+
Die App nutzt folgende Backend-Endpunkte:
55+
56+
- `GET /api/customers/` - Alle Kunden abrufen
57+
- `POST /api/customers/` - Neuen Kunden erstellen
58+
- `GET /api/customers/{customerNumber}` - Einzelnen Kunden abrufen
59+
- `PUT /api/customers/{customerNumber}/billing-address` - Rechnungsadresse aktualisieren
60+
- `PUT /api/customers/{customerNumber}/delivery-address` - Lieferadresse aktualisieren
61+
62+
## Projektstruktur
63+
64+
```
65+
src/
66+
├── api/ # API-Client und React Query Hooks
67+
├── components/ # Wiederverwendbare Komponenten (Formulare)
68+
├── pages/ # Seiten-Komponenten (Routen)
69+
├── types/ # TypeScript-Typen und Zod-Schemas
70+
├── App.tsx # Haupt-App-Komponente mit Routing
71+
├── App.css # Globale Styles
72+
└── main.tsx # Entry Point
73+
```
74+
75+
## Entwickelt mit
76+
77+
Claude Code - AI-gestützte Entwicklung

customer-client/README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## React Compiler
11+
12+
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13+
14+
## Expanding the ESLint configuration
15+
16+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
17+
18+
```js
19+
export default defineConfig([
20+
globalIgnores(['dist']),
21+
{
22+
files: ['**/*.{ts,tsx}'],
23+
extends: [
24+
// Other configs...
25+
26+
// Remove tseslint.configs.recommended and replace with this
27+
tseslint.configs.recommendedTypeChecked,
28+
// Alternatively, use this for stricter rules
29+
tseslint.configs.strictTypeChecked,
30+
// Optionally, add this for stylistic rules
31+
tseslint.configs.stylisticTypeChecked,
32+
33+
// Other configs...
34+
],
35+
languageOptions: {
36+
parserOptions: {
37+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
38+
tsconfigRootDir: import.meta.dirname,
39+
},
40+
// other options...
41+
},
42+
},
43+
]);
44+
```
45+
46+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47+
48+
```js
49+
// eslint.config.js
50+
import reactX from 'eslint-plugin-react-x';
51+
import reactDom from 'eslint-plugin-react-dom';
52+
53+
export default defineConfig([
54+
globalIgnores(['dist']),
55+
{
56+
files: ['**/*.{ts,tsx}'],
57+
extends: [
58+
// Other configs...
59+
// Enable lint rules for React
60+
reactX.configs['recommended-typescript'],
61+
// Enable lint rules for React DOM
62+
reactDom.configs.recommended,
63+
],
64+
languageOptions: {
65+
parserOptions: {
66+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
67+
tsconfigRootDir: import.meta.dirname,
68+
},
69+
// other options...
70+
},
71+
},
72+
]);
73+
```

0 commit comments

Comments
 (0)