From 2286e501db5d07c8f5f35d7fa292d2561b61786e Mon Sep 17 00:00:00 2001
From: Ismael Neto <114830206+otaldoneto@users.noreply.github.com>
Date: Wed, 23 Sep 2026 15:56:25 -0300
Subject: [PATCH] feat: add a public landing page at the root
---
README.md | 2 +-
.../management/config/SecurityConfig.java | 2 +
src/main/resources/static/index.html | 155 ++++++++++++++++++
.../controllers/LandingPageTest.java | 50 ++++++
4 files changed, 208 insertions(+), 1 deletion(-)
create mode 100644 src/main/resources/static/index.html
create mode 100644 src/test/java/com/serviceorder/management/controllers/LandingPageTest.java
diff --git a/README.md b/README.md
index df1fae3..754a6f3 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ REST API for managing clients, technicians and service orders (help desk style),
## Live demo
-- API: https://service-order-management-nxil.onrender.com
+- Home page: https://service-order-management-nxil.onrender.com
- Swagger UI: https://service-order-management-nxil.onrender.com/swagger-ui.html
The demo runs on free tiers ([Render](https://render.com) for the API and [Neon](https://neon.com) for PostgreSQL), so
diff --git a/src/main/java/com/serviceorder/management/config/SecurityConfig.java b/src/main/java/com/serviceorder/management/config/SecurityConfig.java
index 786ff87..546bab9 100644
--- a/src/main/java/com/serviceorder/management/config/SecurityConfig.java
+++ b/src/main/java/com/serviceorder/management/config/SecurityConfig.java
@@ -37,6 +37,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http,
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
// The first matching rule wins, so the specific rules come before anyRequest().
.authorizeHttpRequests(auth -> auth
+ .requestMatchers(HttpMethod.GET, "/", "/index.html").permitAll()
+ .requestMatchers(HttpMethod.HEAD, "/", "/index.html").permitAll()
.requestMatchers("/auth/login", "/auth/refresh", "/auth/logout").permitAll()
.requestMatchers("/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**").permitAll()
.requestMatchers(HttpMethod.PUT, "/users/me/password").authenticated()
diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html
new file mode 100644
index 0000000..668914c
--- /dev/null
+++ b/src/main/resources/static/index.html
@@ -0,0 +1,155 @@
+
+
+
+
+
+ Service Order Management API
+
+
+
+
+
+
Service Order Management API
+
+ A REST API for managing clients, technicians and service orders, help desk style.
+ Built with Spring Boot, secured with JWT and covered by automated tests.
+