A demo e-commerce application built using:
- Next.js
- graphcms - a GraphQL-powered headless CMS
- tailwindcss for styling
- cypress for testing
- Mock Service Worker to mock GraphQL operations for local development
- Ensure you have Node.js installed
- Clone the repository
- Open a command prompt / terminal at the root of the project and install the NPM packages:
npm install
If you'd like use mock data for local development, at the root of the project, create a .env.local
file with the following content:
MOCK_GRAPHQL_REQUESTS=true
Open a command prompt / terminal at the root of the project, start the development server:
npm run dev
The tests rely on mock data. So ensure you've already created a .env.local
at the root of your project with the following content:
MOCK_GRAPHQL_REQUESTS=true
Open a command prompt / terminal at the root of the project, start the development server:
npm run dev
Open a separate command prompt / terminal at the root of the project, start cypress:
npm run cypress:open