Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
praveen-mohan-cs committed Jul 9, 2024
1 parent 3e311db commit 9fa5775
Show file tree
Hide file tree
Showing 53 changed files with 23,025 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
REACT_APP_CONTENTSTACK_API_KEY=YOUR_STACK_API_KEY
REACT_APP_CONTENTSTACK_DELIVERY_TOKEN=YOUR_DELIVERY_TOKEN
REACT_APP_CONTENTSTACK_ENVIRONMENT=YOUR_ENVIRONMENT

# Supported Regions:
# For AWS North America, set region as US
# For AWS Europe, set region as EU
# For Azure North America, set region as AZURE_NA
# For Azure Europe, set the region as AZURE_EU
# For GCP, set the region as GCP_NA
REACT_APP_CONTENTSTACK_REGION=YOUR_STACK_REGION
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Contentstack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
73 changes: 72 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,72 @@
# contentstack-getting-started-react-app
# React Contentstack Starter 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_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_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`

## 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.

## License

This project is licensed under the [MIT License](LICENSE).

## Contact

For questions or feedback, feel free to [open an issue](https://github.com/contentstack/contentstack-getting-started-react-app/issues).
Binary file added Stack Data/Assets/Footer/Footer Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Stack Data/Assets/Header/Header Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Stack Data/Assets/Page - Home/Banner.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Stack Data/Content Types/Dishes/dishes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created_at":"2024-06-27T07:43:49.665Z","updated_at":"2024-07-01T06:42:43.478Z","title":"Dishes","uid":"dishes","_version":3,"inbuilt_class":false,"schema":[{"data_type":"text","display_name":"Title","field_metadata":{"_default":true,"version":3},"mandatory":true,"uid":"title","unique":true,"multiple":false,"non_localizable":false},{"data_type":"file","display_name":"Image","uid":"image","field_metadata":{"description":"This image is about the Dish","rich_text_type":"standard","image":true,"instruction":"This image is about the Dish"},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false,"dimension":{"width":{"min":null,"max":null},"height":{"min":null,"max":null}}},{"data_type":"number","display_name":"Price","uid":"price","field_metadata":{"description":"The Price of the Dish","default_value":"","instruction":"The Price of the Dish"},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"A Small Description about the Dish","default_value":"","multiline":true,"placeholder":"","instruction":"A Small Description about the Dish","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false}],"last_activity":{},"maintain_revisions":true,"description":"This Content Model consists of the Dishes Present in our Restaurant menu Website","DEFAULT_ACL":[{"k":"others","v":{"read":false,"create":false}},{"k":"users.blt47ad574f3a472dcf","v":{"read":true,"sub_acl":{"read":true}}}],"SYS_ACL":{"roles":[]},"options":{"is_page":false,"singleton":false,"sub_title":[],"title":"title"},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true}}
1 change: 1 addition & 0 deletions Stack Data/Content Types/Footer/footer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created_at":"2024-06-27T07:43:49.910Z","updated_at":"2024-07-01T06:40:02.219Z","title":"Footer","uid":"footer","_version":5,"inbuilt_class":false,"schema":[{"data_type":"text","display_name":"Title","field_metadata":{"_default":true,"version":3},"mandatory":true,"uid":"title","unique":true,"multiple":false,"non_localizable":false},{"data_type":"group","display_name":"Navigation Links","field_metadata":{"description":"These are the Navigation Links which appear on the bottom right corner of the Website","instruction":"These are the Navigation Links which appear on the bottom right corner of the Website"},"schema":[{"data_type":"text","display_name":"Title","uid":"title","field_metadata":{"description":"This serves as a Title for the Navigation Links provided","default_value":"","instruction":"This serves as a Title for the Navigation Links provided","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"link","display_name":"Link","uid":"link","field_metadata":{"description":"An Individual Link Element","default_value":{"title":"","url":""},"instruction":"An Individual Link Element"},"mandatory":false,"multiple":true,"non_localizable":false,"unique":false}],"uid":"navigation_links","mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"group","display_name":"Information Section","field_metadata":{"description":"This is a section that provides information of our PlateStack Restaurant website","instruction":"This is a section that provides information of our PlateStack Restaurant website"},"schema":[{"data_type":"file","display_name":"Logo","uid":"logo","extensions":[],"field_metadata":{"description":"This Logo will appear on the bottom right section of the website","rich_text_type":"standard","instruction":"This Logo will appear on the bottom right section of the website"},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"text","display_name":"Description","uid":"descrption","field_metadata":{"description":"This Description will appear on the bottom right section of the website","default_value":"","multiline":true,"instruction":"This Description will appear on the bottom right section of the website","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"text","display_name":"Timings","uid":"timings","field_metadata":{"description":"This text represents the working hours of PlateStack Restaurant website","default_value":"","instruction":"This text represents the working hours of PlateStack Restaurant website","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"text","display_name":"Holiday","uid":"holiday","field_metadata":{"description":"This Text will provide the day on which there is a holiday","default_value":"","placeholder":"","instruction":"This Text will provide the day on which there is a holiday","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false}],"uid":"information_section","mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"text","display_name":"Copyright","uid":"copyright","field_metadata":{"description":"This Consists of the Copyright tag of the PlateStack Restaurant Website","default_value":"","instruction":"This Consists of the Copyright tag of the PlateStack Restaurant Website","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false}],"last_activity":{},"maintain_revisions":true,"description":"This Content Type is used for the Footer Component of the PlateStack Restaurant Website","DEFAULT_ACL":[{"k":"others","v":{"read":false,"create":false}},{"k":"users.blt47ad574f3a472dcf","v":{"read":true,"sub_acl":{"read":true}}}],"SYS_ACL":{"roles":[]},"options":{"is_page":false,"singleton":true,"sub_title":[],"title":"title"},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true}}
1 change: 1 addition & 0 deletions Stack Data/Content Types/Header/header.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created_at":"2024-06-27T07:43:49.912Z","updated_at":"2024-07-01T06:40:36.149Z","title":"Header","uid":"header","_version":5,"inbuilt_class":false,"schema":[{"data_type":"text","display_name":"Title","field_metadata":{"_default":true,"version":3},"mandatory":true,"uid":"title","unique":true,"multiple":false,"non_localizable":false},{"data_type":"file","display_name":"Logo","uid":"logo","field_metadata":{"description":"This Logo will appear on the top left corner of the website","rich_text_type":"standard","image":false,"instruction":"This Logo will appear on the top left corner of the website"},"mandatory":true,"multiple":false,"non_localizable":false,"unique":false,"extensions":[]},{"data_type":"group","display_name":"Navigation Links","field_metadata":{"description":"These are the Navigation Links which appear on the top right corner of the Website","instruction":"These are the Navigation Links which appear on the top right corner of the Website"},"schema":[{"data_type":"link","display_name":"Link","uid":"link","field_metadata":{"description":"An Individual Link Element","default_value":{"title":"","url":""},"instruction":"An Individual Link Element"},"mandatory":false,"multiple":true,"non_localizable":false,"unique":false}],"uid":"navigation_links","mandatory":false,"multiple":false,"non_localizable":false,"unique":false}],"last_activity":{},"maintain_revisions":true,"description":"A Content Type for the Header Component of PlateStack Restaurant Website","DEFAULT_ACL":[{"k":"others","v":{"read":false,"create":false}},{"k":"users.blt47ad574f3a472dcf","v":{"read":true,"sub_acl":{"read":true}}}],"SYS_ACL":{"roles":[]},"options":{"is_page":false,"singleton":true,"sub_title":[],"title":"title"},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true}}
1 change: 1 addition & 0 deletions Stack Data/Content Types/Page/page.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created_at":"2024-06-27T07:43:49.891Z","updated_at":"2024-07-01T06:42:17.209Z","title":"Page","uid":"page","_version":6,"inbuilt_class":false,"schema":[{"data_type":"text","display_name":"Title","field_metadata":{"_default":true,"version":3},"mandatory":true,"uid":"title","unique":true,"multiple":false,"non_localizable":false},{"data_type":"text","display_name":"URL","uid":"url","field_metadata":{"_default":true,"version":3},"multiple":false,"unique":false,"mandatory":true,"non_localizable":false},{"data_type":"blocks","display_name":"Sections","blocks":[{"title":"Home","uid":"home","schema":[{"data_type":"group","display_name":"Hero Section","field_metadata":{"description":"This Section is the Hero Section of the Home Page","instruction":"This Section is the Hero Section of the Home Page"},"schema":[{"data_type":"file","display_name":"Banner","uid":"banner","extensions":[],"field_metadata":{"description":"This is the Banner which appears on left side of the Hero Section","rich_text_type":"standard","instruction":"This is the Banner which appears on left side of the Hero Section"},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"text","display_name":"Heading","uid":"heading","field_metadata":{"description":"The Heading of the Right Section of the Hero Section","default_value":"","instruction":"The Heading of the Right Section of the Hero Section","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"This provides the Description of our PlateStack Restaurant website","default_value":"","multiline":true,"instruction":"This provides the Description of our PlateStack Restaurant website","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"text","display_name":"Primary CTA","uid":"primary_cta","field_metadata":{"description":"This is the Button which will take you the Primary Call to Action","default_value":"","instruction":"This is the Button which will take you the Primary Call to Action","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false}],"uid":"hero_section","mandatory":false,"multiple":false,"non_localizable":false,"unique":false}]},{"title":"Menu","uid":"menu","schema":[{"data_type":"group","display_name":"Course","field_metadata":{"description":"This Group Consists of Dishes of a Respective Course","instruction":"This Group Consists of Dishes of a Respective Course"},"schema":[{"data_type":"text","display_name":"Course Name","uid":"course_name","field_metadata":{"description":"This Field represents the name of the course","default_value":"","instruction":"This Field represents the name of the course","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false},{"data_type":"reference","display_name":"Dishes","reference_to":["dishes"],"field_metadata":{"ref_multiple":true,"ref_multiple_content_types":true,"description":"It is a reference to the Dishes of the Dishes Content Type","instruction":"It is a reference to the Dishes of the Dishes Content Type"},"uid":"dishes","mandatory":false,"multiple":false,"non_localizable":false,"unique":false}],"uid":"course","mandatory":false,"multiple":true,"non_localizable":false,"unique":false}]},{"title":"About","uid":"about","schema":[{"data_type":"text","display_name":"About","uid":"about","field_metadata":{"description":"It consists of the information about the PlateStack Restaurant","default_value":"","multiline":true,"instruction":"It consists of the information about the PlateStack Restaurant","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false}]},{"title":"Contact","uid":"contact","schema":[{"data_type":"text","display_name":"Contact","uid":"contact","field_metadata":{"description":"It consists of the contact details of the PlateStack Restaurant","default_value":"","multiline":true,"instruction":"It consists of the contact details of the PlateStack Restaurant","version":3},"format":"","error_messages":{"format":""},"mandatory":false,"multiple":false,"non_localizable":false,"unique":false}]}],"multiple":true,"uid":"sections","field_metadata":{"instruction":"","description":"This Field Consists of Different Sections in Our PlateStack Restaurant Website"},"mandatory":false,"non_localizable":false,"unique":false}],"last_activity":{},"maintain_revisions":true,"description":"This Content Type consists of all the Different Pages in our Restaurant Menu Website","DEFAULT_ACL":[{"k":"others","v":{"read":false,"create":false}},{"k":"users.blt47ad574f3a472dcf","v":{"read":true,"sub_acl":{"read":true}}}],"SYS_ACL":{"roles":[]},"options":{"is_page":true,"singleton":false,"sub_title":[],"title":"title","url_pattern":false,"url_prefix":"/"},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true}}
Loading

0 comments on commit 9fa5775

Please sign in to comment.