Skip to content

Commit a4dd70d

Browse files
committed
initial commit
0 parents  commit a4dd70d

244 files changed

Lines changed: 25206 additions & 0 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.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Main Pull Request
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Java
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '25'
19+
distribution: 'zulu'
20+
cache: 'maven'
21+
22+
- name: Build and Test
23+
run: ./mvnw clean install
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Snapshot
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Java
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: '25'
20+
distribution: 'zulu'
21+
cache: 'maven'
22+
server-id: central
23+
server-username: MAVEN_USERNAME
24+
server-password: MAVEN_PASSWORD
25+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
26+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
27+
28+
- name: Publish Snapshot
29+
run: ./mvnw clean deploy
30+
env:
31+
MAVEN_PUBLISH: "true"
32+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
33+
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
34+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

.github/workflows/release.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release-version:
7+
description: 'Release version (e.g. 1.0.0) — leave blank to use current POM version without -SNAPSHOT'
8+
required: false
9+
next-version:
10+
description: 'Next development version (e.g. 1.0.1-SNAPSHOT) — leave blank to use incremented patch version with -SNAPSHOT'
11+
required: false
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
jobs:
18+
release:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Java
26+
uses: actions/setup-java@v4
27+
with:
28+
java-version: '25'
29+
distribution: 'zulu'
30+
cache: 'maven'
31+
server-id: central
32+
server-username: MAVEN_USERNAME
33+
server-password: MAVEN_PASSWORD
34+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
35+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
36+
37+
- name: Determine Versions
38+
id: versions
39+
run: |
40+
CURRENT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
41+
42+
RELEASE_VERSION="${{ inputs.release-version }}"
43+
if [ -z "$RELEASE_VERSION" ]; then
44+
RELEASE_VERSION="${CURRENT_VERSION/-SNAPSHOT/}"
45+
fi
46+
47+
NEXT_VERSION="${{ inputs.next-version }}"
48+
if [ -z "$NEXT_VERSION" ]; then
49+
PATCH=$(echo "$RELEASE_VERSION" | cut -d. -f3)
50+
NEXT_PATCH=$((PATCH + 1))
51+
NEXT_VERSION=$(echo "$RELEASE_VERSION" | sed "s/\.[0-9]*$/.${NEXT_PATCH}-SNAPSHOT/")
52+
fi
53+
54+
echo "release-version=$RELEASE_VERSION" >> $GITHUB_OUTPUT
55+
echo "next-version=$NEXT_VERSION" >> $GITHUB_OUTPUT
56+
57+
- name: Configure Git
58+
run: |
59+
git config user.name "github-actions[bot]"
60+
git config user.email "github-actions[bot]@users.noreply.github.com"
61+
62+
- name: Create Release Branch
63+
run: git checkout -b release-${{ steps.versions.outputs.release-version }}
64+
65+
- name: Set Release Version
66+
run: |
67+
./mvnw versions:set-property \
68+
-Dproperty=revision \
69+
-DnewVersion=${{ steps.versions.outputs.release-version }} \
70+
-DgenerateBackupPoms=false
71+
72+
- name: Build and Deploy Release
73+
run: ./mvnw clean deploy
74+
env:
75+
MAVEN_PUBLISH: "true"
76+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
77+
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
78+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
79+
80+
- name: Commit and Tag Release
81+
run: |
82+
git add pom.xml
83+
git commit -m "Release ${{ steps.versions.outputs.release-version }}"
84+
git tag -a v${{ steps.versions.outputs.release-version }} -m "Release ${{ steps.versions.outputs.release-version }}"
85+
86+
- name: Set Next Development Version
87+
run: |
88+
./mvnw versions:set-property \
89+
-Dproperty=revision \
90+
-DnewVersion=${{ steps.versions.outputs.next-version }} \
91+
-DgenerateBackupPoms=false
92+
93+
- name: Commit Next Development Version
94+
run: |
95+
git add pom.xml
96+
git commit -m "Prepare for next development iteration ${{ steps.versions.outputs.next-version }}"
97+
98+
- name: Push Release Branch and Tag
99+
run: git push --follow-tags origin release-${{ steps.versions.outputs.release-version }}
100+
101+
- name: Open and Merge PR to main
102+
env:
103+
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
104+
run: |
105+
PR_URL=$(gh pr create \
106+
--base main \
107+
--head release-${{ steps.versions.outputs.release-version }} \
108+
--title "Prepare for development of ${{ steps.versions.outputs.next-version }}" \
109+
--body "Prepares next development iteration **${{ steps.versions.outputs.next-version }}**.")
110+
111+
gh pr merge "$PR_URL" --squash

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Maven
2+
target/
3+
*.class
4+
*.jar
5+
*.war
6+
7+
# IDE
8+
.idea/
9+
*.iml
10+
.vscode/
11+
.settings/
12+
.classpath
13+
.project
14+
.factorypath
15+
16+
# OS
17+
.DS_Store
18+
Thumbs.db
19+
20+
# Flatten plugin
21+
.flattened-pom.xml
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
wrapperVersion=3.3.4
2+
distributionType=only-script
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.14/apache-maven-3.9.14-bin.zip

CLAUDE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# serve.build
2+
3+
## Codebase Overview
4+
5+
A lightweight, JPMS-native HTTP server framework for Java 25+ built directly on `jdk.httpserver`, virtual threads,
6+
scoped values, and structured concurrency. No Spring, no annotation scanning — routes are code, DI is explicit. Part of
7+
the `*.build` family.
8+
9+
**Stack**: Java 25 (preview enabled), Maven multi-module, Jackson, graphql-java, JTE, JUnit 5 + AssertJ
10+
**Structure**: 19 JPMS modules — core layer (foundation, transports, application, testing), protocol layer (WebSocket,
11+
SSE, MCP, LSP, GraphQL), middleware layer (CORS, security, compression, logging, health, static), template layer (
12+
template SPI, JTE, HTMX)
13+
14+
For detailed architecture, see [docs/CODEBASE_MAP.md](docs/CODEBASE_MAP.md).
15+
16+
## Key Conventions
17+
18+
- **4-space indentation** everywhere (accessibility standard)
19+
- **Null-free**: use `Optional<T>` instead of null in public APIs
20+
- **Test method names** must start with `should` or `shouldNot`
21+
- **No mocks**: use stub implementations (`StubRequest`, `StubResponse`) in tests
22+
- **Middleware order**: first-registered = outermost (applied in reverse)
23+
- All modules are `open module` with explicit `requires`/`exports`
24+
25+
## Build
26+
27+
```bash
28+
./mvnw clean verify # build + test all modules
29+
./mvnw -pl serve-foundation test # test a single module
30+
```
31+
32+
Requires Java 25. Dependencies are resolved from Maven Central.

0 commit comments

Comments
 (0)