Skip to content

Getting Started ​

This guide covers the minimum steps to get a Squizy application running.

Requirements ​

  • JDK 17 or higher
  • Maven 3.8+
  • A relational database (H2 for development, PostgreSQL/MySQL/MariaDB/Oracle for production)

Project Setup ​

Use squizy-server as your Maven parent POM to inherit all dependency management and plugin configurations:

xml
<parent>
    <groupId>io.twentyninetech</groupId>
    <artifactId>squizy-server</artifactId>
    <version>1.1.0</version>
    <relativePath/>
</parent>

This parent POM imports spring-boot-dependencies via BOM, so all Spring Boot dependency versions are aligned automatically.

Using Spring Boot as Parent (Framework Mode) ​

If your project already uses spring-boot-starter-parent, import Squizy's dependency management via BOM:

xml
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.2.2</version>
    <relativePath/>
</parent>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.twentyninetech</groupId>
            <artifactId>squizy-server</artifactId>
            <version>1.1.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

WARNING

When using this approach, make sure the Spring Boot version matches the one Squizy was built against (currently 3.2.2) to avoid compatibility issues.

Starters ​

Squizy provides starter dependencies that bundle related modules together:

squizy-server-starter ​

The core starter — includes everything needed for the backend:

xml
<dependency>
    <groupId>io.twentyninetech</groupId>
    <artifactId>squizy-server-starter</artifactId>
</dependency>

This brings in: entity processing, annotations, services, REST controllers, auto-configuration, security layer, structured logging, and exception handling.

squizy-web-starter ​

Bundles squizy-server-starter + squizy-web-client for serving the frontend directly from the Spring Boot application (single deployable artifact):

xml
<dependency>
    <groupId>io.twentyninetech</groupId>
    <artifactId>squizy-web-starter</artifactId>
</dependency>

See Web Modules for details on frontend deployment options.

squizy-server-oauth2-database-starter ​

Adds OAuth2 authentication with database-backed user and role management:

xml
<dependency>
    <groupId>io.twentyninetech</groupId>
    <artifactId>squizy-server-oauth2-database-starter</artifactId>
</dependency>

See Authentication for configuration details.

Minimal Example ​

A complete minimal pom.xml with embedded frontend and OAuth2 authentication:

xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.twentyninetech</groupId>
        <artifactId>squizy-server</artifactId>
        <version>1.1.0</version>
        <relativePath/>
    </parent>

    <artifactId>my-app</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <properties>
        <java.version>17</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.twentyninetech</groupId>
            <artifactId>squizy-server-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>io.twentyninetech</groupId>
            <artifactId>squizy-server-oauth2-database-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>io.twentyninetech</groupId>
                <artifactId>squizy-web-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

Minimal application.properties:

properties
spring.application.name=my-app
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:h2:mem:my-app
spring.datasource.username=user
spring.datasource.password=pass

# OAuth2 provider (Google)
spring.security.oauth2.client.registration.google.client-id=YOUR_CLIENT_ID
spring.security.oauth2.client.registration.google.client-secret=YOUR_CLIENT_SECRET

# Squizy token seed (required for stable JWT tokens across restarts)
squizy.oauth2.token-seed=your-random-seed-here

Start the application and navigate to http://localhost:8080.

Auto-Generated Layers ​

When you annotate a JPA entity with @SquizyEntity, the framework automatically generates at runtime:

  • Repository — a SquizyRepository with query, export, and auditing capabilities
  • Service — a BaseSquizyService handling CRUD operations, events, and CSV export
  • Controller — a BaseSquizyController exposing REST endpoints for all CRUD operations, property queries, and revisions

Entities only need to be on the classpath — Squizy discovers and processes them automatically regardless of package structure.

The skipLayersAutoGeneration attribute on @SquizyEntity allows disabling this behavior for entities that need custom implementations.

Next Steps ​