This is recipes project to show an approach to integrate Next, Apollo, and Contentful.
The project is a Next app that gets Contentful data using Apollo and GraphQL queries. The project has two pages:
- Homepage: shows a list of recipes
- Recipe detail: Each recipe detail page
Please check your node version:
node -v
First, install the dependencies:
yarn install
####How to add the environment variables:
First create a local env file:
cd <project-root> folder
touch .env.local
Open .env.local file and add these environment variables and their corresponding values:
CONTENTFUL_ACCESS_TOKEN=
CONTENTFUL_ENVIRONMENT=
CONTENTFUL_SPACE_ID=
then run the project
yarn dev
Open http://localhost:3000 with your browser to see the result. Make sure 3000 port is available and your page is accessible.
Analyze the build
yarn analyze
- NextJS - The web framework used.
- ReactJS - The library used to build the website
- Yarn - Dependency Management with Yarn
- Styled-Components - CSS Styled-Component to create beautiful pages
- Apollo - Data Fetching with Apollo GraphQL Client
- Contentful - Contentful API reference
*NextJS Official Repository Examples - Thanks to everyone who contributed to this project.
Not available right now. ;)
- Create Global Stylesheet for better optimisation.
- UI Improvements
- Paresh Salunke - Github Profile
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used
- Inspiration
- etc