Skip to content

arrudadev/jamstack-next-graphcms

Repository files navigation

JAMStack with GraphCMS

A simple JAMStack app using NextJs, Graphql and GraphCMS.

License: MIT PRs Welcome GitHub repo size

Report BugRequest Feature

cover

📷 Screenshots

Click to expand.

Home Home - All in One Platform Section Home - Pricing Section Footer Blog Blog content
Home Home - All in one Platform Section Home - Pricing Section Footer Blog Blog Content

📌 Table of Contents

📝 About The Project

This project is a small example of a JAMStack application, a blog built with GraphCMS. The purpose of this project is to study the consumption of Graphql APIs with React and also the use of a CMS that offers an API in Graphql. In this case, GraphCMS.

💻 Technologies

This project was developed with the following technologies:

🏃 Getting Started

To run the project locally follow these steps:

⚠️ Prerequisites

  • NodeJs Prefer to install the LTS version.
  • Yarn Need to install latest version prior to 2.0 version.
  • GraphCMS You Need to setup the GraphCMS. See the documentation for setup your GraphCMS for this project.

👷 Installation

1. To clone the project, run this command:

git clone https://github.com/arrudadev/jamstack-next-graphcms.git

2. Install dependencies:

yarn install

3. Create your environment variables based on the examples of .env.development:

cp .env.development .env.local

4. Fill the .env.local with the environment variables:

key description example
NEXT_PUBLIC_GRAPHCMS_CONTENT_API_URL GraphCMS API's url (used for client request) https://api-sa-east-1.graphcms.com/v2/anykey/master
GRAPHCMS_SCHEMA_PATH GraphCMS API's url (used in graphql codegen) https://api-sa-east-1.graphcms.com/v2/anykey/master

5. Run the following command to generate Typed Queries, Mutations and, Subscriptions of the Graphql:

yarn codegen

🤘 Usage

1. Run the following command to start the application in a development environment:

yarn dev

2. Open the project into your browser in:

http://localhost:3000

🎉 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue. Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -m 'feat: Add some Amazing Feature')
  4. Push to the Branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

After your pull request is merged, you can safely delete your branch.

For more information read the Contributing Guidelines.

😄 Collaborators

People who contributed to this project.

Alexandre Arruda
Alexandre Arruda

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Releases

No releases published

Packages

No packages published