Quicksave Logo

QSApp Facebook Integration

This integration requires a full toolkit license. Please contact sales@quicksave.fi for more information on how to register for our Enterprise Plan.

Developing the client

Setup

cd client
pnpm i

Common build tasks

TaskDescription
gulp [default]Build the client to dist/development, dist/staging or dist/production depending on flags
gulp cleanDelete dist/development, dist/staging or dist/production depending on flags
gulp dev-envRun default build task, start watchers for live updates and host the game build locally
gulp deployDeploy the client to Facebook Instant Games web hosting → shouldn't need to do manually

Common flags for build / dev-env

FlagDescription
Build or run the dev version of the client
--stagingBuild or run the staging version of the client
--productionBuild or run the production version of the client
--localBuild or run a special dev version that connects to the server running on localhost
--bundleEnable assets bundling → requires that bundler from @quicksave/build is used

Common test tasks

TaskDescription
pnpm lintRun the linter for the project
pnpm testRun the tests for the project

Developing the server

Setup

cd server
pnpm i

Common build tasks

TaskDescription
gulp [default]Build the server to dist/development, dist/staging or dist/production depending on flags
gulp cleanDelete dist/development, dist/staging or dist/production depending on flags
gulp dev-envRun default build task, start watchers for live updates and run the server locally
gulp deployDeploy the server to AWS using serverless → shouldn't need to do manually

Common flags for build / dev-env

FlagDescription
Build or run the dev version of the server
--stagingBuild or run the staging version of the server
--productionBuild or run the production version of the server
--dbHost and connect to a local instance of DynamoDB instead of connecting to AWS

Common test tasks

TaskDescription
pnpm lintRun the linter for the project
pnpm testRun the tests for the project

Different builds / App IDs

While there are three different build versions, there are only two different Apps (ie. Production / Staging) in Facebook. The dev builds' purpose is to allow local client development without having to run a local dev server.

Client BuildFlagsClient App IDServer Connection
dev--localstaginglocalhost
devstagingAWS dev
stagingstagingAWS staging
productionproductionAWS production

NOTE: All server requests are signed and authenticated using the App ID with FBInstant.getSignedPlayerInfoAsync. This prevents accidentally using the wrong backend for any client. Make sure to use the correct Test URL from the gulp log when running gulp dev-env since the URL will decide which App ID the local dev client will use.