+ In addition to the REST endpoints, Spring Boot can also serve static resources. +
++ For REST-only production deployments, serving static pages is usually disabled. +
+ + \ No newline at end of file diff --git a/backend/src/test/java/com/mycompany/backend/demo/MainTests.java b/backend/src/test/java/com/mycompany/backend/demo/MainTests.java new file mode 100644 index 0000000..070e6d0 --- /dev/null +++ b/backend/src/test/java/com/mycompany/backend/demo/MainTests.java @@ -0,0 +1,13 @@ +package com.mycompany.backend.demo; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class MainTests { + + @Test + void contextLoads() { + } + +} diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..4a7f73a --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,24 @@ +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro +.cache +dist + +# Node dependencies +node_modules + +# Logs +logs +*.log + +# Misc +.DS_Store +.fleet +.idea + +# Local env files +.env +.env.* +!.env.example diff --git a/frontend/.vscode/settings.json b/frontend/.vscode/settings.json new file mode 100644 index 0000000..5f88449 --- /dev/null +++ b/frontend/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + "github.copilot.nextEditSuggestions.enabled": false, + "editor.formatOnSave": true, + + "editor.defaultFormatter": "esbenp.prettier-vscode", + "files.autoSave": "onFocusChange", + "chat.agent.enabled": false, + + "files.associations": { + "main.css": "tailwindcss" + }, + + "editor.accessibilitySupport": "off" +} diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 0000000..8a77860 --- /dev/null +++ b/frontend/README.md @@ -0,0 +1,44 @@ +# Nuxt Minimal Starter + +Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. + +## Setup + +Make sure to install dependencies: + +```bash +npm install +``` + +## Spring Boot + +Make sure the backend is running: + +```bash +cd ../backend +mvn clean spring-boot:run +``` + +## Development Server + +Start the development server on `http://localhost:3000`: + +```bash +npm run dev +``` + +## Production + +Build the application for production. We don't use the server-side rendering, so we don't do the `build` command + +```bash +npm run generate +``` + +Locally preview production build: + +```bash +npm run preview +``` + +Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. diff --git a/frontend/app/API.ts b/frontend/app/API.ts new file mode 100644 index 0000000..5e469d7 --- /dev/null +++ b/frontend/app/API.ts @@ -0,0 +1,81 @@ +import type { DataType, DataTypeConfiguration } from "./types"; + +enum APIMethod { + GET = "GET", + POST = "POST", + PUT = "PUT", + DELETE = "DELETE", +} + +export class API { + private readonly apiBaseUrl: string; + + constructor(apiBaseUrl: string) { + this.apiBaseUrl = apiBaseUrl; + } + + readConfiguration(): Promise+ Type {{ message }} to confirm. +
+ +| # | +Property Name | +Property Type | ++ |
|---|---|---|---|
| {{ idx + 1 }} | +
+ |
+
+ |
+
+ |
+
+ Add and delete type parameters, change their types, the dynamic form + on the right will be automatically updated. +
+ +| + {{ prop.name }} + | +
+ |
+
{{ formData }}
+ | ID | +Name | ++ |
|---|---|---|
| + {{ type.id }} + | +
+ |
+
+ |
+
+ This is a sample Nuxt web application that uses + Spring Boot as a RESTful backend. Launch the backend + from your IDE or use the following commands: +
++cd backend +mvn clean spring-boot:run ++
+ I've left comments in the most important parts of the code. For more + details, use the links section. +
+