Skip to content

Commit

Permalink
Merge pull request #110 from Sitecore/basic-company-nextjs
Browse files Browse the repository at this point in the history
Next.js Implementation of Helix Basic Company
  • Loading branch information
nickwesselman authored Feb 25, 2021
2 parents 25a948d + 669e861 commit 90f5ccf
Show file tree
Hide file tree
Showing 369 changed files with 83,829 additions and 86 deletions.
15 changes: 11 additions & 4 deletions docs/examples/helix-basic-company.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ the site.
it likely would not merit application of Sitecore Helix practices, or perhaps would be
implemented as a single Project-layer module.*

The customer is also utilizing a third-party agency for the website front-end implementation,
and thus HTML, CSS, and JS are being provided by an external team with no knowledge of
Sitecore or Sitecore Helix practices.

## Implementations

### [Helix Basic Company - ASP.NET Core and Sitecore Content Serialization](https://github.com/Sitecore/Helix.Examples/tree/master/examples/helix-basic-aspnetcore)
Expand All @@ -38,6 +34,17 @@ This is a [ASP.NET Core Rendering SDK](https://doc.sitecore.com/developers/100/d
* [Helix Publishing Pipeline](https://github.com/richardszalay/helix-publishing-pipeline) is used for building and deploying code for CM/CD, and is configured to auto-deploy on build.
* The Rendering Host projects do not need Helix Publishing Pipeline, because ASP.NET Core / SDK-style projects support sharing content assets.

### [Helix Basic Company - Next.js and Sitecore Content Serialization](https://github.com/Sitecore/Helix.Examples/tree/master/examples/helix-basic-nextjs)

This is a [Sitecore JSS / Next.js](https://jss.sitecore.com/docs/nextjs/introduction/why-nextjs) and [Sitecore Content Serialization](https://doc.sitecore.com/developers/100/developer-tools/en/sitecore-content-serialization.html) based implementation of Helix Basic Company.
* The site is rendered in an independently-running rendering host, built with Next.js.
* The JavaScript/Next.js solution is intentionally kept in the Project layer, in its entirety, without using Helix semantics, as to not require Sitecore solution architecture in front-end code.
* The JSS project is configured for a _Sitecore-first_ workflow. It uses serialized items and not JSS _code-first_ deployment.
* For mocking of Sitecore data, it uses [Storybook](https://storybook.js.org/) instead.
* This solution avoids the need for back-end Sitecore code through use of GraphQL to obtain additional data. Thus the Visual Studio solution is rather sparse. It could be argued that this could be further simplified in a real-world solution.
* Items are serialized using the Sitecore CLI.
* [Helix Publishing Pipeline](https://github.com/richardszalay/helix-publishing-pipeline) is used for building and deploying code for CM/CD, and is configured to auto-deploy on build.

### [Helix Basic Company - TDS](https://github.com/Sitecore/Helix.Examples/tree/master/examples/helix-basic-tds)

This is a [Sitecore TDS](https://www.teamdevelopmentforsitecore.com/TDS-Classic)-based
Expand Down
1 change: 1 addition & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ instance.
1. [Clone the full repository](https://github.com/Sitecore/Helix.Examples) or [download it](https://github.com/Sitecore/Helix.Examples/archive/master.zip) and unzip into a local directory.
1. Follow the `README.md` instructions for each example.
1. [Helix Basic Company - ASP.NET Core](https://github.com/Sitecore/Helix.Examples/tree/master/examples/helix-basic-aspnetcore/README.md)
1. [Helix Basic Company - Next.js](https://github.com/Sitecore/Helix.Examples/tree/master/examples/helix-basic-nextjs/README.md)
1. [Helix Basic Company - TDS](https://github.com/Sitecore/Helix.Examples/tree/master/examples/helix-basic-tds/README.md)
1. [Helix Basic Company - TDS Consolidated](https://github.com/Sitecore/Helix.Examples/tree/master/examples/helix-basic-tds-consolidated/README.md)
1. [Helix Basic Company - Unicorn](https://github.com/Sitecore/Helix.Examples/tree/master/examples/helix-basic-unicorn/README.md)
12 changes: 12 additions & 0 deletions examples/helix-basic-nextjs/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"sitecore.cli": {
"version": "3.0.0-r00259.1",
"commands": [
"sitecore"
]
}
}
}
19 changes: 19 additions & 0 deletions examples/helix-basic-nextjs/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# folders
.git
.gitignore
.vs
.vscode
build
docker
packages
**/bin/
**/obj/
**/out/
**/node_modules/

# files
*Dockerfile
docker-compose*
**/*.md
*.ps1
scjssconfig.json
61 changes: 61 additions & 0 deletions examples/helix-basic-nextjs/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# If you intend to push to a private registry, fill that in here.
REGISTRY=
COMPOSE_PROJECT_NAME=basic-company-nextjs

# Configure host names, which will be used to configure Traefik proxy routing.
CM_HOST=cm.basic-company-nextjs.localhost
ID_HOST=id.basic-company-nextjs.localhost
RENDERING_HOST=www.basic-company-nextjs.localhost

# Sitecore Docker registry and platform version.
# The ltsc2019-based images are used by default here. SAC images are also available.
SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/
SITECORE_VERSION=10.1-ltsc2019

# The sitecore\admin and SQL 'sa' account passwords for this environment are configurable here.
SITECORE_ADMIN_PASSWORD=
SQL_SA_PASSWORD=

# Other supporting images, including Sitecore modules and Docker tools
MANAGEMENT_SERVICES_IMAGE=scr.sitecore.com/sxp/modules/sitecore-management-services-xp1-assets:3.0.0-1809
HEADLESS_SERVICES_IMAGE=scr.sitecore.com/sxp/modules/sitecore-headless-services-xp1-assets:16.0.0-1809
TOOLS_IMAGE=scr.sitecore.com/tools/sitecore-docker-tools-assets:10.1-1809
TRAEFIK_IMAGE=traefik:v2.2.0-windowsservercore-1809

# Windows and Node.js version for JSS
NODEJS_PARENT_IMAGE=mcr.microsoft.com/windows/nanoserver:1809
NODEJS_VERSION=14.15.3

# MSBuild configuration and the target build stage for the Rendering Host image.
BUILD_CONFIGURATION=debug

# Prefix for Solr cores used with Sitecore Content Search
SOLR_CORE_PREFIX_NAME=sitecore

# JSS deployment secret, should also be in the scjssconfig.json
JSS_BasicCompany_DEPLOYMENT_SECRET=dd5d764c4776459e92e1233b8cde0ab5

# JSS editing secret, should be provided to CM and the Next.js Rendering Host
JSS_EDITING_SECRET=

# Mount paths for code deployment, data persistence, and your Sitecore license.
LOCAL_DEPLOY_PATH=.\docker\deploy\
LOCAL_DATA_PATH=.\docker\data\
HOST_LICENSE_FOLDER=

# Because we are using a mounted license file, this value can be empty.
# Included here to suppress 'variable is not set' warning from docker-compose.
SITECORE_LICENSE=

# The isolation mode for Sitecore containers.
# Compatibility of isolation mode depends on the Host and Container OS versions.
ISOLATION=default
TRAEFIK_ISOLATION=hyperv

# Generated keys and certificates for your environment.
REPORTING_API_KEY=
SITECORE_IDSECRET=
TELERIK_ENCRYPTION_KEY=
SITECORE_ID_CERTIFICATE=
SITECORE_ID_CERTIFICATE_PASSWORD=
MEDIA_REQUEST_PROTECTION_SHARED_SECRET=
44 changes: 44 additions & 0 deletions examples/helix-basic-nextjs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# may contain OAuth secrets, do not commit
.sitecore/user.json

# NuGet cache for Sitecore CLI
.sitecore/package-cache/

# Ephemeral index caches used by serialization, do not commit
.scindex

# Don't commit packages
*.itempackage
*.sicpackage

#Ignore thumbnails created by Windows
Thumbs.db
#Ignore files built by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
.vs/
#Nuget packages folder
packages/
Loading

0 comments on commit 90f5ccf

Please sign in to comment.