Sunrise Java

by commercetools


Sunrise Java Starter Project

Build Status Heroku

Sunrise-based project using:

Use it as a starting point to develop your own online shop project.


  • Install Java 8 (version >= 1.8.0_92)
  • Create a commercetools platform project with some data
  • Unless you modify the project to behave differently:
    • Product variants must contain a SKU without dashes -
    • Project must have at least a currency, country and language defined (unless you specify them via Sunrise configuration)


For an easy and fast deployment of your application, we recommend Heroku:


This will take you to the configuration page to create a Sunrise application in Heroku. Once you have created it, you can access and modify the source code of your application via Git, as explained in Git Cloning Existing Heroku Applications.

If Heroku reports that you have cloned an empty repository execute the following commands:

cd <project-folder>
git remote add origin
git pull origin master


Run it locally

First, clone this repository onto your local machine. Next, create a new file named dev.conf inside the conf folder and insert the credentials of your commercetools platform project as follows:

sunrise.ctp.client {
  projectKey = your-project-key
  clientId = your-client-id
  clientSecret = your-client-secret
  authUrl = ""
  apiUrl = ""

If you have SBT on your computer, you can run it with sbt ~run. Otherwise you can use the Activator found in the project to run it locally:

  • on Linux/Mac: ./activator ~run
  • on Windows: activator ~run

In any case, the output will be similar to:

[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)

Now open http://localhost:9000 in your browser and you should be able to access the web application using your project.