{"id":19622233,"url":"https://github.com/commercetools/commercetools-sunrise-java","last_synced_at":"2025-04-28T03:32:30.474Z","repository":{"id":17266360,"uuid":"20036001","full_name":"commercetools/commercetools-sunrise-java","owner":"commercetools","description":"The next generation shop framework by commercetools","archived":false,"fork":false,"pushed_at":"2019-10-15T13:52:18.000Z","size":61254,"stargazers_count":46,"open_issues_count":91,"forks_count":33,"subscribers_count":100,"default_branch":"master","last_synced_at":"2025-04-20T15:17:56.029Z","etag":null,"topics":["commercetools","shop-framework","sunrise","sunrise-java"],"latest_commit_sha":null,"homepage":"https://demo.commercetools.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/commercetools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-21T20:20:52.000Z","updated_at":"2024-05-02T20:35:37.000Z","dependencies_parsed_at":"2022-09-05T12:01:36.990Z","dependency_job_id":null,"html_url":"https://github.com/commercetools/commercetools-sunrise-java","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-sunrise-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-sunrise-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-sunrise-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-sunrise-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commercetools","download_url":"https://codeload.github.com/commercetools/commercetools-sunrise-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251246394,"owners_count":21558762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commercetools","shop-framework","sunrise","sunrise-java"],"created_at":"2024-11-11T11:26:44.230Z","updated_at":"2025-04-28T03:32:27.567Z","avatar_url":"https://github.com/commercetools.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sunrise Java Shop Framework :sunrise:\n==============\n\n[![Build Status](https://travis-ci.org/commercetools/commercetools-sunrise-java.svg?branch=master)](https://travis-ci.org/commercetools/commercetools-sunrise-java)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.commercetools.sunrise/product-catalog_2.11/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.commercetools.sunrise/product-catalog_2.11)\n[![stability-frozen](https://img.shields.io/badge/stability-locked-blue.svg)](https://github.com/orangemug/stability-badges#locked)\n[![Heroku](http://heroku-badge.herokuapp.com/?app=ct-sunrise-prod\u0026style=flat\u0026svg=1)](http://ct-sunrise-prod.herokuapp.com/)\n\n\u003e :warning: **Sunrise Java is now deprecated and will be decommissioned in 2020.**\nInstead please use our new demo shop [Sunrise SPA](https://github.com/commercetools/sunrise-spa). If you would nevertheless like to use Sunrise Java for your own developments you should fork this repository 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.\n\nThe next generation shop framework. \n\n* [Demo](https://demo.commercetools.com)\n* [Documentation](manual/)\n* [Javadoc](https://commercetools.github.io/commercetools-sunrise-java/javadoc/index.html)\n\n## Installation\n\n### Sunrise Starter Project\nThe recommended way to start using Sunrise is to clone the [Sunrise Starter Project](https://github.com/commercetools/commercetools-sunrise-java-starter) and use it as a template project. It already contains all dependencies (i.e. Sunrise Framework and Theme) and configurations needed to run your Sunrise-based project.\n\n### Starting from scratch\nAlternatively you can start your own Play Framework project and configure it yourself, using Sunrise as dependency:\n```sbt\nval sunriseFrameworkVersion = \"1.0.0-M9\" // or desired version\nlibraryDependencies ++= Seq(\n  // add Sunrise Framework dependencies as needed, e.g.:\n  \"com.commercetools.sunrise\" %% \"product-catalog\" % sunriseFrameworkVersion,\n  \"com.commercetools.sunrise\" %% \"shopping-cart\" % sunriseFrameworkVersion,\n  \"com.commercetools.sunrise\" %% \"my-account\" % sunriseFrameworkVersion,\n  \"com.commercetools.sunrise\" %% \"wishlist\" % sunriseFrameworkVersion,\n  // add the desired Sunrise Theme as dependency, e.g.:\n  \"com.commercetools.sunrise\" % \"commercetools-sunrise-theme\" % \"0.61.1\"\n)\n```\nThese dependencies provide default Controllers which can be enabled by extending them into your own Controller and registering a route for it.\n\nFor example, if we wanted to enable an endpoint to see the contents of the cart, we would simply extend the `SunriseCartDetailController`:\n```java\n// here you can register controller components\n@RegisteredComponents(CartOperationsControllerComponentSupplier.class)\npublic final class CartDetailController extends SunriseCartDetailController {\n\n    @Inject\n    public CartDetailController(final ContentRenderer contentRenderer,\n                                final CartFinder cartFinder,\n                                final CartDetailPageContentFactory pageContentFactory) {\n        // parameters that you can change via injection\n        super(contentRenderer, cartFinder, pageContentFactory);\n    }\n\n    @Nullable\n    @Override\n    public String getTemplateName() {\n        // here goes the name of your template\n        return \"cart\";\n    }\n    \n    // here you can override methods to change behaviour\n}\n```\nThen we only need to associate our `CartDetailController` to a route with the desired pattern in `conf/routes`:\n```scala\n# Shows the details of the cart belonging to the current session\nGET  /:languageTag/cart       @controllers.CartDetailController.show(languageTag: String)\n```\nAccessing [http://localhost:9000/en/cart](http://localhost:9000/en/cart) should now allow us to see the contents of our cart.\n\nCheck [Sunrise Starter Project](https://github.com/commercetools/commercetools-sunrise-java-starter) to adjust any other required configuration.\n\n## Integration tests against commercetools platform\n\n* Setup your environment variables (use a test project), so you need not to put your shop credentials under version control:\n\n```bash\nexport SUNRISE_IT_CTP_PROJECT_KEY=\"your-CTP-project-key\"\nexport SUNRISE_IT_CTP_CLIENT_SECRET=\"your-CTP-client-secret\"\nexport SUNRISE_IT_CTP_CLIENT_ID=\"your-CTP-client-id\"\n```\n* `sbt it:test`\n\n## Related projects\n\n### Sunrise Starter Project\nThe starting point to build your own online shop project\n\nhttps://github.com/commercetools/commercetools-sunrise-java-starter\n\n### Sunrise Theme\nHandlebars templates + i18n messages + web assets\n\nhttps://github.com/commercetools/commercetools-sunrise-theme\n\n### Sunrise Data\nExample data used on our demo\n\nhttps://github.com/commercetools/commercetools-sunrise-data\n\n### commercetools JVM SDK\nSDK for JVM languages to communicate with comercetools projects\n\nhttps://github.com/commercetools/commercetools-jvm-sdk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fcommercetools-sunrise-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommercetools%2Fcommercetools-sunrise-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fcommercetools-sunrise-java/lists"}