https://github.com/commercetools/commercetools-sunrise-java-starter
Bootstrap project using commercetools Sunrise Framework & Theme
https://github.com/commercetools/commercetools-sunrise-java-starter
Last synced: about 1 year ago
JSON representation
Bootstrap project using commercetools Sunrise Framework & Theme
- Host: GitHub
- URL: https://github.com/commercetools/commercetools-sunrise-java-starter
- Owner: commercetools
- License: apache-2.0
- Created: 2016-08-03T10:35:34.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-09-04T12:19:23.000Z (almost 7 years ago)
- Last Synced: 2025-06-18T04:53:33.668Z (about 1 year ago)
- Language: Java
- Homepage: http://demo.commercetools.com/
- Size: 2.35 MB
- Stars: 9
- Watchers: 84
- Forks: 16
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sunrise Java Starter Project
[](https://travis-ci.org/commercetools/commercetools-sunrise-java-starter)
[](http://ct-sunrise-starter-prod.herokuapp.com/)
> :warning: **The [Sunrise Java Shop Framework](https://github.com/commercetools/commercetools-sunrise-java) is no longer maintained.**
If you would nevertheless like to use it for your own developments you should fork the [framework's repository](https://github.com/commercetools/commercetools-sunrise-java) under the given license and continue developing your version, but please be aware that there will be no more updates and no support provided to this framework.
Sunrise-based project using:
- [Sunrise Shop Framework](https://github.com/commercetools/commercetools-sunrise-java)
- [Sunrise Theme](https://github.com/commercetools/commercetools-sunrise-theme)
- [Play Web Framework 2.5.x](https://www.playframework.com/documentation/2.5.x/Home)
Use it as a starting point to develop your own online shop project.
## Preconditions
* Install [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) (version >= 1.8.0_92)
* Create a [commercetools platform project](https://mc.commercetools.com/) 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)
## Deployment
For an easy and fast deployment of your application, we recommend [Heroku](https://www.heroku.com):
[](https://heroku.com/deploy)
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](https://devcenter.heroku.com/articles/git-clone-heroku-app).
If Heroku reports that **you have cloned an empty repository** execute the following commands:
```bash
cd
git remote add origin https://github.com/commercetools/commercetools-sunrise-java-starter.git
git pull origin master
```
([Source](https://help.heroku.com/XOBUHLKQ/why-do-i-see-a-message-you-appear-to-have-cloned-an-empty-repository-when-using-heroku-git-clone))
## 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:
```properties
sunrise.ctp.client {
projectKey = your-project-key
clientId = your-client-id
clientSecret = your-client-secret
authUrl = "https://auth.sphere.io"
apiUrl = "https://api.sphere.io"
}
```
If you have [SBT](http://www.scala-sbt.org/) on your computer, you can run it with `sbt ~run`. Otherwise you can use the [Activator](https://www.lightbend.com/community/core-tools/activator-and-sbt) 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.