Skip to content

mgacy/Adequate-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adequate-Backend

Overview

GraphQL backend for Adequate, a free and open-source iOS client for the Meh daily deal website.

Getting Started

Dependencies

Deploy

  1. Clone project

    git clone https://github.com/mgacy/Adequate-Backend.git
    cd Adequate-Backend
  2. Initialize Amplify project:

    amplify init
  3. Deploy Amplify app:

    amplify push
  4. Install SAM dependencies:

    make init
  5. 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 any deal_check lambda errors, uncomment ALARM_EMAIL in .env and set that address as its value.

  6. Deploy SAM app:

    make deploy

Configure Notifications (Optional)

  1. Clone client (it is expected that the client is located alongside Adequate-Backend):

    cd ..
    git clone https://github.com/mgacy/Adequate.git
    cd Adequate
  2. Install client dependencies

  3. 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>]
  4. Create SNS Platform application:

    make notifications

Configure dev Environment (Optional)

If you forked this project, you can configure a development environment as follows:

  1. Ensure all changes have been pushed to Amplify and the SAM app

  2. Setup a dev environment:

    $ amplify env add
    ? Do you want to use an existing environment? No
    ? Enter a name for the environment dev
  3. Push new Amplify environment:

    amplify push
  4. Push corresponding SAM app:

    make deploy
  5. 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

Roadmap

  • Eliminate use of Amplify CLI