/booking

Primary LanguageJavaScriptBSD Zero Clause License0BSD

Contentful Gatsby Booking App

Netlify Status

Create a Gatsby booking app powered by AWS Amplify.

The index page of the booking app

Static sites are scalable, secure and have very little required maintenance. They come with a drawback though. Not everybody feels good editing files, building a project and uploading it somewhere. This is where Contentful comes into play.

With Contentful and Gatsby you can connect your favorite static site generator with an API that provides an easy to use interface for people writing content and automate the publishing using services like Travis CI or Netlify or AWS Amplify .

  • demo user
name password
demo Password1?

Features

  • booking management
  • inquiry management
  • corporate site management

Component

PlatForm

FlameWork

Access Control

Storage

Master Data

Transaction Data

Other

Api

BackEnd

Calender App

  • Google Calender

Error Tracking

Getting started

type required
Contents Settings true
FrontEnd Settings true
BackEnd Settings optional
  • demo user
name password
demo Password1?

Contents Settings

Contentful Account Create & Create Personal Access Tokens

Locale Settings

Change the default locale to Japanese

See [Change the default locale to Japanese].

See [Localization with Contentful].

Create configuration file

See [export / import with Contentful]

Contentful import

$ cd contentful-data
$ npx contentful-cli login --management-token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
$ npx contentful-cli space import --config example-config.json

See [export / import with Contentful]

See [Importing and exporting content with the Contentful CLI]

FrontEnd Settings

Install the dependencies

$ yarn install

configuration file setup

$ yarn setup
$ yarn setup
yarn run v1.22.4
$ node ./bin/setup.js
? Your Contentful Space ID XXXXXXXXXXXXXXXX
? Your Contentful Content Delivery API access token XXXXXXXXXXXXXXXXXXXXXXXXXXX
Writing config file...
Config file /path/to/directory/booking/.env.development written
Config file /path/to/directory/booking/.env.production written
All set! You can now run yarn develop to see it in action.
✨  Done in 9.03s.

Start the app in development mode

$ yarn develop

Run the project locally with live reload in development mode.

BackEnd Settings (* optional)

  • AWS account required

init settings

Amplify init settings.

create required parameter

Create the ssm parameters used in CloudFormation.

Launch Stack

  • parameter list
name type description
/${environments(ex: dev)}/contentful/spaceId String Contentful Space ID
/${environments(ex: dev)}/contentful/token SecureString Contentful Content Delivery API - access token
/${environments(ex: dev)}/googleapis/calendar/credentials SecureString Google Calender Credentials
/${environments(ex: dev)}/googleapis/calendar/token SecureString Google Calender API token
/${environments(ex: dev)}/salon/mail/footer String mail footer
/${environments(ex: dev)}/salon/name String salon name
/${environments(ex: dev)}/sentry/dsn String Sentry DSN
/${environments(ex: dev)}/system/email String salon owner's email address

These ssm parameters are used by AWS Lambda.

Change the parameter to secure if necessary.

create resource

$ amplify push

destory 💥

$ amplify delete

Deploy to Netlify

References

  • Gatsby