GraphQL backend for Adequate, a free and open-source iOS client for the Meh daily deal website.
-
Create a free account on Meh and obtain an API Key
-
AWS Account with appropriate permissions to create the related resources
-
AWS CLI with output configured as JSON
-
AWS Amplify CLI configured for a region where AWS AppSync and all other services in use are available
(npm install -g @aws-amplify/cli)
-
AWS SAM CLI
(brew tap aws/tap && brew install aws-sam-cli)
-
Install jq
(brew install jq)
-
Clone project
git clone https://github.com/mgacy/Adequate-Backend.git cd Adequate-Backend
-
Initialize Amplify project:
amplify init
-
Deploy Amplify app:
amplify push
-
Install SAM dependencies:
make init
-
Add Meh API Key as the value for
PLAIN_API_KEY
in.env
, which will have been created during step (4). Optionally, to receive an email notification of anydeal_check
lambda errors, uncommentALARM_EMAIL
in.env
and set that address as its value. -
Deploy SAM app:
make deploy
-
Clone client (it is expected that the client is located alongside
Adequate-Backend
):cd .. git clone https://github.com/mgacy/Adequate.git cd Adequate
-
Install client dependencies
-
Generate push notification profiles with Fastlane:
fastlane pem -a your.organization.Adequate -u username [-p <password for p12 file>] fastlane pem -a your.Organization.Adequate -u username --development [-p <password for p12 file>]
-
Create SNS Platform application:
make notifications
If you forked this project, you can configure a development environment as follows:
-
Ensure all changes have been pushed to Amplify and the SAM app
-
Setup a
dev
environment:$ amplify env add ? Do you want to use an existing environment? No ? Enter a name for the environment dev
-
Push new Amplify environment:
amplify push
-
Push corresponding SAM app:
make deploy
-
Create
dev
branch in Git:git add . git commit -m "Create a dev amplify environment" git push -u origin master git checkout -b dev git push -u origin dev
- Eliminate use of Amplify CLI