Giter Site home page Giter Site logo

dcabrejas / dc-demostore-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amplience/dc-demostore-core

0.0 0.0 0.0 21.53 MB

Home Page: dc-demostore-core-one.vercel.app

License: Apache License 2.0

JavaScript 2.92% TypeScript 55.74% CSS 10.82% HTML 10.15% Handlebars 3.80% SCSS 16.58%

dc-demostore-core's Introduction

Amplience Dynamic Content

Amplience Demo Store Core Package

dc-demostore-core is a React/Material/NextJS front-end e-Commerce application, implemented with Typescript, showcasing Amplience Dynamic Media and Dynamic Content.

It includes Storybook, a visual documentation of the UI components, things like Product Lists, Banners, Blogs & Blog posts, Stores, etc.

The package also includes a Debug/X-Ray panel to help understand how the pages and components are structured, what context your are looking at the application in and the ability to click directly from the application to the related content in Amplience Dynamic Content.

dc-demostore-core is intended for DEMO PURPOSES ONLY, and not for production-optimized environments.

Table of Contents

Getting Started

General Use (w/o Amplience account)

Out of the box, dc-demostore-core may be used without needing to have an Amplience account, allowing you to experiment with API calls and Front-End customisations against an existing content base. You can simply clone this repository and it already points to a working account so that you can see:

  • Live Content
  • Components
  • Amplience API requests
  • etc.

The following commands will install dc-demostore-core on your local machine.

$ gh repo clone amplience/dc-demostore-core
$ cd dc-demostore-core
$ yarn install

To run a Development environment:

$ yarn dev

To run a production environment:

$ yarn build
$ yarn start

Both dev and prod commands will also start a localhost. Then go to http://localhost:3000

Amplience Demo Store homepage

Storybook

Firing up Storybook is super simple:

$ yarn storybook

Then go to http://localhost:6006. More details may be found in our Storybook README

Storybook documentation

Provisioning your own Amplience Environment

The main tool for using your own Amplience environment with dc-demostore-core is dc-demostore-cli. The CLI tool allows you to quickly import a pre-configured set of Content Schemas, Content Types, Images, etc. to your Amplience acount. Basically, everything you'd see running dc-demostore-core OOTB against our 'core public' Amplience Environment.

At a high level the basic steps are:

  1. Request an Amplience Media and Dynamic Account (if you don't already have one)
  2. Deploy a fork of dc-demostore-core (we'll cover deploying on Vercel)
  3. Configure & use dc-demostore-cli to populate content
  4. Point dc-demostore-core to your Dynamic Content Hub and run

Requesting an Amplience Demo Store Environment

This application is setup to run with a predefined Amplience account structure to have all of the capabilities and organisational requirements to showcase capabilities effectively.

This section assumes you are already an Amplience partner, customer, or internal Amplience team member with access to the Amplience Support Center. IF the answer to any one of these is yes, go here for instructions on requesting a Demo Store Environment

If you already have a Dynamic Content and Dynamic Media instance, you can skip to the next step.

Fork & Deploy dc-demostore-core

Go HERE for some basic instructions on Forking and deploying core.

Configure & Use dc-demostore-cli

Please refer directly to the this README on how to Install/Configure/Use the CLI tool

Once you have installed the demostore CLI tool, you can provision your account in two easy steps:

  1. Register your instance using the CLI command env add
% demostore env add 
✔ env name: · mydcinstance
✔ app deployment url: · https://mydomain.com
✔ cms client id: · zzzzzzzz-yyyy-yyyy-yyyy-xxxxxxxxxxxx
✔ cms client secret: · ****************************************************************
✔ cms hub id: · xxxxxxxxxxxxxxx
✔ dam username: · [email protected]
✔ dam password: · ********
info: [ amprsatest ] configure dc-cli...
info: [ amprsatest ] environment active
info: run [ env,add ]: started at Mon Mar 28 2022 12:39:21 GMT+0200 (Central European Summer Time)
  1. You can provision your instance using the CLI command import (more information on the CLI tool project page):
% demostore import --latest
info: run [ import ]: started at Mon Mar 28 2022 12:45:26 GMT+0200 (Central European Summer Time)
...
...
...
info: run completed in [ 3m20s ]

Note: If you ever need to revert, simply run the cleanup command.

Change dc-demostore-core Config / Point to your account

  • Create a .env.local file on the root of your project:

Default setting:

NEXT_PUBLIC_DEMOSTORE_CONFIG_LOCATOR=amprsaprod:default

Your setting with your Hub Name {hubname}

NEXT_PUBLIC_DEMOSTORE_CONFIG_LOCATOR={hubname}:default

If you are using services like Vercel, you can configure the environment variable in the settings, and re-deploy your application.

top

Additional Topics

dc-demostore-core's People

Contributors

dlilly avatar rezakalfane avatar neilmistryamplience avatar sweetenr avatar rosshill127 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.