diff --git a/app/core/build.gradle b/app/core/build.gradle index c7bedf350..9035b44a7 100644 --- a/app/core/build.gradle +++ b/app/core/build.gradle @@ -268,6 +268,18 @@ tasks.register('cleanFrontendAssets', Delete) { delete generatedFrontendPaths.collect { new File(resourcesStaticDir, it) } } +tasks.register('copyApiLandingPage', Copy) { + group = 'frontend' + description = 'Copy API landing page to index.html for backend-only mode' + from(new File(resourcesStaticDir, 'api-landing.html')) + into(resourcesStaticDir) + rename('api-landing.html', 'index.html') + dependsOn cleanFrontendAssets + doFirst { + println "Copying API landing page to index.html for backend-only mode..." + } +} + // Ensure copyFrontendAssets runs after spotless tasks tasks.named('copyFrontendAssets').configure { mustRunAfter tasks.matching { it.name.startsWith('spotless') } @@ -277,9 +289,9 @@ if (buildWithFrontend) { println "Frontend build enabled - JAR will include React frontend" processResources.dependsOn copyFrontendAssets } else { - println "Frontend build disabled - JAR will be backend-only" - // When not building the UI, ensure any stale frontend assets are removed - processResources.dependsOn cleanFrontendAssets + println "Frontend build disabled - JAR will be backend-only with API landing page" + // When not building the UI, ensure any stale frontend assets are removed and use API landing page + processResources.dependsOn copyApiLandingPage } bootJar.dependsOn ':common:jar' diff --git a/app/core/src/main/resources/static/api-landing.html b/app/core/src/main/resources/static/api-landing.html new file mode 100644 index 000000000..29a0d4abf --- /dev/null +++ b/app/core/src/main/resources/static/api-landing.html @@ -0,0 +1,268 @@ + + + + + + + Stirling-PDF - API Server + + + + + + + + + + + +
+
+ + +
+

+ This Stirling-PDF instance is running in API-only mode. The web interface has not been included in this build. +

+
+ + Open API Documentation + +
+ +
+

Looking for the Web UI?

+ +

If you're using Docker:

+
    +
  • You may have pulled an API-only image or there was a build configuration issue
  • +
  • Use the standard Docker image: stirlingtools/stirling-pdf:latest
  • +
+ +

If you're using a JAR file:

+
    +
  • You downloaded Stirling-PDF-server.jar which is the API-only version without UI
  • +
  • Download the full version from GitHub Releases:
  • +
  • Stirling-PDF.jar - Standard version with UI
  • +
  • Stirling-PDF-with-login.jar - Version with authentication features
  • +
+ +

If you built from source:

+
    +
  • Rebuild with: ./gradlew build -PbuildWithFrontend=true
  • +
  • Or deploy the frontend separately from the /frontend directory
  • +
+
+ +
+ +
+

Need Help?

+

Join our community for support:

+ +
+
+
+ + + + diff --git a/app/core/src/main/resources/static/api-wordmark.svg b/app/core/src/main/resources/static/api-wordmark.svg new file mode 100644 index 000000000..deac1ee16 --- /dev/null +++ b/app/core/src/main/resources/static/api-wordmark.svg @@ -0,0 +1,4 @@ + + + +