Giter Club home page Giter Club logo

commerce-starter's Introduction

Uniform Commerce Starter

This is a Next.js project bootstrapped with create-next-app. It's a Starter repository containing a personalized Uniform-powered e-commerce store.

On Uniform, install the Commerce Starter after creating an account then follow the instructions to connect this repository. Alternatively, you can start with this repository then push the content to your Uniform project. See the instructions below.

Uniform Project Setup

  1. Clone this repo onto your local machine
  2. Create a new project at https://uniform.app. Give it a name and select "Empty Project".
  3. Under your team's Security settings, create an API Key with full permissions to Canvas and Context.
  4. Copy your API Key, Project ID, and Quick Connect Key. You will add these to your .env file (see below) and to the Uniform Chrome extension respectively. It is important to note that once you close the API Key window you're unable to copy the API or Quick Connect key values again. If you do close the API Key window before copying you will need to go through the API Key creation process again.
  5. In your new project, navigate to "Settings -> Canvas Settings" and add http://localhost:3000/api/preview?secret=javadrip into the Preview URL and click "Save". This aloows you to preview your project as you develop.

Add Uniform Fake Commerce integration

  1. Navigate to your project then go to the Integrations menu.

  2. Chose and add the Uniform Fake Commerce integration.

  3. As this integration relies on the local development environment of this project, we set the API URL field to http://localhost:3000. You can modify it if you run this project on a different port or domain.

  4. Click on Save button.

Environment Variables

  • UNIFORM_API_KEY: your uniform api key

    ⚠️ For the initial setup, this API key needs the Developer role assigned to it.

  • UNIFORM_PROJECT_ID: your uniform project

Start local development

  1. In your code editor and rename .env.example to .env file and add your UNIFORM_API_KEY and UNIFORM_PROJECT_ID environment variables. The values must correspond to your Uniform project connection details. If you don't have the API key created, head over to your team security section and create one. ⚠️ For this initial setup, this API key needs the Developer role assigned to it.

  2. In your terminal, from the project root, install all dependencies with the following command:

    npm install
  3. Run this to push all local content from ./data to your new Uniform project.

    npm run push
  4. Run the dev server:

    npm run dev

Open http://localhost:3000 with your browser to see the result. The project is connected to your Uniform project. Changes you make an publish on Uniform will reflect in this local project.

Supported features

  • Hardcoded top navigation menu with 3 links only (home, beans, coffee makers, product detail)
  • Personalized home page Hero
  • Beans && Coffee makers pages
  • Product detail page
  • Local storage based cart functionality
  • Visual Canvas, Project Map & Project Map Links
  • Static page generation based on project map canvas API
  • Canvas Components with default Title Parameter and Screenshot for better Visual Canvas experience
  • Next SDK for components registration
  • Standard context output type (client side personalization)

Components

  • Add to cart
  • Call to action (2 variants)
  • Container / Section - Two Columns (advanced usage example)
  • Featured Products (default / dark variants)
  • Hero (2 variants)
  • Page (composition component)
  • Product Catalog
  • Product Description
  • Product Image Gallery
  • Product Info
  • Related Products

Compositions

  • Home page
    • hardcoded top navigation menu
    • hero personalised component
    • call to action
    • featured products (default variant)
    • featured products (dark variant)
    • hardcoded footer
  • Coffee-makers Products page
    • hardcoded top navigation menu
    • hero
    • product catalog
    • hardcoded footer
  • Beans Products page
    • hardcoded top navigation menu
    • hero
    • product catalog
    • hardcoded footer
  • Product Detail
    • hardcoded top navigation menu
    • section - two columns / product info / product image gallery
    • add to cart
    • product description
    • related products
    • hardcoded footer

commerce-starter's People

Contributors

m1r1k avatar uniformdevbot avatar alexshyba avatar michaellonin avatar chuloo 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.