Skip to content

Latest commit

 

History

History
100 lines (67 loc) · 2.35 KB

File metadata and controls

100 lines (67 loc) · 2.35 KB

Developer Notes

Backend Solution Structure

Jhoose.Demo

This is a demo Optimizely website that hosts the commerce catalog and runs the API.

Commerce Content is indexed to the Optimizely Content Graph.

Tech Info

  • .Net 8
  • SQL Server

Databases The databases can be restored from the src/Jhoose.Demo/Databases folder.

Running Solution There is currently no head for the website, you must log directly into the editorial interface.

http://localhost:5001/util/login

Note the website must run http not https

UID : admin PWD : Episerver123!

Jhoose.CommerceApi

The delivers the Commerce Rest API layer.

See the src/Jhoose.CommerceApi/postman has postman scripts that demonstrates and tests the Rest API.

Tech Info

  • .Net 8, 9, 10

Frontend Solution Structure

The frontend solution is built using a npm workspace/monorepo. https://docs.npmjs.com/cli/v8/using-npm/workspaces

Tech Info

  • Node 22.12.0
  • npm 10.9.0
  • Typescript 5

www

https://localhost:3000/en/

This is a demo eCommerce website built using Nextjs and uses all the frontend projects listed below.

The projects must be built before the website can be built.

Catalog content comes directly from the Optimizely Content Graph. Authentication is provided by Auth0

Config files

Create a env.local with the following values

# Populate the missing values
AUTH0_SECRET= ...
AUTH0_BASE_URL=https://localhost:3000
AUTH0_ISSUER_BASE_URL= ...
AUTH0_CLIENT_ID= ...
AUTH0_CLIENT_SECRET= ...

COMMERCE_ENDPOINT = http://localhost:5001
NEXT_PUBLIC_COMMERCE_ENDPOINT = $COMMERCE_ENDPOINT
COMMERCE_AUTHORIZATION_KEY = ...

Commands

  • npm run dev - this starts the website.

Tech Info

  • React 18
  • Nextjs 14.2.7

core

This is the javascript commerce api

Commands

  • npm run build - builds and packages the project.
  • npm run test - runs the unit tests
  • npm run testf - runs the unit functional tests, requires the Rest API to be running
  • npm run doc - creates the documentation

components

This is the reactjs component library

Commands

  • npm run build - builds and packages the project.
  • npm run storybook - runs storybook to test the components.

core-nextjs

This library adds middleware which can be used by a nextjs project.

Commands

  • npm run build - builds and packages the project.