Skip to content

EPAM-JS-Competency-center/camp-storefront-nuxt

Repository files navigation

CAMP Storefront Template

Setup

Make sure to install the dependencies:

# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install

Running Development Server

Start the development server on http://localhost:3000:

# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

# bun
bun run dev

Adding your API

Create .env file and set variable VITE_BFF_URL, you can find an example inside .env.example

Please refer to [Postman Collection](/postman/CAMP Storefront.postman_collection.json) to get examples of requests and responses

VITE_BFF_URL=http://localhost:3003/api/v1

Current version supports following enpoints.

GET /categories

Should return a list of categories. Please see mock_data/categories.json to find example of the response

GET /products?categogyId=number[&offset=0][&limit=0]

Should return a list of products in the category. Supports pagination. Please find example in mock_data/products.json

GET /products/{sku}

Returns a single product with variations. Please find example in mock_data/product.json

POST /carts

Should create a new guest cart and return it

GET /carts/:id

SHould return a guest cart by id

PUT /carts/:id

This request supports various payloads depending on the action, one of:

  • AddLineItem
  • ChangeLineItemQuantity
  • RemoveLineItem
  • SetShippingAddress

POST /carts/:id/order

Creates an order from the cart

Indication of not implemented APIs

The red blocks helps you to identify blocks where api is not implemented yet

Not Implemented

The template is trying to request data from your BFF api, and if the request is not successful, it falls back to mocked data and identifies the area with red color to indicate that this part is not implemented yet.

Good luck! And please contact vasily_vanin@epam.com or dmytro_livshun@epam.com if you need help.

Releases

No releases published

Packages

No packages published

Languages