@@ -25,6 +25,7 @@ npm start
2525```
2626
2727The app uses ` REACT_APP_API_BASE_URL=http://localhost:9090/api ` in local development.
28+ The login flow is token-based: the UI calls the mock login API, stores the returned token, and sends it as a bearer token on later API calls.
2829
2930## Gradle
3031
@@ -43,19 +44,42 @@ Available Gradle tasks:
4344./gradlew npmBuild
4445./gradlew npmTest
4546./gradlew npmStart
47+ ./gradlew frontendJar
48+ ./gradlew frontendSourcesJar
49+ ./gradlew assemble
50+ ./gradlew release --no-configuration-cache
4651```
4752
4853The Node integration is configured to use the local Node runtime from ` nvm ` rather than downloading a separate Node distribution.
4954
55+ Archive outputs:
56+
57+ - ` frontendJar ` : packages the npm ` build/ ` output as the main JAR artifact
58+ - ` frontendSourcesJar ` : packages all git-tracked files as the sources JAR
59+
60+ ` frontendSourcesJar ` uses ` git ls-files ` , so if Gradle reports configuration-cache incompatibility, run it with:
61+
62+ ``` bash
63+ ./gradlew frontendSourcesJar --no-configuration-cache
64+ ```
65+
66+ Project versioning is driven by ` gradle.properties ` .
67+
5068## Mock APIs
5169
5270WireMock mappings live in [ ` wiremock/mappings ` ] ( /data/Git/error-sense-ui/wiremock/mappings ) .
5371
54- - ` GET /api/developer-reports `
55- - ` GET /api/reviewer-reports `
56- - ` PUT /api/reviewer-reports/:id `
72+ - ` POST /api/v1/auth/login `
73+ - ` GET /api/v1/errsense/report/dev-summary `
74+ - ` GET /api/v1/errsense/report/owner-review `
75+ - ` PUT /api/v1/errsense/report/owner-review/:id `
5776- Generic ` OPTIONS /api/* ` preflight handler for local CORS
5877
78+ Mock login response:
79+
80+ - returns a bearer token: ` mock-errsense-token `
81+ - report APIs require ` Authorization: Bearer mock-errsense-token `
82+
5983## Build
6084
6185``` bash
@@ -68,6 +92,42 @@ Or with Gradle:
6892./gradlew npmBuild
6993```
7094
95+ ## Publishing
96+
97+ The Gradle build is configured for Maven Central publishing with:
98+
99+ - ` maven-publish `
100+ - ` signing `
101+ - ` io.github.gradle-nexus.publish-plugin `
102+ - ` net.researchgate.release `
103+
104+ Publish flow:
105+
106+ ``` bash
107+ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-configuration-cache
108+ ```
109+
110+ Required environment variables:
111+
112+ - ` OSSRH_USERNAME `
113+ - ` OSSRH_PASSWORD `
114+ - ` SIGNING_KEY_FILE `
115+ - ` SIGNING_KEY_PASSWORD `
116+
117+ Release flow:
118+
119+ ``` bash
120+ ./gradlew release --no-configuration-cache
121+ ```
122+
123+ The release plugin:
124+
125+ - reads and updates the version from ` gradle.properties `
126+ - publishes to Sonatype
127+ - closes and releases the Sonatype staging repository
128+ - creates a Git tag using ` <project-name>-<version> `
129+ - requires releases to run from the ` master ` branch
130+
71131## Docker
72132
73133This project uses a standard multi-stage Docker build for container images. Jib is not the recommended path for this frontend-only repo.
@@ -101,3 +161,13 @@ Login example:
101161``` bash
102162echo " $GITHUB_TOKEN " | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
103163```
164+
165+ ## GitHub Actions
166+
167+ GitHub Actions builds and pushes the container image to GHCR using the first 8 characters of the commit SHA as the tag.
168+
169+ Example tag:
170+
171+ ``` text
172+ ghcr.io/openprojectx/error-sense-ui:5a9619ee
173+ ```
0 commit comments