Skip to content

Zuhair2002/contentstack-getting-started-react-app

 
 

Repository files navigation

Contentstack getting started React App

Description

This is a React starter app that integrates with Contentstack's Content Delivery API. It provides a foundation for building dynamic web applications that fetch and display content from Contentstack's headless CMS.

Installation

  1. Clone the repository:

    git clone https://github.com/contentstack/contentstack-getting-started-react-app.git
    
  2. Navigate to the project directory:

    cd contentstack-getting-started-react-app
    
  3. Install dependencies:

    npm install
    
  4. Rename .env.sample as .env file in the root directory and add your Contentstack API keys:

    REACT_APP_CONTENTSTACK_API_KEY=YOUR_STACK_API_KEY
    REACT_APP_CONTENTSTACK_DELIVERY_TOKEN=YOUR_DELIVERY_TOKEN
    REACT_APP_CONTENTSTACK_PREVIEW_TOKEN=YOUR_PREVIEW_TOKEN
    REACT_APP_CONTENTSTACK_ENVIRONMENT=YOUR_ENVIRONMENT
    REACT_APP_CONTENTSTACK_REGION=YOUR_STACK_REGION
    
  5. Run the development server:

    npm start
    

Configuration

To configure the app with your Contentstack account:

  • Replace YOUR_STACK_API_KEY, YOUR_DELIVERY_TOKEN, YOUR_PREVIEW_TOKEN, YOUR_ENVIRONMENT and YOUR_STACK_REGION in the .env file with your Contentstack API key, delivery token, environment name and region respectively.

Supported Regions:

  • AWS North America: US
  • AWS Europe: EU
  • Azure North America: AZURE_NA
  • Azure Europe: AZURE_EU
  • GCP North America: GCP_NA

🚨 Important Note: Live Preview is not supported in the GCP NA region! 🚨

Usage

  1. Once the app is running, navigate to http://localhost:3000 in your web browser.
  2. Explore the app to see how it fetches and displays content from Contentstack.
  3. Customize and extend the app as needed for your project requirements.

Features

  • Integration with Contentstack's Content Delivery API.
  • Dynamic rendering of content fetched from Contentstack.
  • Live Preview of the Content

License

This project is licensed under the MIT License.

Contact

For questions or feedback, feel free to open an issue.

About

Quick start web application with React and Contentstack

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 66.3%
  • CSS 29.5%
  • HTML 4.2%