Skip to main content

Quickstart

note

This guide assumes familiarity with the Spring Framework.
If you are new to Spring, we recommend starting with their official guides to get up to speed.

1. Create a new project

Use your favorite IDE or build tool to create a new Java or Kotlin project with JDK 21 or higher.

2. Add Singularity to your dependencies

Maven Central

Add the dependency to your build.gradle.kts, build.gradle or pom.xml if using Maven:

For Gradle with Kotlin DSL:

implementation("io.stereov.singularity:core:<version>") // Check the maven status batch for the latest version

For Gradle with Groovy:

dependencies {
implementation 'io.stereov.singularity:core:<version>' // Check the maven status batch for the latest version
}

For Maven:

<dependency>
<groupId>io.stereov.singularity</groupId>
<artifactId>core</artifactId>
<version>_version_</version> <!-- Check the maven status batch for the latest version -->
</dependency>

3. Start MongoDB and Redis

Download the docker-compose.yaml to the root of your project and run the containers using:

docker compose up -d

You have a running instance of MongoDB as your database and Redis as your Cache.

4. Create your application class

Create a Spring Boot Application in Kotlin:

@SpringBootApplication
class YourApplication

fun main() {
runApplication<YourApplication>()
}

Or in Java:

@SpringBootApplication
public class App {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
}

5. Expand

Add your custom services and features to create your dream. Focus on what matters.