Clone a Starter Application
Choose a language below to clone and run an existing Viaduct application. The Kotlin path uses the small CLI starter. The Java path uses the complete Micronaut Star Wars demo in the main Viaduct repository.
Run the starter¶
Make a local clone of the CLI starter:
cd into the clone and verify your environment:
Gradle should report that the build was successful.
Although Viaduct is typically hosted in a web server, the CLI starter calls it directly from the application's main function so the example stays small. Run a query through Gradle:
The starter ships with a tiny schema:
Any query that's valid against this schema can be passed via --args.
Install JDK 21+ and clone the main repository:
Verify the application before starting the server:
The flag enables the snapshot repository required by the demo’s current Viaduct version. On Windows, run these commands in Git Bash.
Open GraphiQL and execute:
The response includes Luke Skywalker. The server exposes /graphql for HTTP requests and /graphiql for the browser. Stop it with Ctrl+C.
Other starter applications¶
Besides the CLI starter, github.com/viaduct-dev hosts several framework-specific starters:
cli-starter— the smallest one; covered above.ktor-starter— a Ktor-based HTTP server.jetty-starter— a Jetty-based HTTP server.micronaut-starter— a Micronaut-based HTTP server.starwars— a fuller demonstration application built on Micronaut, exercising most Viaduct features. The Star Wars tutorial walks through it.
For Java, continue with demoapps/starwars-java in the main repository; the standalone starter repositories listed above use Kotlin.
Pick the one that matches your target framework. Each repo's README has its own setup steps.
What's Next¶
Continue to Touring the Application to understand the structure of a Viaduct application.