graphql-engine/community/sample-apps/whatsapp-clone-typescript-react
Valentin Cocaud e0084f8f41
community: fix some readme titles (#3995)
Co-authored-by: Praveen Durairaju <praveen@hasura.io>
2020-03-26 15:11:07 +05:30
..
auth-server introduce v1/graphql (fix #1368) (#2064) 2019-05-10 11:35:10 +05:30
hasura add whatsapp-clone sample app (#1730) 2019-03-19 12:15:41 +05:30
react-app community: fix some readme titles (#3995) 2020-03-26 15:11:07 +05:30
README.md noop: replace subdomain links with subpath (#3869) 2020-02-27 15:43:07 +05:30

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 Heroku:

Deploy to
heroku

  • Get the Heroku app URL (say whatsapp-clone.herokuapp.com)
  • 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.herokuapp.com"
    

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