diff --git a/backend/build-frontend.sh b/backend/build-frontend.sh
new file mode 100755
index 0000000..a3ba8b0
--- /dev/null
+++ b/backend/build-frontend.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Go to frontend directory
+cd ../frontend
+
+# Install dependencies and build
+npm install
+npm run build
+
+# Save swagger-ui.html
+cd ../backend/src/main/webapp
+cp swagger-ui.html /tmp/swagger-ui.html
+
+# Remove old files except WEB-INF
+find . -mindepth 1 -maxdepth 1 ! -name 'WEB-INF' -exec rm -rf {} +
+
+# Copy new build files
+cp -r ../../../../frontend/build/* .
+
+# Restore swagger-ui.html
+cp /tmp/swagger-ui.html .
+rm /tmp/swagger-ui.html
+
+# Return to backend directory
+cd ../../../../backend
\ No newline at end of file
diff --git a/backend/src/main/java/ru/akarpov/web4/servlet/SPARouterServlet.java b/backend/src/main/java/ru/akarpov/web4/servlet/SPARouterServlet.java
new file mode 100644
index 0000000..70ba474
--- /dev/null
+++ b/backend/src/main/java/ru/akarpov/web4/servlet/SPARouterServlet.java
@@ -0,0 +1,32 @@
+package ru.akarpov.web4.servlet;
+
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class SPARouterServlet extends HttpServlet {
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+ // Set content type
+ response.setContentType("text/html;charset=UTF-8");
+
+ // Read index.html
+ try (InputStream in = getServletContext().getResourceAsStream("/static/index.html")) {
+ if (in == null) {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
+ return;
+ }
+
+ // Copy the index.html content to response
+ byte[] buffer = new byte[1024];
+ int bytesRead;
+ while ((bytesRead = in.read(buffer)) != -1) {
+ response.getOutputStream().write(buffer, 0, bytesRead);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/backend/src/main/webapp/WEB-INF/jboss-web.xml b/backend/src/main/webapp/WEB-INF/jboss-web.xml
new file mode 100644
index 0000000..0d92bed
--- /dev/null
+++ b/backend/src/main/webapp/WEB-INF/jboss-web.xml
@@ -0,0 +1,4 @@
+
+
Я вас не звал, идите нахуй!
-