A simple booking service
Mono repo containing 3 packages:
- @vailable/api: Firebase GraphQL app
- @vailable/web: NextJS application
- @vailable/shared: Shared utils and types
- @vailable: SDK for integration
- @vailable/example: Example using Apollo client
yarn
The infrastructure is set up initially using terraform.
yarn infrastructure:deploy
This assumes you have terraform >= 0.12 installed, and AWS credentials set on your machine.
yarn start
Starts all packages concurrently
yarn test
# In watch mode
yarn test:watch
This repository uses ESLint and Prettier.
husky
is used to check and fix linting errors on commit. They can also be run with the scripts below.
# Runs eslint check
yarn lint
# Runs prettier check
yarn lint:prettier-check
- Search replace
booking-api
->new-project-name
- Search replace
vailable.eu
->new-domain.com
- Set up Route53 DNS
cd infrastructure terraform init terraform apply -target=module.domain
- Update your registrar DNS pointers to the generated servers
- Deploy remaining infrastructure
terraform apply
Things are already setup with github CI, but you'll need to add the following secrets to the repository:
# Used by deployment of api.
# You need to create and provide these keys yourself
AWS_MASTER_ACCESS_KEY_ID
AWS_MASTER_SECRET_ACCESS_KEY
# Used by deployment of web.
# The values are outputted from terraform apply in the previous step
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
# Bucket for deployment of web.
# The values are outputted from terraform apply in the previous step
AWS_WEB_BUCKET_NAME
AWS_WEB_CLOUDFRONT_ID
# Dummy user database, e.g. tmp-admin-user:passwordz
USER_DATA
# Random value acting as your JWT_SECRET.
JWT_SECRET
# Random UUID acting as your servers identifier for uuid v5
UUID_NAMESPACE