graphql-engine/community/sample-apps/whatsapp-clone-typescript-react
Rikin Kachhia 3696d92743 add github workflow to compress new images in PRs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: cfef3585b120d82cafe5343cfceddbcd05969a15
2021-03-10 20:55:02 +00:00
..
auth-server introduce v1/graphql (fix #1368) (#2064) 2019-05-10 11:35:10 +05:30
hasura community: update sample apps to use hasura cloud and v3 migrations/metadata 2021-03-02 08:32:37 +00:00
react-app add github workflow to compress new images in PRs 2021-03-10 20:55:02 +00:00
README.md community: update sample apps to use hasura cloud and v3 migrations/metadata 2021-03-02 08:32:37 +00:00

WhatsApp Clone

The react client is a forked version of urigo/whatsapp-client-react and the server is backed by Hasura GraphQL Engine

Edit whatsapp-clone

Running the app yourself

Deploy Postgres and GraphQL Engine on Hasura:

  • Deploy GraphQL Engine on Hasura Cloud and setup PostgreSQL via Heroku:

    Deploy to Hasura Cloud

  • Get the Hasura app URL (say whatsapp-clone.hasura.app)

  • Clone this repo:

    git clone https://github.com/hasura/graphql-engine
    cd graphql-engine/community/sample-apps/whatsapp-clone-typescript-react
    
  • Install Hasura CLI

  • Apply the migrations:

    cd hasura 
    hasura migrate apply --endpoint "https://whatsapp-clone.hasura.app"
    

Run the auth server

cd auth-server
  • Set the environment variables in .env

  • Install and run the app

  npm install
  npm start

Run the react app

cd react-app
  • Set the environment variables in .env
  yarn install
  • Modify the codegen.yml to include the correct endpoint and headers

  • Generate the graphql types by running

  gql-gen

This would generate the required types in src/graphql/types

  • Run the app
  yarn start