yumey-svelte-spring-template Svelte Themes

Yumey Svelte Spring Template

A template that can be used to setup Yumey applications. SvelteKit & Spring Boot Version. Frontend: SvelteKit, Backend: Spring Boot

Yumey Svelte + Spring Template

A full-stack web application template using Svelte for the frontend and Spring Boot for the backend.

๐Ÿš€ Technology Stack

Frontend

  • Svelte - A reactive JavaScript framework
  • SvelteKit - The official Svelte application framework
  • TypeScript - For type safety
  • Vite - Next generation frontend tooling

Backend

  • Spring Boot - Java-based framework for building web applications
  • Kotlin - Modern JVM language with enhanced syntax and features
  • Spring Security - Authentication and authorization
  • JUnit 5 - Testing framework

๐Ÿ“‚ Project Structure

yumey-svelte-spring-template/
โ”œโ”€โ”€ App/                    # Frontend Svelte application
โ”‚   โ”œโ”€โ”€ src/                # Source files
โ”‚   โ”œโ”€โ”€ static/             # Static assets
โ”‚   โ”œโ”€โ”€ tests/              # Frontend tests
โ”‚   โ””โ”€โ”€ package.json        # NPM dependencies
โ”‚
โ”œโ”€โ”€ Server/                 # Backend Spring Boot application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ main/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ kotlin/     # Kotlin source files
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ resources/  # Application resources
โ”‚   โ”‚   โ””โ”€โ”€ test/           # Backend tests
โ”‚   โ”œโ”€โ”€ build.gradle.kts    # Gradle build configuration
โ”‚   โ””โ”€โ”€ gradlew             # Gradle wrapper script
โ”‚
โ””โ”€โ”€ README.md               # Project documentation

๐Ÿ”ง Setup

Prerequisites

  • JDK 17 or later
  • Node.js 16 or later
  • Gradle 7.x or later (or use the included Gradle wrapper)

Backend Setup

  1. Navigate to the Server directory:

    cd Server
    
  2. Build the application:

    ./gradlew build
    

Frontend Setup

  1. Navigate to the App directory:

    cd App
    
  2. Install dependencies:

    npm install
    

๐Ÿƒโ€โ™‚๏ธ Running the Application

Running the Backend

cd Server
./gradlew bootRun

The Spring Boot server will start on http://localhost:8080.

Running the Frontend

cd App
npm run dev

The Svelte application will be available at http://localhost:5173.

๐Ÿงช Testing

Backend Tests

cd Server
./gradlew test

Frontend Tests

cd App
npm run test

๐Ÿ”„ Development Workflow

  1. Run both the frontend and backend servers
  2. Make changes to either part of the application
  3. The frontend has hot module replacement for instant updates
  4. The backend may need to be restarted for certain changes

๐Ÿ“ฆ Building for Production

Backend

cd Server
./gradlew build

This will create a runnable JAR in the build/libs directory.

Frontend

cd App
npm run build

This creates optimized production assets in the build directory.

๐Ÿ” Security

The application uses Spring Security for authentication and authorization. The security configuration can be found in the SecurityConfig.kt file.

Top categories

Loading Svelte Themes