The client web app for Dog's Business. This is a single page application powered by Mapbox GL JS, Vue.js, and Buefy.
The Mapbox access token for guests is read from src/configs/mapbox-config.ts
, which is never pushed to the repository.
You can find an example in src/configs/mapbox-config.example.ts
.
-
Copy the configuration for the localhost:
cp src/configs/mapbox-config.localhost.ts src/configs/mapbox-config.ts
-
Start the dev server:
pnpm dev
-
Open
http://localhost:5174
in your browser.
pnpm test:unit
pnpm lint
You have to deploy the AWS Cloud Development Kit (CDK) stack first.
Please see the /cdk
folder for more details.
-
Choose the deployment stage.
Development:
DEPLOYMENT_STAGE=development
Production:
DEPLOYMENT_STAGE=production
-
Configure the app:
cp src/configs/mapbox-config.$DEPLOYMENT_STAGE.ts src/configs/mapbox-config.ts
Note that you have to prepare your own
src/configs/mapbox-config.$DEPLOYMENT_STAGE.ts
. -
Build the production bundle:
pnpm build
-
Configure AWS_PROFILE:
export AWS_PROFILE=dogsbusiness-jp
-
Obtain the S3 bucket name:
CONTENTS_BUCKET_NAME=`aws cloudformation describe-stacks --stack-name dogs-business-$DEPLOYMENT_STAGE --query "Stacks[0].Outputs[?OutputKey=='ContentsBucketName'].OutputValue" --output text`
-
Copy the contents to the S3 bucket:
aws s3 sync dist/ s3://$CONTENTS_BUCKET_NAME/app